This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

AngleRange, AngleBegin, AngleEnd

Value Summary

AngleRange[AngleBegin .. AngleEnd]Range of arithmetical expressions
AngleBegin, AngleEndOptionalMuPAD® expression

Graphics Primitives

ObjectsDefault Values
plot::Tube, plot::XRotate, plot::ZRotate

AngleRange: 0 .. 2*PI

AngleBegin: 0

AngleEnd: 2*PI

plot::Arc2d, plot::Arc3d

AngleRange: 0 .. PI/2

AngleBegin: 0

AngleEnd: PI/2


AngleRange, AngleBegin, AngleEnd define a range for the angle in circular arcs and surfaces of revolution.

For circular arcs of type plot::Arc2d, the attributes AngleBegin and AngleEnd define the starting point and the end point of the arc. The values are the usual polar angles measuring the angle to the positive x-axis in radians.

For surfaces of revolution of type plot::XRotate or plot::ZRotate, respectively, the attributes AngleBegin and AngleEnd define the starting point and the end point of the revolution.

For plot::XRotate, the values are the polar angles to the positive y-axis, specified in radians.

For plot::ZRotate, the values are the usual angles to the positive x-axis in radians, known from cylindrical coordinates.

Values for AngleBegin and AngleEnd may depend on the animation parameter and must evaluate to real numbers for any given time stamp.

AngleRange provides a shortcut for setting AngleBegin and AngleEnd. The attribute AngleRange = a_1..a_2 is equivalent to AngleBegin = a1, AngleEnd = a2.


Example 1

We define a semi-circle as a circular arc with a range of the polar angle from 0 to 180 degrees (i.e., π in radians):

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

The range is stored as the attribute AngleRange in the object and can be accessed and changed:

arc::AngleBegin, arc::AngleEnd, arc::AngleRange

arc::AngleRange :=  PI/2 .. 2*PI:

delete arc:

Example 2

We leave gaps in the following surfaces of revolution by restricting the revolution angle:

plot(plot::XRotate(sin(x), x = 0 .. PI/2, 
                   AngleRange = -0.8*PI .. 0.8*PI)):

plot(plot::ZRotate(sin(x), x = 0 .. PI/2, 
                   AngleRange =  0.3*PI .. 2*PI)):

Was this topic helpful?