• Welcome! The new FreeMathHelp.com forum is live. We've moved from VB4 to Xenforo 2.1 as our underlying software. Hopefully you find the upgrade to be a positive change. Please feel free to reach out as issues arise -- things will be a little different, and minor issues will no doubt crop up.

Calculating a Circle's Angle by Seconds

Lotzi11

New member
Joined
Dec 20, 2017
Messages
2
I'm trying to draw a circle in C++ using the following formulas to determine each individual point of the circle.

x = cos(theta) * r
y = sin(theta) * r

This works fine, however I want to be able to draw the circle in a given time limit.

For example, I want a circle to be drawn in 6 seconds. So 60 degrees of the circle is drawn after 1 second, 120 degrees after 2 seconds, and we continue until the circle is completely drawn at 6 seconds.

How would I go about calculating the angles of the circle using the two formulas above?
 

tkhunny

Moderator
Staff member
Joined
Apr 12, 2005
Messages
9,697
I'm trying to draw a circle in C++ using the following formulas to determine each individual point of the circle.

x = cos(theta) * r
y = sin(theta) * r

This works fine, however I want to be able to draw the circle in a given time limit.

For example, I want a circle to be drawn in 6 seconds. So 60 degrees of the circle is drawn after 1 second, 120 degrees after 2 seconds, and we continue until the circle is completely drawn at 6 seconds.

How would I go about calculating the angles of the circle using the two formulas above?
It's not particularly clear what is wanted.
1) It appears that you already calculated the angles, 60 degrees, 120 degrees, etc.
2) Do you mean that you are going to draw some number of points to achieve 60 degrees in one second? How many points for the whole circle? Is that constant?
3) Will the total number of points change as r increases or decreases?

When you get rich off this game, will you donate to the website?
 

Lotzi11

New member
Joined
Dec 20, 2017
Messages
2
It's not particularly clear what is wanted. 1) It appears that you already calculated the angles, 60 degrees, 120 degrees, etc. 2) Do you mean that you are going to draw some number of points to achieve 60 degrees in one second? How many points for the whole circle? Is that constant? 3) Will the total number of points change as r increases or decreases? When you get rich off this game, will you donate to the website?
Yes, I want to draw some number of points that will achieve 60 degrees in one second. My idea is to be able to plug in any number of seconds so the formula can be versatile; 6 seconds was just an example for this question. So the total number of points will change depending on how many seconds go by. I want to be able to plug in any number so the circle can be drawn in any amount of time.

Also, I might donate if I can get this game on the shelves https://www.freemathhelp.com/forum/images/smilies/icon_cool.gif
 

tkhunny

Moderator
Staff member
Joined
Apr 12, 2005
Messages
9,697
You left one of my answers unanswered.

A 1" circle might take 5000 points to get all the way around.
A 2" circle might take 8000 points to get all the way around.
A 3" circle might take 12000 points to get ll the way around.

You must decide exactly what this relationship is.
 
Top