def ttt_segments(text, scale): wr = ttt.SEG_Writer() # wr.scale = 3 wr.arc = False wr.conic = False wr.cubic = False wr.scale = float(1) / float(scale) # "L" has 36 points by default wr.conic_biarc_subdivision = 10 # this has no effect? wr.conic_line_subdivision = 50 # =10 increasesn nr of points to 366, = 5 gives 729 pts wr.cubic_biarc_subdivision = 10 # no effect? wr.cubic_line_subdivision = 10 # no effect? s3 = ttt.ttt(text, wr) segs = wr.get_segments() return segs if __name__ == "__main__": segs = ttt_segments("EMC2", 20000) segs = translate(segs, -0.36, -0.05) segs = modify_segments(segs) vd = ovd.VoronoiDiagram(1, 120) insert_many_polygons(vd, segs) filename = "svg_test.svg" ovd.vd2svg(filename, vd) print "wrote to file %s" % filename print "PYTHON All DONE."
return [pt_time, seg_time] def ttt_segments(text, scale): wr = ttt.SEG_Writer() # wr.scale = 3 wr.arc = False wr.conic = False wr.cubic = False wr.scale = float(1) / float(scale) # "L" has 36 points by default wr.conic_biarc_subdivision = 10 # this has no effect? wr.conic_line_subdivision = 50 # =10 increasesn nr of points to 366, = 5 gives 729 pts wr.cubic_biarc_subdivision = 10 # no effect? wr.cubic_line_subdivision = 10 # no effect? s3 = ttt.ttt(text, wr) segs = wr.get_segments() return segs if __name__ == "__main__": segs = ttt_segments("EMC2", 20000) segs = translate(segs, -0.36, -0.05) segs = modify_segments(segs) vd = ovd.VoronoiDiagram(1, 120) insert_many_polygons(vd, segs) ovd.vd2svg("svg_test.svg", vd) print "PYTHON All DONE."
return [pt_time, seg_time] def ttt_segments(text,scale): wr = ttt.SEG_Writer() # wr.scale = 3 wr.arc = False wr.conic = False wr.cubic = False wr.scale = float(1)/float(scale) # "L" has 36 points by default wr.conic_biarc_subdivision = 10 # this has no effect? wr.conic_line_subdivision = 50 # =10 increasesn nr of points to 366, = 5 gives 729 pts wr.cubic_biarc_subdivision = 10 # no effect? wr.cubic_line_subdivision = 10 # no effect? s3 = ttt.ttt(text,wr) segs = wr.get_segments() return segs if __name__ == "__main__": segs = ttt_segments( "EMC2", 20000) segs = translate(segs, -0.36, -0.05) segs = modify_segments(segs) vd = ovd.VoronoiDiagram(1,120) insert_many_polygons(vd,segs) ovd.vd2svg("svg_test.svg",vd) print "PYTHON All DONE."