MATLAB Answers

Plot a circle onto a 3d graph

136 views (last 30 days)
PenguinForce on 4 Sep 2017
Answered: Image Analyst on 13 Sep 2021
If I wanted to plot a filled in black circle at a specific coordinate, with no specific radius, say at x = 50, y= 55, z =60, how would I go about doing this? I want to use the plot3 function but that is as far as I can get.
plot3(50,55, 60);

Accepted Answer

KSSV on 4 Sep 2017
C = [50,55, 60] ; % center of circle
R = 1. ; % Radius of circle
teta=0:0.01:2*pi ;
y=C(2)+R*sin(teta) ;
z = C(3)+zeros(size(x)) ;
hold on
  1 Comment
PenguinForce on 4 Sep 2017
Thank you for helping me. I tried doing something similar to this earlier but I didn't think about using the patch function

Sign in to comment.

More Answers (1)

Image Analyst
Image Analyst on 13 Sep 2021
Try this:

Community Treasure Hunt

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

Start Hunting!