主要内容

revolve

R2026b

Revolve 2-D geometry into rotational extrusion or helix

Since R2026b

    Description

    g3D = revolve(g2D) creates a 3-D geometry g3D by sweeping the 2-D geometry g2D by 360 degrees around the z-axis.

    example

    g3D = revolve(g2D,angle) sweeps the 2-D geometry g2D by the specified angle starting at the x-axis and winding counterclockwise, according to the "right-hand rule" convention.

    example

    g3D = revolve(___,Pitch=n) creates a helix by combining rotation and linear translation, using any of the input argument combinations in the previous syntaxes. The helix starts at the xz-plane. The function creates:

    • A right-handed helix if the pitch value is positive

    • A left-handed helix if the pitch value is negative

    • A full or partial rotational extrusion if the pitch value is 0

    example

    Examples

    collapse all

    Create and plot a geometry representing a unit circle. Translate the geometry to the right so that the circle is entirely in the right half of the coordinate plane.

    g2D = fegeometry(@circleg);
    g2D = translate(g2D,[3,0]);
    pdegplot(g2D)

    2D circle cross-section centered at (3, 0) with radius 1

    Create a 3-D solid by sweeping the circle by 360 degrees around the z-axis.

    g3D = revolve(g2D);
    pdegplot(g3D)

    3D torus created by full rotational extrusion of circle

    Create a partial rotational extrusion by sweeping the circle by 270 degrees around the z-axis.

    g3D = revolve(g2D,270);
    pdegplot(g3D)

    Partial torus from 270-degree rotational extrusion with open ends

    Create a right-handed helix by specifying a positive pitch value.

    g3D = revolve(g2D,360*5,Pitch=5);
    pdegplot(g3D)

    3D helical extrusion spiraling upward, z from 0 to 25

    Create a left-handed helix by specifying a negative pitch value.

    g3D = revolve(g2D,360*5,Pitch=-5);
    pdegplot(g3D);

    3D helical extrusion spiraling downward, z from 0 to -30

    Input Arguments

    collapse all

    2-D geometry to revolve around the z-axis, specified as an fegeometry object. The geometry must be entirely in the right half of the coordinate plane.

    Revolution angle, specified as a positive number.

    Pitch value, specified as a real number. If the pitch value is positive, the resulting 3-D geometry is a right-handed helix. If the value is negative, the geometry is a left-handed helix. If the value is 0, the geometry is a full or partial rotational extrusion.

    Output Arguments

    collapse all

    3-D rotational extrusion or helix, returned as an fegeometry object.

    Version History

    Introduced in R2026b