Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Does this give you a clue?

def move(a):
    t=var('t')
    p1=Graphics()
    p2=Graphics()
    v = []
    p1 =parametric_plot((t,t*a),(t,-5,5),color="red")
    p2 =parametric_plot((t*a,t),(t,-5,5),color="blue")
    v.append(p1+p2)
    return v

animate([move(a) for a in srange(-5,5,1)], xmin=-2,ymin=-2,xmax=2,ymax=2,figsize=[2,2]).show()

Is this what you want to achieve? I'm not sure.

def move(i):
    p1=Graphics()
    p2=Graphics()
    p1 += parametric_plot((t,i),(t,-5,5),color="red")
    p2 += parametric_plot((i,t),(t,-5,5),color="blue")
    return p1+p2

animate([move(i) for i in srange(-5,5,1)]).show()