MATLAB 帮助中心
Find shape vertices
Since R2023b
p = getShapeVertices(shape)
p = getShapeVertices(shape) returns all the vertices used to create the input shape as a n-by-3 matrix of Cartesian coordinates.
p
shape
example
collapse all
Find the vertices used to construct a box.
Create a box centered at origin with length 2 m and width 1 m. Find its vertices.
box = shape.Box(Length=2,Width=1); p = getShapeVertices(shape.Box)
p = 8×3 -0.5000 -1.0000 -1.0000 -0.5000 1.0000 -1.0000 0.5000 -1.0000 -1.0000 0.5000 1.0000 -1.0000 -0.5000 -1.0000 1.0000 -0.5000 1.0000 1.0000 0.5000 -1.0000 1.0000 0.5000 1.0000 1.0000
Shape to find the vertices, specified as one of the following objects:
2-D shapes without material properties:
antenna.Circle
antenna.Ellipse
antenna.Polygon
antenna.Rectangle
antenna.Triangle
2-D and 3-D shapes with material properties:
shape.Circle
shape.Ellipse
shape.Rectangle
shape.Polygon
shape.Box
shape.OpenBox
shape.Cylinder
shape.OpenCylinder
shape.Sphere
shape.Custom3D
Example: antenna.Rectangle
Example: shape.Circle
Example: shape.Sphere
Shape vertices, returned as a n-by-3 matrix of Cartesian coordinates.
Introduced in R2023b
triangulation
mesh
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处