| Contents | Index |
plot::Circle2d(r, [x, y]) creates a 2D circle with radius
and center
.
plot::Circle3d(r, [x, y, z], [nx, ny, nz]) creates a 3D circle with radius
, center
, and normal vector
.
Calls:
plot::Circle2d(r, <[x, y]>, <a = amin .. amax>, Options)
plot::Circle3d(r, <[x, y, z]>, <a = amin .. amax>, Options)
plot::Circle3d(r, [x, y, z], [nx, ny, nz], <a = amin .. amax>, Options)
Parameters:
|
r: |
the radius: a real numerical value or an arithmetical expression in the animation parameter a. |
|
x, y, z: |
the center. The coordinates x, y, z must be real numerical values or arithmetical expressions in the animation parameter a. If no center is specified, a circle centered at the origin is created. |
|
nx, ny, nz: |
the normal vector. The components nx, ny, nz must be real numerical values or arithmetical expressions in the animation parameter a. If no normal is specified, the normal |
Related Domains:
Related Functions:
Details:
Per default circles are drawn as lines both in 2D and 3D. The attribute LineColor or, equivalently, Color serves for setting the line color.
Use the attribute Filled = TRUE to create filled circles in 2D and circular discs in 3D, respectively.
In 2D, one can choose between hatched and solidly filled circles via the attribute FillPattern. The fill color is determined by FillColor. The circumferential line can be “switched off” via LinesVisible = FALSE.
Example 1
Circles centered at the origin are created if only a radius is specified:
plot(plot::Circle2d(3)):

A center may be given as a list of coordinates:
plot(plot::Circle2d(1, [1, 1]),
plot::Circle2d(2, [1, 2]),
plot::Circle2d(3, [1, 3])):

Example 2
Radius and center of a circle can be animated. We plot an animated circle with a changing radius and a center moving on a spiral:
plot(plot::Curve2d([a*cos(2*a), a*sin(2*a)], a = 0..PI),
plot::Point2d([a*cos(2*a), a*sin(2*a)], a = 0..PI,
PointSize = 2*unit::mm),
plot::Circle2d(0.2 + sin(a), [a*cos(2*a), a*sin(2*a)],
a = 0..PI))


Example 3
In three dimensions, a circle requires a normal vector. We animate this vector:
normal_ := plot::Arrow3d(
[0, 0, 0],
[sin(2*a), sin(a)*cos(2*a), cos(a)*cos(2*a)],
a = 0..2*PI):
circle := plot::Circle3d(1, [0, 0, 0], normal_::To,
a = 0..2*PI, Filled):
plot(normal_, circle)



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 |