The program below is of two circles in the design of a simple ear-ring: baasically a large circle with a circle of varying radius removed. I have tried to display the animation with the position of the centreof mass, but the animation is too fast and "jittery". I'd like to slow the animation down to better see if my calculations are correct. Is there some way of doing this, other than the Animation/Slower/Faster keys?.
restart:
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Earing Two circles
# A small circle (sc) of radius r, is drawn inside and tangential to
# a bigger circle,(bc), of radius R. The origin (0,0) is at the bottom of
# the big circle. The small circle is removed to obatain a shape in the
# form of an earing. x_bar is the distance from the origin of the
# centroid.
# When the centroid is on the circumference of the small circle then the
# ratio R/r = the golden ratio 1.645(?)
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
with(plots):
with(plottools):
Digits:=4:
R:=20:
#r:=10:
#circles
#sc := disk([0,2*R-r], r, color=white): #in for loop
bc := disk([0,R], R, color=red):
for r from 1 by 1 to R do
x_bar:=eval((R^2+R*r-r^2)/(R+r)):
printf("x_bar =%4.2f R/r =%5.3f\n", x_bar, R/r);
sc[r] := disk([0,2*R-r], r, color=white):
Pt[r]:=point([0,x_bar],color=black):
#plots[display](sc,bc, scaling =constrained);
#t1[r]:=textplot([4*R/3,4*R/3,cat("xbar",convert(x_bar, string))]):
Rat:=R/r:
t1[r]:=textplot([4*R/3,4*R/3,convert(x_bar, float)]): t2[r]:=textplot([2*R,4*R/3,convert(Rat, float)] ):
p[r]:= plots[display](Pt[r],sc[r],t1[r],t2[r],bc ):
end do:
#for loop to give individual images
#for r from 1 to R do
plots[display]({seq(p[r], r=1..R)}, scaling=constrained,axes=none,insequence=true);
#animate({seq(p[r], r=1..R)},t=1..4, scaling=constrained,axes=none); #,frames=50);
#plots[display]({p[r]},scaling=constrained,axes=none,insequence=true);
#end do;