2D parallelograms

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


plot::Parallelogram2d([cx, cy], [ux, uy], [vx, vy], <a = amin .. amax>, options)


plot::Parallelogram2d(c, u, v) defines a 2D parallelogram with center and vectors , spanning the plane of the parallelogram. This is a rectangle with sides of length , if the vectors and are orthogonal.

plot::Parallelogram2d creates a 2D parallelogram with center = [cx, cy] and sides given by the vectors = [2 ux, 2 uy] and = [2 vx, 2 vy]. The corners of the parallelogram are given by , , , and :

By default, only the border lines of the parallelogram are visible. Their color is set by the attribute LineColor. With Filled = TRUE, the area of the parallelogram is filled with the color specified by the attribute Color or, equivalently, FillColor.

Alternatively, the center and the spanning vectors can be given as vectors.


AttributePurposeDefault Value
AffectViewingBoxinfluence of objects on the ViewingBox of a sceneTRUE
AntiAliasedantialiased lines and points?TRUE
Centercenter of objects, rotation center[0, 0]
CenterXcenter of objects, rotation center, x-component0
CenterYcenter of objects, rotation center, y-component0
Colorthe main colorRGB::Blue
Filledfilled or transparent areas and surfacesFALSE
FillColorcolor of areas and surfacesRGB::Red
FillPatterntype of area fillingDiagonalLines
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
LineStylesolid, dashed or dotted lines?Solid
LinesVisiblevisibility of linesTRUE
Namethe name of a plot object (for browser and legend) 
ParameterEndend value of the animation parameter 
ParameterNamename of the animation parameter 
ParameterBegininitial value of the animation parameter 
ParameterRangerange of the animation parameter 
Tangent1first vector spanning parallelograms[0, 1]
Tangent2second vector spanning parallelograms[1, 0]
Tangent1Xfirst vector spanning parallelograms, x component0
Tangent1Yfirst vector spanning parallelograms, y component1
Tangent2Xsecond vector spanning parallelograms, x component1
Tangent2Ysecond vector spanning parallelograms, y component0
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 
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


Example 1

Plot several rectangles and parallelograms using different presentation styles:

plot(plot::Parallelogram2d([2, 2], [0.5, 1]),
     plot::Parallelogram2d([3, 3], [-1, 1],
                           Filled = TRUE,
                           Color = RGB::Red), 
     plot::Parallelogram2d([4, 4], [0, 1],
                           LineStyle = Dashed,
                           LineColor = RGB::Black), 
     plot::Parallelogram2d([5, 5], [0, 2], 
                           Filled = TRUE,
                           FillColor = RGB::Red,
                           LineColor = RGB::Green)


cx, cy

Coordinates of the center: real numerical values or expressions of the animation parameter a.

cx, cy are equivalent to the attributes CenterX, CenterY.

ux, uy

Components of the first vector spanning the parallelogram: real numerical values or expressions of the animation parameter a.

ux, uy are equivalent to the attributes Tangent1X, Tangent1Y.

vx, vy

Components of the second vector spanning the parallelogram: real numerical values or expressions of the animation parameter a.

vx, vy are equivalent to the attributes Tangent2X, Tangent2Y.


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