Circles .... Locus...

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2006
Posts: 50
Reputation: ultra vires is an unknown quantity at this point 
Solved Threads: 5
ultra vires ultra vires is offline Offline
Junior Poster in Training

Circles .... Locus...

 
0
  #1
Jul 29th, 2006
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Circles .... Locus...

 
0
  #2
Jul 29th, 2006
So just add the centre (cx,cy) to your calculations
  1. r * cos(theta) + cx;
  2. r * sin(theta) + cy;
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 50
Reputation: ultra vires is an unknown quantity at this point 
Solved Threads: 5
ultra vires ultra vires is offline Offline
Junior Poster in Training

Re: Circles .... Locus...

 
0
  #3
Jul 29th, 2006
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.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 178
Reputation: jim mcnamara is on a distinguished road 
Solved Threads: 10
jim mcnamara jim mcnamara is offline Offline
Junior Poster

Re: Circles .... Locus...

 
0
  #4
Jul 29th, 2006
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC