# `plot`::`Parallelogram2d`

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.

## Syntax

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

## Description

`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.

## Attributes

AttributePurposeDefault Value
`AffectViewingBox`influence of objects on the `ViewingBox` of a scene`TRUE`
`AntiAliased`antialiased lines and points?`TRUE`
`Center`center of objects, rotation center[`0`, `0`]
`CenterX`center of objects, rotation center, x-component`0`
`CenterY`center of objects, rotation center, y-component`0`
`Color`the main color`RGB::Blue`
`Filled`filled or transparent areas and surfaces`FALSE`
`FillColor`color of areas and surfaces`RGB::Red`
`FillPattern`type of area filling`DiagonalLines`
`Frames`the number of frames in an animation`50`
`Legend`makes a legend entry
`LegendText`short explanatory text for legend
`LegendEntry`add this object to the legend?`FALSE`
`LineColor`color of lines`RGB::Blue`
`LineWidth`width of lines`0.35`
`LineStyle`solid, dashed or dotted lines?`Solid`
`LinesVisible`visibility of lines`TRUE`
`Name`the name of a plot object (for browser and legend)
`ParameterEnd`end value of the animation parameter
`ParameterName`name of the animation parameter
`ParameterBegin`initial value of the animation parameter
`ParameterRange`range of the animation parameter
`Tangent1`first vector spanning parallelograms[`0`, `1`]
`Tangent2`second vector spanning parallelograms[`1`, `0`]
`Tangent1X`first vector spanning parallelograms, x component`0`
`Tangent1Y`first vector spanning parallelograms, y component`1`
`Tangent2X`second vector spanning parallelograms, x component`1`
`Tangent2Y`second vector spanning parallelograms, y component`0`
`TimeEnd`end time of the animation`10.0`
`TimeBegin`start time of the animation`0.0`
`TimeRange`the real time span of an animation`0.0` .. `10.0`
`Title`object title
`TitleFont`font of object titles[`" sans-serif "`, `11`]
`TitlePosition`position of object titles
`TitleAlignment`horizontal alignment of titles w.r.t. their coordinates`Center`
`TitlePositionX`position of object titles, x component
`TitlePositionY`position of object titles, y component
`Visible`visibility`TRUE`
`VisibleAfter`object visible after this time value
`VisibleBefore`object visible until this time value
`VisibleFromTo`object visible during this time range
`VisibleAfterEnd`object visible after its animation time ended?`TRUE`
`VisibleBeforeBegin`object visible before its animation time starts?`TRUE`

## Examples

### 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) )```

## Parameters

 `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`. `a` Animation parameter, specified as `a```` = amin..amax```, where `amin` is the initial parameter value, and `amax` is the final parameter value.