plot::Sweep

Sweep surface from the deformation of a 3D curve

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

plot::Sweep([x1, y1, z1], <Ground = g>, u = umin .. umax, <a = amin .. amax>, options)
plot::Sweep(A1, <Ground = g>, u = umin .. umax, <a = amin .. amax>, options)
plot::Sweep(C1, <Ground = g>, options)
plot::Sweep([x1, y1, z1], [x2, y2, z2], u = umin .. umax, <a = amin .. amax>, options)
plot::Sweep(A1, A2, u = umin .. umax, <a = amin .. amax>, options)
plot::Sweep(C1, C2, options)

Description

plot::Sweep([x_1(u), y_1(u), z_1(u)], u = `u_{min}`..`u_{max}`) creates the surface swept out by the (linear) deformation of the parameterized curve (x1(u), y1(u), z1(u)) to its projection (x1(u), y1(u), 0) to the x-y-plane.

plot::Sweep([x_1(u), y_1(u), z_1(u)], [x_2(u), y_2(u), z_2(u)], u = `u_{min}`..`u_{max}`) creates the surface swept out by the (linear) deformation of the parameterized curve (x1(u), y1(u), z1(u)) to the parameterized curve (x2(u), y2(u), z2(u)).

plot::Sweep creates the parametrized surface

with the two surface parameters u (ranging from umin to umax) and v (ranging from 0 to 1). This is the linear deformation of the curve (x1(u), y1(u), z1(u)) defining one border of the surface to the curve (x2(u), y2(u), z2(u)) defining the other border of the surface.

If no “target curve” (x2(u), y2(u), z2(u)) is specified, the projection x2(u) = x1(u), y2(u) = y1(u), z2(u) = g of the “source curve” (x1(u), y1(u), z1(u)) to the x-y-plane with constant value z = g is used. The value g is set by the attribute Ground = g. The default value is g = 0.

When a target curve [x2(u), y2(u), z2(u)] is specified, the Ground attribute does not have any effect.

If the curves are specified by objects C1, C2 of type plot::Curve3d, the graphical attributes of the object created by plot::Sweep are copied from C1. The parametrization of C2 is automatically rewritten in terms of the curve parameter used in the definition of C1. This, however, will only work if the parametrization of C2 is defined by symbolic expressions.

Note

If the parametrization of C2 is defined by procedures, make sure that the parameter ranges of C1 and C2 coincide!

Attributes

AttributePurposeDefault Value
AdaptiveMeshadaptive sampling0
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
Colorthe main colorRGB::Black.[0.25]
DiscontinuitySearchsemi-symbolic search for discontinuitiesTRUE
Filledfilled or transparent areas and surfacesTRUE
FillColorcolor of areas and surfacesRGB::Red
FillColor2second color of areas and surfaces for color blendsRGB::CornflowerBlue
FillColorTypesurface filling typesDichromatic
FillColorFunctionfunctional area/surface coloring 
FillColorDirectionthe direction of color transitions on surfaces[0, 0, 1]
FillColorDirectionXx-component of the direction of color transitions on surfaces0
FillColorDirectionYy-component of the direction of color transitions on surfaces0
FillColorDirectionZz-component of the direction of color transitions on surfaces1
Framesthe number of frames in an animation50
Groundbase value0
Legendmakes a legend entry 
LegendTextshort explanatory text for legend 
LegendEntryadd this object to the legend?TRUE
LineColorcolor of linesRGB::Black.[0.25]
LineWidthwidth of lines0.35
LineColor2color of linesRGB::DeepPink
LineStylesolid, dashed or dotted lines?Solid
LineColorTypeline coloring typesFlat
LineColorFunctionfunctional line coloring 
LineColorDirectionthe direction of color transitions on lines[0, 0, 1]
LineColorDirectionXx-component of the direction of color transitions on lines0
LineColorDirectionYy-component of the direction of color transitions on lines0
LineColorDirectionZz-component of the direction of color transitions on lines1
Meshnumber of sample points25
Namethe name of a plot object (for browser and legend) 
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
PointSizethe size of points1.5
PointStylethe presentation style of pointsFilledCircles
PointsVisiblevisibility of mesh pointsFALSE
Submeshdensity of submesh (additional sample points)4
TimeEndend time of the animation10.0
TimeBeginstart time of the animation0.0
TimeRangethe real time span of an animation0.0 .. 10.0
Titleobject title 
TitleFontfont of object titles[" sans-serif ", 11]
TitlePositionposition of object titles 
TitleAlignmenthorizontal alignment of titles w.r.t. their coordinatesCenter
TitlePositionXposition of object titles, x component 
TitlePositionYposition of object titles, y component 
TitlePositionZposition of object titles, z component 
ULinesVisiblevisibility of parameter lines (u lines)TRUE
UMaxfinal value of parameter “u” 
UMeshnumber of sample points for parameter “u”25
UMininitial value of parameter “u” 
UNamename of parameter “u” 
URangerange of parameter “u” 
USubmeshdensity of additional sample points for parameter “u”4
VLinesVisiblevisibility of parameter lines (v lines)TRUE
VisiblevisibilityTRUE
VisibleAfterobject visible after this time value 
VisibleBeforeobject visible until this time value 
VisibleFromToobject visible during this time range 
VisibleAfterEndobject visible after its animation time ended?TRUE
VisibleBeforeBeginobject visible before its animation time starts?TRUE
XFunction1parametrization of the curves in sweep surfaces 
XFunction2parametrization of the curves in sweep surfaces 
YFunction1parametrization of the curves in sweep surfaces 
YFunction2parametrization of the curves in sweep surfaces 
ZFunction1parametrization of the curves in sweep surfaces 
ZFunction2parametrization of the curves in sweep surfaces 

Examples

Example 1

We deform a 3D spiral to its projection to the x-y-plane:

plot(plot::Sweep([u*cos(u), u*sin(u), u], u = 0..4*PI),
     CameraDirection = [90, 50, 120])

We use the Ground attribute to project the spiral to the x-y-plane with z = 9:

plot(plot::Sweep([u*cos(u), u*sin(u), u], u = 0..4*PI, Ground = 9),
     CameraDirection = [130, 60, 45])

Example 2

We deform a circle in the x-y-plane to a planar spiral:

plot(plot::Sweep([cos(u), sin(u), 0], [u*cos(u), u*sin(u), 0],
                 u = PI/3..7/3*PI), Scaling = Constrained)

With Filled = FALSE, only the lines are visible along which the mesh points of the curves are moved:

plot(plot::Sweep([cos(u), sin(u), 0], [u*cos(u), u*sin(u), 0],
                 u = PI/3..7/3*PI), Scaling = Constrained,
                 Filled = FALSE)

We increase the number of mesh points:

plot(plot::Sweep([cos(u), sin(u), 0], [u*cos(u), u*sin(u), 0],
                 u = PI/3..7/3*PI, Mesh = 50),
                 Scaling = Constrained, Filled = FALSE)

Example 3

We deform a circle to an animated point. The resulting sweep surface is an animated cone:

plot(plot::Sweep([cos(u), sin(u), 0], [a, 0, a],
                 u = 0..2*PI, a = 0..2))

Parameters

x1, y1, z1

The parametrization of the initial 3D curve: real-valued expressions in u (and possibly the animation parameter).

x1, y1, z1 are equivalent to the attributes XFunction1, YFunction1, ZFunction1.

x2, y2, z2

The parametrization of the “target curve”: real-valued expressions in u (and possibly the animation parameter).

x2, y2, z2 are equivalent to the attributes XFunction2, YFunction2, ZFunction2.

u

The curve parameter: an identifier or an indexed identifier.

u is equivalent to the attribute UName.

umin, umax

Real-valued expressions (possibly in the animation parameter).

umin, umax are equivalent to the attributes UMin, UMax.

g

Real-valued expression (possibly in the animation parameter).

g is equivalent to the attribute Ground.

A1, A2

matrices of category Cat::Matrix with three entries that provide the parametrizations x1, y1, z1 and x2, y2, z2, respectively.

C1, C2

Curves of type plot::Curve3d. C1 provides the “initial curve” [x1, y1, z1], C2 provides the “target curve” [x2, y2, z2].

a

Animation parameter, specified as a = amin..amax, where amin is the initial parameter value, and amax is the final parameter value.

See Also

MuPAD Functions

MuPAD Graphical Primitives