Orientation

When creating a basic shape (Box, Cone or Ellipsoid) the surface coordinates are generally centred about the position [0,0,0]. In the case of other shapes they are controlled by the path / contour / contour scale / rotation angle ... used.

We can change the model view coordinates by specifying a new model view origin and up vector. This is done by providing an optional Orientation object in the shape's constructor.

Creating the new orientation

Constructors
Orientation()
Orientation(PVector origin, PVector up)
Orientation(PVector origin, PVector v0, PVector v1)
Parameter Comments
origin
Specifies the new origin effectively translating all surface coordinates. If the parameter value is null then the origin is unchanged.
up
changes the up vector from its default value of [0,1,0] effectively rotating all surface coordinates. If the parameter value is null then the up vector is unchanged.
v0, v1
will rotate all surface coordinates so that a vector v0 will be orientated to v1.

The default (parameterless) contructor creates a unit orientation, effectively leaving all coordinates unchanged.