Equal area Delaunay-triangulated sphere

8 views (last 30 days)
I currently have this hemisphere but would like to have it constructed of equivalent triangles for use with the DelaunayTriangulation function:
[x,y,z] = sphere;
x = x(11:end,:);
y = y(11:end,:);
z = z(11:end,:);
r = 1;
tri = delaunay(x,y);
trisurf(tri,x,y,z);
axis equal
How would I generate x, y, and z coordinates to get a sphere with equivalent triangles using the DelaunayTriangulation function? I would like to use DelaunayTriangulation instead of delaunay, in order to use the faceNormal function.

Accepted Answer

KSSV
KSSV on 20 Nov 2018
[x,y,z] = sphere;
x = x(11:end,:);
y = y(11:end,:);
z = z(11:end,:);
r = 1;
% tri = delaunay(x,y);
dt = delaunayTriangulation(x(:),y(:)) ;
F = scatteredInterpolant(x(:),y(:),z(:),'nearest','none') ;
%
p = dt.Points ;
tri = dt.ConnectivityList ;
z = F(p(:,1),p(:,2)) ;
%
x = p(:,1) ; y = p(:,2) ;
trisurf(tri,x,y,z);
axis equal

More Answers (1)

Bruno Luong
Bruno Luong on 20 Nov 2018

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!