function [c4n,n4e,Db,Nb] = triang_can(ref)
c4n = [zeros((ref+1)*6,1), zeros((ref+1)*6,1), linspace(0,0.168,6*(ref+1))'];
xx = zeros((ref+1)*6,1);
yy = zeros((ref+1)*6,1);
zz = linspace(0,0.168,6*(ref+1))';
for i=1:ref+1
    [x,y,z] = cylinder(i/(ref+1)*0.0335*ones(6*(ref+1),1),6*i);
    z = z*0.168;
    x(:,end) = []; y(:,end) = []; z(:,end) = [];
    c4n = [c4n;x(:),y(:),z(:)];
end
n4e = delaunayTriangulation(c4n);
Db = n4e.convexHull;
Db
n4e = n4e.ConnectivityList;
%n4e

Nb = [];
