plot::Arc3d

Circular and elliptical arcs in 3D

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

plot::Arc3d(r, <[cx, cy, cz], <[nx, ny, nz]>>, <α .. β>, <a = amin .. amax>, options)
plot::Arc3d([r1, r2], <[cx, cy, cz], <[nx, ny, nz]>>, <α .. β>, <a = amin .. amax>, options)

Description

plot::Arc3d(r, [x, y, z], [nx, ny, nz], α .. β ) creates a circular arc with radius r and center (x, y, z) with a polar angle between α and β in the plane with the normal vector (nx, ny, nz).

plot::Arc3d([ r1, r2], [x, y, z], [nx, ny, nz], α .. β ) creates a corresponding elliptical arc with semi-axes r1, r2.

The angle of a point on the arc is the usual polar angle to the positive x-axis known from polar coordinates. It is measured in radians.

If no range for the polar angle is specified, a full circle/ellipse is created.

If no center point is specified, an arc with center [0, 0, 0], is created.

Attributes

AttributePurposeDefault Value
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
Anglerotation angle0
AngleEndend of angle rangePI/2
AngleBeginbegin of angle range0
AngleRangeangle range0 .. PI/2
Centercenter of objects, rotation center[0, 0, 0]
CenterXcenter of objects, rotation center, x-component0
CenterYcenter of objects, rotation center, y-component0
CenterZcenter of objects, rotation center, z-component0
Closedopen or closed polygonsFALSE
Filledfilled or transparent areas and surfacesFALSE
FillColorcolor of areas and surfacesRGB::LightBlue
FillColor2second color of areas and surfaces for color blendsRGB::CornflowerBlue
FillColorTypesurface filling typesFlat
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
Legendmakes a legend entry 
LegendTextshort explanatory text for legend 
LegendEntryadd this object to the legend?FALSE
LineColorcolor of linesRGB::Blue
LineWidthwidth of lines0.35
LineColor2color of linesRGB::DeepPink
LineStylesolid, dashed or dotted lines?Solid
LinesVisiblevisibility of linesTRUE
LineColorTypeline coloring typesFlat
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
Namethe name of a plot object (for browser and legend) 
Normalnormal vector of circles and discs, etc. in 3D[0, 0, 1]
NormalXnormal vector of circles and discs, etc. in 3D, x-component0
NormalYnormal vector of circles and discs, etc. in 3D, y-component0
NormalZnormal vector of circles and discs, etc. in 3D, z-component1
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
SemiAxessemi axes of ellipses and ellipsods 
SemiAxisXfirst semi axis of ellipses and ellipsods1
SemiAxisYsecond semi axis of ellipses and ellipsods1
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 
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

Examples

Example 1

An arc is a segment of a circle:

circle := plot::Circle2d(3, [0, 0]):
arc := plot::Arc2d(3, [0, 0], 0 .. PI/4, LineColor = RGB::Red,
                   LineWidth = 1.5*unit::mm):
plot(circle, arc)

delete circle, arc:

Example 2

The center of an arc may be given as the second argument to plot::Arc2d:

arc1 := plot::Arc2d(3, [1, 3], 0..PI/2, Closed = TRUE):
arc2 := plot::Arc2d(3, [3, 1], -PI ..0, Closed = TRUE):
plot(arc1, arc2)

The center is accessible as the attribute Center of the arc object. We change the center of the second arc:

arc2::Center := [1, 3]:
plot(arc1, arc2)

delete arc1, arc2:

Example 3

A filled arc is a segment of a circle, like a piece of pie:

plot(plot::Arc2d(1, -PI/4..PI/4, Filled = TRUE))

plot(plot::Arc2d(1, -PI/4..PI/4, Filled = TRUE, Closed = TRUE))

plot(plot::Arc2d(1, -PI/4..PI/4, Filled = TRUE,
                 FillPattern = Solid, LinesVisible = FALSE),
                 AxesInFront = TRUE)

Example 4

When giving a list of two radii, plot::Arc2d draws a segment of anellipse with the corresponding semi-axes:

arc1 := plot::Arc2d([2, 1], 0 .. PI, Color = RGB::Blue):
arc2 := plot::Arc2d([2, 1], -PI .. 0, Color = RGB::Red):
plot(arc1, arc2)

delete arc1, arc2:

Example 5

To plot or animate segments of a tilted ellipse, use the attribute Angle:

arc:= [1, 1], [0, 0], PI/4..PI/2, Filled, Closed, FillPattern=Solid:
plot(plot::Arc2d(arc, Angle=a+0,      a=0..2*PI, FillColor=RGB::Red),
     plot::Arc2d(arc, Angle=a+1/2*PI, a=0..2*PI, FillColor=RGB::Green),
     plot::Arc2d(arc, Angle=a+PI,     a=0..2*PI, FillColor=RGB::Yellow),
     plot::Arc2d(arc, Angle=a+3/2*PI, a=0..2*PI, FillColor=RGB::Blue))

delete arc:

Example 6

Further examples of animated 2D arcs:

plot(plot::Arc2d(1, a .. PI, a = 0..PI))

plot(plot::Arc2d([1 + a^2/2, 1 + a], -PI/2 .. PI/2, a = 0..4))

Example 7

We plot an animated 3D arc:

plot(plot::Arc3d(1, [0,0,0], [0,a,1-a], 0..3/2*PI, a = 0..1))

Example 8

We plot a colored 3D arcs:

plot(plot::Arc3d(1, [0,0,0], 0.1..2*PI-0.1, Filled,
                 LineColor=RGB::Yellow, LineColor2=RGB::Red,
                 LineColorType = Dichromatic, LineColorDirection=[+1,0,0],
                 FillColor=RGB::Yellow, FillColor2=RGB::Red,
                 FillColorType = Dichromatic, FillColorDirection=[-1,0,0]
))

Parameters

r

The radius of the circle. This must be a real numerical value or an arithmetical expression of the animation parameter a.

r is equivalent to the attributes SemiAxisX, SemiAxisY.

r1, r2

The semi-axes of an elliptical arc. 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 point. The coordinates cx, cy, cz must be real numerical values or arithmetical expressions of the animation parameter a. If no center is specified, an arc centered at the origin is created.

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 arc is created in the xy-plane.

nx, ny, nz are equivalent to the attribute Normal.

α .. β

The angle range in radians: α and β must be real numerical values or arithmetical expressions of the animation parameter a. The default range is 0 .. 2*PI.

α .. β is equivalent to the attribute AngleRange.

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

Was this topic helpful?