def experimentTestScene(relaxation_function, outfile_prefix, patches, formfactorengine, cached_form_factors, notifier, convergence_threshold="0.00001,0.00001,0.00001"): guess = relaxation_function(patches=patches, formfactorengine=formfactorengine, convergence_threshold=convergence_threshold, cached_form_factors=cached_form_factors, notifier=notifier) guess_updates = notifier.guess_updates[relaxation_function] for guess_update in guess_updates: outfile = outfile_prefix + relaxation_function.__name__ + "_iteration_" + str(guess_update[1]) + ".xml" updatePatchesInGuess(guess_update[0]) computed_scene = convertPatchesToXmlScene(patches) writeScene(computed_scene, outfile)
def rr(self, radiosity_function, outfilename): guess = radiosity_function(patches=self.patches, formfactorenginer=self.formfactorenginer, cached_form_factors=self.cached_form_factors) updatePatchesInGuess(guess) computed_scene = convertPatchesToXmlScene(self.patches) writeScene(computed_scene, outfilename)
def test_convert_patches_to_xml_scene(self): writeScene(convertPatchesToXmlScene(self.patches), self.outfile) self.patch_scene = readScene(self.outfile)