geometry
Class Similarity

java.lang.Object
  extended by geometry.Similarity
All Implemented Interfaces:
PlanarMap

public final class Similarity
extends Object
implements PlanarMap

This class represents an orientation preserving similarity of the plane. These maps are of the form z maps to w*z+a, for complex numbers w and a.


Constructor Summary
Similarity(Complex w, Complex a)
          Construct the similarity z maps to w*z+a.
Similarity(LineSegment s)
          Construct the similarity sending zero to the starting point of the segment and one to the ending point.
 
Method Summary
 Complex map(Complex z)
          Apply the similarity to z.
 String toString()
          Return a representation of the similarity as a string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Similarity

public Similarity(Complex w,
                  Complex a)
Construct the similarity z maps to w*z+a.


Similarity

public Similarity(LineSegment s)
Construct the similarity sending zero to the starting point of the segment and one to the ending point.

Method Detail

map

public Complex map(Complex z)
Apply the similarity to z.

Specified by:
map in interface PlanarMap

toString

public String toString()
Return a representation of the similarity as a string.

Overrides:
toString in class Object


Java Tutorial for Mathematics Students