def drawPoint(myscreen, c, pcolor, rad=0.002): ca = ovdvtk.Sphere(center=(c.x, c.y, 0), radius=rad, color=pcolor) myscreen.addActor(ca)
def drawVertex(myscreen, p, vertexColor, rad=1): myscreen.addActor( ovdvtk.Sphere(center=(p.x, p.y, 0), radius=rad, color=vertexColor))
print("**********") print("PYTHON: adding generator: %s at %s" % (n, p)) if n in ren: vod.setAll() myscreen.render() time.sleep(delay) writeFrame(w2if, lwr, nf) nf = nf + 1 # GENERATOR # """ vertexRadius = float(far) / float(100) gp = scale * p gen_actor = ovdvtk.Sphere(center=(gp.x, gp.y, 0), radius=vertexRadius, color=ovdvtk.yellow) if n in ren: myscreen.addActor(gen_actor) myscreen.render() time.sleep(delay) writeFrame(w2if, lwr, nf) nf = nf + 1 # """ # SEED # """ sv = scale * vd.getSeedVertex(p) print(" seed vertex is %s" % sv) seed_actor = ovdvtk.Sphere(center=(sv.x, sv.y, 0), radius=vertexRadius,