What are the obs values in this spherical surface equation?
Show older comments
Hi all
I have this code for a spherical surface generation. One thing I do not understand is that I don't get what the obs values do in the equation of the sphere. Then why should we multiply the X by R ? The other question is what is the axis equal ?
obs = [-0.025;-0.55;0.8];
plot3(points(1,:),points(2,:),points(3,:), 'o','Color','r','MarkerSize',5);
[X,Y,Z] = sphere;
R = 0.35;
X = R*X;
Y = R*Y;
Z = R*Z;
surf(X+obs(1),Y+obs(2),Z+obs(3));
axis equal;
Accepted Answer
More Answers (1)
Walter Roberson
on 12 Nov 2022
1 vote
obs is the center of the sphere.
sphere() returns coordinates for a unit sphere. You then scale them by the radius of the sphere, R.
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

