What are the obs values in this spherical surface equation?
Mostra commenti meno recenti
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;
Risposta accettata
Più risposte (1)
Walter Roberson
il 12 Nov 2022
1 voto
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.
Categorie
Scopri di più su Surface and Mesh Plots in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


