circles?
I swear I've looked everywhere for this!
How do i draw circles? I can't believe I must use a NURBS curve!
Excuse me for this newbie question...
[edited by - bacco on February 26, 2003 8:11:05 AM]
dont need NURBS.. u can perform an approximation of a circle using a simple set of cos/sin''s.. assuming u wanted to create a circle along the X-Y plane, u do the following to obtain the data points for the circles perimeter:
A will be the scale for the circle so that u can make circles larger than the unit size (1). theta must be in radians AND u shud loop thru and increment it over time to generate the full 0 to 2*PI radians. The more intervals u use for each subsequent point approximation will increase the accuracy of the circle''s representation at the cost of rendering time.
the trick is to get the ideal value to get the best of both worlds. approximating a circle with a polygon on 32 sides is a detailed enuf means of obtaining ur circle.
btw, use triangle strips to generate a solid circle, and line strips to generate a wireframed circle. if u dun get head or tail of this.. do ask again and if i''m around sometime soon, will try again.
x = A cos(theta);y = A sin(theta);
A will be the scale for the circle so that u can make circles larger than the unit size (1). theta must be in radians AND u shud loop thru and increment it over time to generate the full 0 to 2*PI radians. The more intervals u use for each subsequent point approximation will increase the accuracy of the circle''s representation at the cost of rendering time.
the trick is to get the ideal value to get the best of both worlds. approximating a circle with a polygon on 32 sides is a detailed enuf means of obtaining ur circle.
btw, use triangle strips to generate a solid circle, and line strips to generate a wireframed circle. if u dun get head or tail of this.. do ask again and if i''m around sometime soon, will try again.

- To learn, we share... Give some to take some -
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement