how can I plot some of 3D points (x,y,z) on a surface of a sphere

4 views (last 30 days)
how can i plot these 3d points (x,y,z) ?
( 1,0,0)
(-1, 0,0)
( 0,0,1)
(0 ,0,-1)
(0.707, 0.707,0)
(0.707, -0.707, 0)
(-0.707, -0.707, 0)
(-0.707, 0.707, 0)
(0.707, 0, 0.707)
(0.707, 0 , -0.707)
( -0.707, 0, 0.707)
( -0.707, 0 , -0.707)
(0 , 0.707, 0.707)
( 0 , 0.707, -0.707)
(0, -0.707, 0.707)
(0 -0.707, -0.707)

Accepted Answer

Walter Roberson
Walter Roberson on 13 Jul 2022
xyz = [
1,0,0
-1, 0,0
0,0,1
0 ,0,-1
0.707, 0.707,0
0.707, -0.707, 0
-0.707, -0.707, 0
-0.707, 0.707, 0
0.707, 0, 0.707
0.707, 0 , -0.707
-0.707, 0, 0.707
-0.707, 0 , -0.707
0 , 0.707, 0.707
0 , 0.707, -0.707
0, -0.707, 0.707
0 -0.707, -0.707];
sphere
axis equal
hold on
scatter3(xyz(:,1), xyz(:,2), xyz(:,3), 'r*')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!