how to get points inside a cone ?

3 次查看(过去 30 天)
Hello all , I have a conical section which is hollow and having variable radius and height . how to get all points inside the cone so that I can make it filled cone . I used this code -
r1=input('enter radius');
r=r1:-0.5:0;
[xc,yc,zc] = cylinder(r);
h=input('enter ht');
zc=zc*h;
figure(1)
surf(xc,yc,zc,'Facecolor','w');
grid on
axis equal

采纳的回答

Walter Roberson
Walter Roberson 2015-11-24
There are an infinite number of points inside a cone.
To make a 3D object "filled", normally you just use opaque faces to draw it.
  6 个评论
yogesh jain
yogesh jain 2016-2-19
and if I know starting and ending points of cone , then ? Means it is not in generic way .
M.S. Khan
M.S. Khan 2020-8-18
Hi Dr. Walter Roberson, can i consider your code as a point cloud of the cone.
Regards,
M. Shafiq

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 3-D Scene Control 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by