S
shawn bright
Hey there all,
I am using RMagick to draw some circles.
what i need though is a math formula to give me a pair of plot points
for an angle.
Say a circle is 40 x 40 on a sheet of graph paper.
this would put the center of the circle at x=20, y=20
and it would make the radius = 20.
now, i need to be able to pass in a number like say, 20 degrees and
return the x and y plots of this on the circle.
i know, more a math problem than ruby, but i could use any suggestions.
thanks,
shawn
I am using RMagick to draw some circles.
what i need though is a math formula to give me a pair of plot points
for an angle.
Say a circle is 40 x 40 on a sheet of graph paper.
this would put the center of the circle at x=20, y=20
and it would make the radius = 20.
now, i need to be able to pass in a number like say, 20 degrees and
return the x and y plots of this on the circle.
i know, more a math problem than ruby, but i could use any suggestions.
thanks,
shawn