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

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

## 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 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 on other sites
Thank you for replying i will try this as soon as i can .

##### 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 on other sites
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 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 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. :-)

1. 1
2. 2
3. 3
4. 4
Rutin
16
5. 5

• 12
• 9
• 12
• 37
• 12
• ### Forum Statistics

• Total Topics
631419
• Total Posts
2999981
×