Skip to Main Content Skip to Search
Product Documentation

plot::Ellipse2dellipses in 2D

plot::Ellipse3dellipses in 3D

plot::Ellipse2d(r1, r2, [c_x, c_y]) creates a 2D ellipse with center point [c_x, c_y] and semi-axes of lengths r1 and r2 for the horizontal and the vertical axis, respectively.

plot::Ellipse3d(r1, r2, [c_x, c_y, c_z], [n_x, n_y, n_z]) creates a 3D ellipse with center point [c_x, c_y, c_z] and semi-axes of lengths r1 and r2 in the plane with the normal vector [n_x, n_y, n_z].

→ Examples

Calls:

plot::Ellipse2d(r1, r2, <[cx, cy]>, <a = amin .. amax>, Options)

plot::Ellipse3d(r1, r2, <[cx, cy, cz], <[cx, cy, nz]>>, <a = amin .. amax>, Options)

Parameters:

r1, r2

the semi-axes of an ellipse. They must be real numerical values or arithmetical expressions of the animation parameter a
r1, r2 are equivalent to the attributes SemiAxisX, SemiAxisY.

cx, cy, cz

the center. The coordinates cx, cy, cz must be real numerical values or arithmetical expressions of the animation parameter a. If no center is specified, the ellipse is centered at the origin. 
cx, cy, cz are equivalent to the attribute Center.

nx, ny, nz

the normal vector. The coordinates nx, ny, nz must be real numerical values or arithmetical expressions of the animation parameter a. If no normal vector is specified, the ellipse is created in the xy-plane. 
nx, ny, nz are equivalent to the attribute Normal.

See Also:

plot, plot::Arc2d, plot::Arc3d, plot::Circle2d, plot::copy

Details:

Example 1

We create a plot of an ellipse with center point (1, 1) and semi-axes of lengths 3 and 1:

ellipse := plot::Ellipse2d(3, 1, [1, 1]):
plot(ellipse)

MuPAD graphics

We apply a rotation:

plot(ellipse, plot::Rotate2d(PI/4, [1, 1], ellipse))

MuPAD graphics

delete ellipse:

Example 2

We plot an animated 3D ellipse:

plot(plot::Ellipse3d(1, 1, [0,0,0], [0,a,1-a], a = 0..1))

MuPAD graphicsimage

Example 3

We plot a colored 3D ellipse:

plot(plot::Ellipse3d(2, 1, [0,0,0], Filled,
     LineColor=RGB::Yellow, LineColor2=RGB::Red, LineColorType = Dichromatic, FillColorDirection=[+1,0,0],
     FillColor=RGB::Yellow, FillColor2=RGB::Red, FillColorType = Dichromatic, FillColorDirection=[-1,0,0]
))

MuPAD graphics

  


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