geometry
クラス Coordinate

java.lang.Object
  拡張geometry.Coordinate
直系の既知のサブクラス:
EarthCenterCoordinate, EarthLocalCoordinate

public class Coordinate
extends java.lang.Object

This base class defines universal coordinates. The right-handed system is setup.


コンストラクタの概要
Coordinate()
          Constructor.
Coordinate(J3Vector origin)
          Constructor.
Coordinate(J3Vector origin, J3UnitVector ex, J3UnitVector ez)
          Constructor.
 
メソッドの概要
 double getAzimuthInPolar(J3Vector a)
          Convert Cartesian to Poler coordinate system.
 J3Vector getEx()
          Get x axis direction.
 J3Vector getEy()
          Get y axis direction.
 J3Vector getEz()
          Get z axis direction.
 double getLengthInPolar(J3Vector a)
          Convert Cartesian to Poler coordinate system.
 J3Vector getOrigin()
          Get the origin of the coordinate system.
 J3Vector getPointVectorFromPolarCoordinate(double r, double theta, double phi)
          get a point vector for a given Poler system.
 double getZenithInPolar(J3Vector a)
          Convert Cartesian to Poler coordinate system.
 void rotate(int axis, double theta)
          Rotate the coordinate system.
 void setOrigin(J3Vector orizin)
          Set the origin of the coordinate system.
 void transformThisCoordinate(J3UnitVector nz, double alpha)
          transform this coordiante to one with the external z-axis vector nz.
 J3UnitVector transformUnitVectorToThisCoordinate(J3UnitVector n)
          Transform unit vector (direction) J3UnitVector n represented in the different coordinate system to the one in this coordinate.
 J3Vector transformVectorToThisCoordinate(J3Vector r, Coordinate external)
          Transform vector point J3Vector r represented in the external coordinate system to the one in this coordinate.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

Coordinate

public Coordinate()
Constructor. Default setting.


Coordinate

public Coordinate(J3Vector origin)
Constructor. Create Cartesian coordinate system and set the origin.


Coordinate

public Coordinate(J3Vector origin,
                  J3UnitVector ex,
                  J3UnitVector ez)
Constructor. Create Cartesian coordinate system and set the origin. x and z axis with location of the origin is given.

メソッドの詳細

getLengthInPolar

public double getLengthInPolar(J3Vector a)
Convert Cartesian to Poler coordinate system. Returns r component.


getZenithInPolar

public double getZenithInPolar(J3Vector a)
Convert Cartesian to Poler coordinate system. Returns zenith angle [rad].


getAzimuthInPolar

public double getAzimuthInPolar(J3Vector a)
Convert Cartesian to Poler coordinate system. Returns azimuth angle [rad].


getPointVectorFromPolarCoordinate

public J3Vector getPointVectorFromPolarCoordinate(double r,
                                                  double theta,
                                                  double phi)
get a point vector for a given Poler system. Input r, and zenith angle (theta), azimuth angle (phi) in radian. Returns J3Vector.


rotate

public void rotate(int axis,
                   double theta)
Rotate the coordinate system. It rotete the system theta [rad] around one axis. Axis number 1 -> x, 2 -> y, 3 -> z.
        Rotation angle "theta" sign + for clockwise
                                    - for anti-clockwise
        


transformThisCoordinate

public void transformThisCoordinate(J3UnitVector nz,
                                    double alpha)
transform this coordiante to one with the external z-axis vector nz. After the transformation, the new x-y plane is rotated by the given rotation angle alpha [rad] to redefine the directions of x and y axis.
        J3UnitVector nz    :  new z-axis direction. This vector has to be
                              described by unit base vectors of THIS coordinate
                              before applying this transformation.
        double alpha       :  the final rotation angle [rad] to determine
                              the x and y axis directions.
        


setOrigin

public void setOrigin(J3Vector orizin)
Set the origin of the coordinate system.


getEx

public J3Vector getEx()
Get x axis direction.


getEy

public J3Vector getEy()
Get y axis direction.


getEz

public J3Vector getEz()
Get z axis direction.


getOrigin

public J3Vector getOrigin()
Get the origin of the coordinate system.


transformVectorToThisCoordinate

public J3Vector transformVectorToThisCoordinate(J3Vector r,
                                                Coordinate external)
Transform vector point J3Vector r represented in the external coordinate system to the one in this coordinate. Returns the transformed vector.
        J3Vector r :    point vector that will be transfomed to this corrdinate.
        Coordinate external: the cordinate system that describes the vector r.
        


transformUnitVectorToThisCoordinate

public J3UnitVector transformUnitVectorToThisCoordinate(J3UnitVector n)
Transform unit vector (direction) J3UnitVector n represented in the different coordinate system to the one in this coordinate. Returns the transformed vector.
        J3UnitVector n :  direction vector that will be transfomed 
                          to this corrdinate.