# Documentation

### This is machine translation

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

# `plot`::`Plane`

Infinite plane in 3D

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::Plane(`[x, y, z]`, <`[nx, ny, nz]`>, <`a = amin .. amax`>, `options`)
plot::Plane(`X`, <`N`>, <`a = amin .. amax`>, `options`)
plot::Plane(`XN`, <`a = amin .. amax`>, `options`)
plot::Plane(`p1`, `p2`, `p3`, <`a = amin .. amax`>, `options`)
plot::Plane(`p123`, <`a = amin .. amax`>, `options`)
```

## Description

`plot::Plane(x, n)` creates the (infinite) plane with normal vector n passing through the point x.

`plot::Plane` provides a graphical plane in 3D that does not require a specification, which part of the plane is to be seen in the picture. The visible part of the plane is determined automatically by the `ViewingBox` of the entire 3D scene.

The contribution of a plane of type `plot::Plane` to the `ViewingBox` of a 3D scene consists only of the single point `[x, y, z]` (this is `p1`, if the plane is specified by three points `p1`, `p2`, `p3` on the plane).

Thus, two planes with the same normal but different points may be mathematically equivalent, but may produce different pictures due to different viewing boxes. Cf. Example 3.

By default, a mesh of lines is displayed on the plane. Use the attribute `Mesh` = ```[n1, n2]``` with positive integer values `n1`, `n2` to control the number of mesh lines.

## Attributes

AttributePurposeDefault Value
`AffectViewingBox`influence of objects on the `ViewingBox` of a scene`TRUE`
`Color`the main color`RGB::LightBlue`
`Filled`filled or transparent areas and surfaces`TRUE`
`FillColor`color of areas and surfaces`RGB::LightBlue`
`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::Black.[0.25]`
`LinesVisible`visibility of lines`TRUE`
`Mesh`number of sample points[`15`, `15`]
`Name`the name of a plot object (for browser and legend)
`Normal`normal vector of circles and discs, etc. in 3D[`0`, `0`, `1`]
`NormalX`normal vector of circles and discs, etc. in 3D, x-component`0`
`NormalY`normal vector of circles and discs, etc. in 3D, y-component`0`
`NormalZ`normal vector of circles and discs, etc. in 3D, z-component`1`
`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
`Position`positions of cameras, lights, and text objects[`0`, `0`, `0`]
`PositionX`x-positions of cameras, lights, and text objects`0`
`PositionY`y-positions of cameras, lights, and text objects`0`
`PositionZ`z-positions of cameras, lights, and text objects`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
`TitlePositionZ`position of object titles, z component
`UMesh`number of sample points for parameter “u”`15`
`VMesh`number of sample points for parameter “v”`15`
`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

We generate two spheres and a plane:

```plot(plot::Sphere(1, [-1, -1, -1], Color = RGB::Red), plot::Sphere(1, [ 1, 1, 1], Color = RGB::Green), plot::Plane([0, 0, 0], [0, 0, 1], Color = RGB::Blue)):```

We specify an explicit `ViewingBox` for the scene:

```plot(plot::Sphere(1, [-1, -1, -1], Color = RGB::Red), plot::Sphere(1, [ 1, 1, 1], Color = RGB::Green), plot::Plane([0, 0, 0], [0, 0, 1], Color = RGB::Blue), ViewingBox = [-3..8, -3..8, -3..3]):```

### Example 2

We demonstrate the effect of the attribute `Mesh` that controls the number of mesh lines displayed on planes:

```plot(plot::Plane([0, 0, 0], [1, -1, 1], Color = RGB::Red, Mesh = [5, 5]), plot::Plane([0, 1, 0], [2, 1, -1], Color = RGB::Green, Mesh = [10, 10]), plot::Plane([1, -1, 0], [1, 1, 1], Color = RGB::Blue, Mesh = [20, 20]), ViewingBox = [-1..3, -2..2, -2..2])```

We change the number of mesh lines:

```plot(plot::Plane([0, 0, 0], [1, -1, 1], Color = RGB::Red, Mesh = [10, 10]), plot::Plane([0, 1, 0], [2, 1, -1], Color = RGB::Green, Mesh = [20, 10]), plot::Plane([1, -1, 0], [1, 1, 1], Color = RGB::Blue, Mesh = [15, 5]), ViewingBox = [-1..3, -2..2, -2..2])```

### Example 3

The contribution of a plane to the automatic `ViewingBox` of the whole scene consists only of the point used to specify the plane. In the following scene, this point is the origin. It lies inside the `ViewingBox` generated by the two spheres. Thus, the `ViewingBox` of the scene is determined by the two spheres only:

```plot(plot::Sphere(1, [1, 1, 1], Color = RGB::Red), plot::Sphere(1, [-1, -1, -1], Color = RGB::Green), plot::Plane([0, 0, 0], [0, 0, 1], Color = RGB::Blue)):```

Now, a different point `[5, 0, 0]` is used to specify the same plane. It does not lie inside the `ViewingBox` generated by the two spheres and thus enlarges the `ViewingBox` of the scene:

```plot(plot::Sphere(1, [1, 1, 1], Color = RGB::Red), plot::Sphere(1, [-1, -1, -1], Color = RGB::Green), plot::Plane([5, 0, 0], [0, 0, 1], Color = RGB::Blue)):```

### Example 4

We create animated planes:

```plot(plot::Plane([0, 0, 0], [cos(a), sin(a), 0], a = 0..PI, Color = RGB::Red), plot::Plane([0, 0, 0], [0, cos(a), sin(a)], a = 0..PI, Color = RGB::Green), plot::Plane([0, 0, a], [0, 0, 1], a = 0..1, Color = RGB::Blue), ViewingBox = [-1..1, -1..1, -1..1])```

## Parameters

 `x`, `y`, `z` The coordinates of a point on the plane: numerical real values or arithmetical expressions in the animation parameter `a`. `x`, `y`, `z` are equivalent to the attributes `PositionX`, `PositionY`, `PositionZ`. `nx`, `ny`, `nz` The components of the normal vector; `nx`, `ny`, `nz` must be numerical real values or arithmetical expressions in the animation parameter `a`. If no normal is specified, the normal (0, 0, 1) is used. `nx`, `ny`, `nz` are equivalent to the attributes `NormalX`, `NormalY`, `NormalZ`. `X` A matrix of category `Cat::Matrix` with three entries that provide the coordinates `x`, `y`, `z` of a point on the plane. `X` is equivalent to the attribute `Position`. `N` A matrix of category `Cat::Matrix` with three entries that provide the components `nx`, `ny`, `nz` of the normal. `N` is equivalent to the attribute `Normal`. `XN` A matrix of category `Cat::Matrix` with 3 rows and 2 columns. The first column provides the coordinates `x`, `y`, `z` of a point on the plane, the second column provides the components `nx`, `ny`, `nz` of the normal. `XN` is equivalent to the attributes `Position`, `Normal`. `p1`, `p2`, `p3` Three points on the plane: either lists with 3 entries each or matrices of category `Cat::Matrix` with 3 entries each. The point `p1` correponds to the attribute `Position`, the normal of the plane (the attribute `Normal`) is computed as the cross product (p2 - p1) ×(p3 - p1). `p123` A matrix of category `Cat::Matrix` with 3 rows and 3 columns. Each column corresponds to a point on the plane. `a` Animation parameter, specified as `a```` = amin..amax```, where `amin` is the initial parameter value, and `amax` is the final parameter value.