how to generate image of spherical object ?

5 views (last 30 days)
i need spherical object in 2d matrix image, i have an example
m=1000;
n=1000;
%object
[X,Y,Z]=peaks;
Z1=imresize(Z,[m,n]);
figure,imshow(Z1,[])
here image shows peaks in 3D and similarly i need a sphere.

Accepted Answer

KSSV
KSSV on 10 Jul 2017
[X,Y,Z]=sphere;
surf(X,Y,Z) ;
doc sphere

More Answers (0)

Categories

Find more on Image Processing Toolbox 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!