geometry
Class Plane

java.lang.Object
  extended bygeometry.AffineSpace
      extended bygeometry.Plane
All Implemented Interfaces:
Geometry
Direct Known Subclasses:
CoordPlane

public class Plane
extends AffineSpace

A plane, as a special affine subspace of n-dimensional space, defined by a point and two vectors. Points on the plane can be described as linear combinations of these two vectors, thus inducing a local coordinate system on the plane.

Author:
karsten

Field Summary
 
Fields inherited from class geometry.AffineSpace
origin, space
 
Constructor Summary
Plane(Point origin, Vector x, Vector y)
          Constructs a new plane from a point and two vectors.
 
Method Summary
 Vector getX()
          Returns the first base vector for the local coordinates, as given while constructing the plane.
 Vector getY()
          Returns the second base vector for the local coordinates, as given while constructing the plane.
 java.awt.geom.Point2D localProjection(Point p)
          Returns the image of the specified point after projecting it orthogonally to the plane (in local coordinates).
 
Methods inherited from class geometry.AffineSpace
add, add, affineClosure, canBeContainedIn, canContain, canIntersect, contains, contains, copy, dim, getGenerator, getNormal, getOrigin, getRandomRay, intersection, isContainedIn, localization, localization, outerDim, print, project, toShape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plane

public Plane(Point origin,
             Vector x,
             Vector y)
Constructs a new plane from a point and two vectors. The two vectors will become the base vectors for the local coordinate system.

Parameters:
origin - any point in the plane
x - any direction contained in the plane
y - another direction contained in the plane
Method Detail

getX

public Vector getX()
Returns the first base vector for the local coordinates, as given while constructing the plane.

Returns:
one of the directions defining the plane

getY

public Vector getY()
Returns the second base vector for the local coordinates, as given while constructing the plane.

Returns:
the second direction defining the plane

localProjection

public java.awt.geom.Point2D localProjection(Point p)
Returns the image of the specified point after projecting it orthogonally to the plane (in local coordinates).

Parameters:
p - any point
Returns:
the coordinates of the projection of p in the local coordinate system.