| | |
Circles .... Locus...
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Feb 2006
Posts: 50
Reputation:
Solved Threads: 5
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
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
So just add the centre (cx,cy) to your calculations
C++ Syntax (Toggle Plain Text)
r * cos(theta) + cx; r * sin(theta) + cy;
•
•
Join Date: May 2004
Posts: 178
Reputation:
Solved Threads: 10
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.
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.
![]() |
Similar Threads
- Any recommendations on good Flash books? (Graphics and Multimedia)
- Document Root paths and circles (Search Engine Optimization)
- Two red circles with X (Viruses, Spyware and other Nasties)
- Loops (C++)
Other Threads in the C++ Forum
- Previous Thread: Switching C++ programs
- Next Thread: i need help with this code..
| Thread Tools | Search this Thread |
api array arrays based beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion count delete deploy desktop directshow dll download dynamic dynamiccharacterarray encryption error file forms fstream function functions game getline givemetehcodez google graph gui homeworkhelp homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg string strings struct temperature template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets







)