Element: Plane.

Icon: 

Text: A 3D plane.

Description: A Plane is a drawing element that displays a piece of a three dimensional plane. The piece of plane to draw is determined by an origin point, two directing vectors and the size in both directions (as multiple of the directing vectors). Thus, a size of 2 in the direction A implies that the vector in this direction will be multiplied by up to a factor of two.

The plane can be moved by dragging its origin point, invoking up to three different actions.

Advanced Color Scheme

This element allows the use of an advanced color scheme for it. The user can define an origin and a direction in space so that the distance from the origin along this direction decides the color that will be used to fill the interior of the element. This can produce drawings like the one displayed below.

Table of properties

Name Description Values accepted
Position and Size
X The X coordinate of the origin point of the element. Any constant or variable of type double or int.
Y The Y coordinate of the origin point of the element. Any constant or variable of type double or int.
Z The Z coordinate of the origin point of the element. Any constant or variable of type double or int.
Size A The size of the element in the first direction. Any constant or variable of type double or int.
Size B The size of the element in the second direction. Any constant or variable of type double or int.

Visibility and Interaction

Visible The visibility of the element. A boolean variable or one of the constants true or false.
Enabled Whether the element responds to user interaction. A boolean variable or one of the constants true or false.
On Press The action to invoke when the element is pressed. The Java code to invoke for the action. 
On Drag The action to invoke when the element is moved. The Java code to invoke for the action. 
On Release The action to invoke when the element is released. The Java code to invoke for the action. 
On Enter The action to invoke when the pointer enters the element. The Java code to invoke for the action. 
On Exit The action to invoke when the pointer leaves the element. The Java code to invoke for the action. 
Configuration
Direction A The first directing vector. An array of type double with three elements.
Direction B The second directing vector. An array of type double with three elements.
Graphical Aspect
Line Color The color used for the lines of the element. The special value null draws the element without an edge. See the values for the Fill Color property.
Fill Color The color used to fill the element. The special value null draws an empty element. An Object variable of the class java.awt.Color or one of the predefined colors: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow.

A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate.

The default value is decided by the system.

Stroke The thickness for the lines of the element. Any constant or variable of type double or int. The default value is 1.

Object variables of the class  java.awt.Stroke are also accepted.

Resolution How to divide the plane in small rectangles. Two integers separated by a comma, indicating the number of partitions in each of the main directions.
Alternatively, a double value setting the maximum length allowed for the sides of the rectangles.
An Object variable of the class org.opensourcephysics.displayejs.Resolution is also accepted.
Displacement This is a factor that allows us to simulate that the element is located further from the observer than it actually is. This allows a better visualization of other elements that move along the surface This factor is set ussually to a value slightly bigger that one, such as 1.1. Any constant or variable of type double. The default value is 1.
Quick Transp The level of transparency to use when the element is drawn quickly (which can happen when the scene is rotated). Any constant or variable of type int.

The value must be in the range from 0 (transparent) to 255 (solid).

Advanced Color Scheme
Color Origin Defines the origin point for the computation of the color levels. A one-dimensional array of type double with three elements. One for each of the coordinates of the origin point.
Color Direction Defines the direction along which the gradient of colors takes place. A one-dimensional array of type double with three elements. One for each of the coordinates of the gradient of colors.
Color Levels Defines the number of levels that separate the zones with the same color. The number of levels must be one less than the number of colors. A one-dimensional array of type double providing the values for which a change of color takes place.
Color Fills Defines the colors to use at each side of the color leves. The number of colors must be one more than the number of levels. A one-dimensional array of type Object. Each element in the array must be the color to use in each of the zones delimited by the levels.

For the accepted values for the elements in the array, see the values for the Fill Color property. 

Threshold Below Whether to use the color of the level below for points right in the level of separation of two color zones. A boolean variable or one of the constants true or false.