def composite_mesh_render(engine): ytcfg["yt", "ray_tracing_engine"] = engine ds = data_dir_load(hex8) sc = Scene() cam = sc.add_camera(ds) cam.focus = ds.arr([0.0, 0.0, 0.0], 'code_length') cam.set_position(ds.arr([-3.0, 3.0, -3.0], 'code_length'), ds.arr([0.0, -1.0, 0.0], 'dimensionless')) cam.set_width = ds.arr([8.0, 8.0, 8.0], 'code_length') cam.resolution = (800, 800) ms1 = MeshSource(ds, ('connect1', 'diffused')) ms2 = MeshSource(ds, ('connect2', 'diffused')) sc.add_source(ms1) sc.add_source(ms2) im = sc.render() return compare(ds, im, "%s_composite_mesh_render" % engine)
def surface_mesh_render(): images = [] ds = fake_tetrahedral_ds() for field in ds.field_list: sc = Scene() sc.add_source(MeshSource(ds, field)) sc.add_camera() im = sc.render() images.append(im) ds = fake_hexahedral_ds() for field in ds.field_list: sc = Scene() sc.add_source(MeshSource(ds, field)) sc.add_camera() im = sc.render() images.append(im) return images