954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Circles .... Locus...

My friend just gave me a c++ problem..
well the problem was to make small circles on circumfrence of a big circle that is positioned in the middle of screen...

well i can get that middle of screen by getmaxx()/2 ...
but all i can get to find locus of the circle is throught the formulas :
rcos(theta)
rsin(theta)

but this i suppose wrks only for circle having centre (0,0)..
so im kinda stuck here
any help would be appreciated

ultra vires
Junior Poster in Training
51 posts since Feb 2006
Reputation Points: 10
Solved Threads: 5
 

So just add the centre (cx,cy) to your calculations

r * cos(theta) + cx;
r * sin(theta) + cy;
Salem
Posting Sage
Team Colleague
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
 

but doesnt rcos(theta) and .... wrks only for that (0,0) circle ??

well let me try it out...will post back .. (currently wrkin with vb :) )

btw thnx a lot for replyin....

ultra vires
Junior Poster in Training
51 posts since Feb 2006
Reputation Points: 10
Solved Threads: 5
 

Not to inject extra complexity, but if you need to get those exterior circles to fit together into a nice ring, with each smaller circle touching it's neighbor and the circumference of the big one, then it's math time.
See the Soddy circle page on Mathworld:

http://mathworld.wolfram.com/SoddyCircles.html
Look for Bllew's work (3). Depending on the number of "excircles", it may simply to something easy like the Descartes Circle Theorem.

jim mcnamara
Junior Poster
180 posts since May 2004
Reputation Points: 62
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You