Sign in to follow this  
ohsin

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

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
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this