How to draw circle in a 3D space?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
0 votes
Share a link to this question

- Using line P1P5 as the diameter
- Using the mid point of line P1P5 as the center
- P6 and P8 are points only used for deciding the location of the planes, P6 and P8 does not necessarily need to be contained in the circles. They could be outside of the circles.
Accepted Answer
0 votes
Share a link to this answer
https://uk.mathworks.com/matlabcentral/answers/481689-how-to-draw-circle-in-a-3d-space#answer_393123
10 Comments
Share a link to this comment
Share a link to this comment







- I guess the sizes of red circle and green circle won't be the same (different radius values)?
- Why do we need the green circle in order to draw the red circle?
- Why do we need v1 = cross(P6 - P1, P5 - P1); and why do we need to move the center using quiver3(C0(1),C0(2), C0(3), v1(1), v1(2), v1(3))?
- About the rotationMatrix function you wrote, R = rotationMatrix(P0,Pz,Px) INPUT: 'P0': system origin; 'Pz': point on z-axis; 'Px': point on x-axis; R1 = rotationMatrix(C0, C0 + v1, P5); why Pz = C0 + v1 and why Px = P5?
- What is the equation of the red circle? Pc1 = P*R1' + C0? What is the equation of the red circle in terms of variables R G B? Because the purpose of this whole thing is trying to select points that are evenly distributed on the circumpherence of this red circle.

Share a link to this comment
Share a link to this comment
- the origin O' is in C0 (P0 = C0)
- the z' axis is along the v1 vector. Accordingly, a point along z' is Pz = C0+v1
- the x' and y' axes are on the plane orthogonal to v1. In this case the position of the x' axis is not important; for simplicity I decided to align x' with the line passing from P5-C0, so a point along the x' axis is Px = P5;
Share a link to this comment
- x' and y' are in the same plane as the red circle while axis x' is perpendicular to axis y'.
- z' is orthogonal to plane x'y'.
Share a link to this comment
Share a link to this comment
Share a link to this comment
More Answers (1)
0 votes
Share a link to this answer
https://uk.mathworks.com/matlabcentral/answers/481689-how-to-draw-circle-in-a-3d-space#answer_393155
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Tags
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)