sage: npi = RDF(pi)
sage: xtreme = 3
sage: var('x,y')
(x, y)
sage: myaxe = line([[-xtreme,1],[xtreme,1]], color = 'black', zorder = 0)
sage: iplot = implicit_plot(9*y^4+10*x^2*y^2+x^4-12*y^3-12*x^2*y+4*y^2, (x,-2.5,2.5), (y,-0.1,1.1), plot_points=600, frame=False, zorder = 1)
sage: def traj(theta):
maC = circle((0,0), 1, color = 'black', zorder = 0)
p1 = [sin(theta), cos(theta)]
p2 = [1/2*(2*sin(theta) + sign(cos(theta/2))*sqrt(4*sin(theta)^2 + 8*cos(theta) + 8)), 1]
p3 = [p1[0]+1/2*(p2[0]-p1[0]), p1[1]+1/2*(p2[1]-p1[1])]
maL = line([p1,p2], color = 'magenta', zorder = 2)
map1 = point(p1, zorder = 3)
map2 = point(p2, zorder = 3)
map3 = point(p3, zorder = 3)
ma = myaxe + maC + iplot + maL + map1 + map2 + map3
return ma
sage: a = animate([traj(i) for i in srange(0, 4*npi, npi/30)], xmin = -xtreme, xmax = xtreme, ymin = -1.1, ymax = 1.1, figsize = [6, 2.2], axes = False)
sage: a.gif(savefile = "Line_Circle_Trajectory.gif", delay=10)