from visual import * from visual.text import * import random #1 draw 2 axis. xaxis = arrow(pos=(0,0), axis=(1,0), shaftwidth=0.01) yaxis = arrow(pos=(0,0), axis=(0,1), shaftwidth=0.01) # Work only for capital letters. It will print * for other letters xtex = text(pos=(1,0), string='X', color=color.red, height=0.08, width=0.08, justify='center') ytex = text(pos=(0,1), string='Y', color=color.green, height=0.06, width=0.06, justify='center') #1 offsets curve for parabola step = 0.01 a=1 #draw base curve t=arange(-a, a+step, step) curve(x=t, y=t**2) #draw offset curve #1 Draw one offset #2 Draw all offsets