944,141 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1778
  • C++ RSS
Jul 29th, 2006
0

Circles .... Locus...

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 5
Junior Poster in Training
ultra vires is offline Offline
50 posts
since Feb 2006
Jul 29th, 2006
0

Re: Circles .... Locus...

So just add the centre (cx,cy) to your calculations
C++ Syntax (Toggle Plain Text)
  1. r * cos(theta) + cx;
  2. r * sin(theta) + cy;
Team Colleague
Reputation Points: 5862
Solved Threads: 950
Posting Sage
Salem is offline Offline
7,164 posts
since Dec 2005
Jul 29th, 2006
0

Re: Circles .... Locus...

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....
Last edited by ultra vires; Jul 29th, 2006 at 9:13 am.
Reputation Points: 10
Solved Threads: 5
Junior Poster in Training
ultra vires is offline Offline
50 posts
since Feb 2006
Jul 29th, 2006
0

Re: Circles .... Locus...

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.
Last edited by jim mcnamara; Jul 29th, 2006 at 7:52 pm.
Reputation Points: 62
Solved Threads: 10
Junior Poster
jim mcnamara is offline Offline
179 posts
since May 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Switching C++ programs
Next Thread in C++ Forum Timeline: i need help with this code..





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC