def main(args): for i in range(args.nframes): morph = i / float(args.nframes - 1) filename = os.path.join(args.outdir, 'frame%04d.tikz' % i) with open(filename, 'w') as fout: print 'writing', filename arr = [] # add the remark about the invocation of the generating script arr.append('% ' + ' '.join(sys.argv)) # add the color definitions for name, rgb in color.wolfram_name_color_pairs: arr.append(tikz.define_color(name, rgb)) # add the tikz arr.append(get_tikzpicture_body(args.ncurves, args.nsegs, morph)) print >> fout, '\n'.join(arr)
def main(args): for i, sample in enumerate(interlacesample.get_samples()): filename = os.path.join(args.outdir, 'sample-%04d.tikz' % i) with open(filename, 'w') as fout: print 'writing', filename arr = [] # add the remark about the invocation of the generating script arr.append('% ' + ' '.join(sys.argv)) # add the commands to define custom colors for name, rgb in color.wolfram_name_color_pairs: arr.append(tikz.define_color(name, rgb)) # add the tikz drawing functions arr.append(get_tikz_pane(sample)) # write the file print >> fout, '\n'.join(arr)
def main(args): for i, sample in enumerate(interlacesample.get_samples()): filename = os.path.join(args.outdir, "sample-%04d.tikz" % i) with open(filename, "w") as fout: print "writing", filename arr = [] # add the remark about the invocation of the generating script arr.append("% " + " ".join(sys.argv)) # add the commands to define custom colors for name, rgb in color.wolfram_name_color_pairs: arr.append(tikz.define_color(name, rgb)) # add style definitions for the trees arr.extend(get_tikz_style_definitions()) # add the tikz drawing functions arr.append(get_tikz_pane(sample, args.width, args.height)) # write the file print >> fout, "\n".join(arr)