• Advertisement
Sign in to follow this  

how to draw a 3d circle around a known point on a line segment .

This topic is 2928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

http://i.imgur.com/SkKwT.png The image above illustrates my problem.I have a line AB and a point C on it, A,B,C are known values, i need to draw a circle with center on point C.The circle containing plane is perpendicular to the given line. i know the equation of circle in 3d would be P = C + R cos(A) U + R sin(A) V but i don't know how to get U and V here as no point on the outline of circle is known.. thank you. [Edited by - ohsin on February 11, 2010 7:38:13 AM]

Share this post


Link to post
Share on other sites
Advertisement
If you know the distance of the plane to the origin you can calculate 2 points on the plane and generate a normal vector on the plane, multiplying this normal with your circle radius and adding it to center of your circle should give you a point on the circle.

Share this post


Link to post
Share on other sites
This thread might prove useful. You need to find a length-one vector perpendicular to (B-A). Call it U. Then you can easily find V as the normalized cross product of U and (B-A).

Share this post


Link to post
Share on other sites
i googled a bit more and found this link
http://newsgroups.derkeiler.com/Archive/Comp/comp.graphics.algorithms/2005-10/msg00267.html

Now i am drawing an ellipse instead of a circle using code from the link
..close yet far...

Share this post


Link to post
Share on other sites
Assuming you have the distance to the plane all you need is the plane equation: Ax + By + Cz + D = 0 with A, B and C being your plane's normal, D being the distance to the plane and x,y and z being any point on the plane. Once you have a point on the plane use the center of your circle and subtract the newly found point from that and normalize it, this gives you your U or V. Then use a cross product on either U or V with the normal of the plane and the result will be your U or V.

Share this post


Link to post
Share on other sites
SUCCESS!!!!!! :D

YAY! Mussi i did exactly what you told me and first i drew ellipses then i normalised V as well and VOILA circles!! i love circles!!

Thank you all for helping. :-)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement