MATLAB Answers

Samuel  Pedro

How can I create a triangulated sphere using 'isosurface' function of MATLAB

Asked by Samuel Pedro
on 2 Apr 2013

down vote favorite How can I create a Triangulated sphere with faces of triangles with the same area each one.

I want something like this,

and I searched and I saw I could use the function isosurfaceof MATLAB, but the triangles are not equal and the are essestially squares divided in two with the square diagonal.

here's my code:

>> [X,Y,Z] = meshgrid(-10:10,-10:10,-10:10);
>> V = sqrt(X.^2+Y.^2+Z.^2);
>> fv = isosurface(X,Y,Z,V)
>> p = patch(fv);
>> set(p,'EdgeColor','g')

and the result is below:

  1 Comment

The area of a triangle depends on the 3 points of it. So if your data points are not uniformly distributed, then you shall not expect triangles of the same size.

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!