Main Content

getShapeVertices

Find shape vertices

Since R2023b

    Description

    p = getShapeVertices(shape) returns all the vertices used to create the input shape as a n-by-3 matrix of Cartesian coordinates.

    example

    Examples

    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
    
    

    Input Arguments

    collapse all

    Shape to find the vertices, specified as a 2-D or 3-D shape object from the Custom 2-D and 3-D Antenna objects.

    Example: antenna.Rectangle

    Example: shape.Circle

    Example: shape.Sphere

    Output Arguments

    collapse all

    Shape vertices, returned as a n-by-3 matrix of Cartesian coordinates.

    Version History

    Introduced in R2023b