Changing the colour of one face of a sphere

4 views (last 30 days)
I want to generate a grey sphere but I want to change the color of only one face. The following code generates a sphere with all of its faces shaded grey.
rm = 1000*10^3;
[x y z] = sphere(100);
surf(rm*x,rm*y,rm*z, 'FaceColor', [0.5 0.5 0.5]);
Suppose that I want a specific face to be shaded another color that is located at some specific coordinate on the sphere, how could I do so?
Thanks in advance

Answers (1)

Walter Roberson
Walter Roberson on 12 Sep 2018
I suggest you see also warp()

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!