animation of hypocycloid in sage

asked 2018-10-31 02:31:55 +0200

anonymous user

Anonymous

updated 2018-10-31 10:40:23 +0200

tmonteil gravatar image

Hey All, Basically I have an assignment for a college sage class. I need to make a hypocycloid animation with basic sage commands. Here is what I have so far:

sage: crank = circle((0,0),1/3, color='black')
crank.show(xmin=-5,xmax=5,ymin=-5,ymax=5)

sage: movingcircle = [circle((3*cos(2*k*pi/10),3*sin(-2*k*pi/10)), 1/5, color='black') for k in range(10)]
mcani = animate(movingcircle,xmin=-5,xmax=5,ymin=-5,ymax=5)
mcani.show()

Sage: candmcani = [crank+mcani[k] for k in range(10)]
acandmcani = animate(candmcani,xmin=-5,xmax=5,ymin=-5,ymax=5)
acandmcani.show()

I am stuck here. How am I supposed to create a hypocyloid animation like this: Here is the end product that is needed: and

Basically need the commands and a few frames. I understand the idea, and its pretty cool, but am stuck at the circles part. How am I supposed to make those joints?

edit retag flag offensive close merge delete