Skip to Main Content Skip to Search
Product Documentation

plot::Sweepsweep surface from the deformation of a 3D curve

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 (x_1(u), y_1(u), z_1(u)) to its projection (x_1(u), y_1(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 (x_1(u), y_1(u), z_1(u)) to the parameterized curve (x_2(u), y_2(u), z_2(u)).

→ Examples

Calls:

plot::Sweep([x1, y1, z1], <Ground = g>, u = `u_{min}` .. `u_{max}`, <a = amin .. amax>, Options)

plot::Sweep(A1, <Ground = g>, u = `u_{min}` .. `u_{max}`, <a = amin .. amax>, Options)

plot::Sweep(C1, <Ground = g>, Options)

plot::Sweep([x1, y1, z1], [x2, y2, z2], u = `u_{min}` .. `u_{max}`, <a = amin .. amax>, Options)

plot::Sweep(A1, A2, u = `u_{min}` .. `u_{max}`, <a = amin .. amax>, Options)

plot::Sweep(C1, C2, Options)

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.

`u_{min}`, `u_{max}`

real-valued expressions (possibly in the animation parameter). 
`u_{min}`, `u_{max}` 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” [x_1, y_1, z_1], C2 provides the “target curve” [x_2, y_2, z_2].

See Also:

plot, plot::copy, plot::Curve3d, plot::Hatch, plot::Polygon3d, plot::Surface

Details:

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

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])

MuPAD graphics

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])

MuPAD graphics

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)

MuPAD graphics

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)

MuPAD graphics

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)

MuPAD graphics

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))

MuPAD graphicsimage

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS