MATLAB Answers

2D Circle 3D Plot.

333 views (last 30 days)
reza
reza on 31 Dec 2013
Answered: Image Analyst on 13 Sep 2021
Hello, How can i draw a circle in a 3d plot? thanks,

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 31 Dec 2013
Edited: Azzi Abdelmalek on 31 Dec 2013
r=1
teta=-pi:0.01:pi
x=r*cos(teta);
y=r*sin(teta)
plot3(x,y,zeros(1,numel(x)))
  6 Comments
Tong Zhao
Tong Zhao on 13 Sep 2021
The next question would be, how to draw a filled circle in 3D, parallel to say, x-y plane.
OK. I found an answer using patch at this thread.

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 13 Sep 2021
Try this:
ellipsoid(0,-0.5,0.5,6,3.25,0.01)
zlim([0,1]);

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!