|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjview.AbstractFormattingTransform
jview.OrthographicTransformation
public class OrthographicTransformation
This coordinate transforming instance translates ra/dec to normalized pixels under the rule of an orthogonal projection. It requires a center of projection in ra,dec and a field-of-view size, i.e. the size of the projected area in degrees. Setting a new component size can then be performed at will. The defining equations are:
x = k_x cos(δ) sin(Δα), y = k_y [sin(δ)cos(δ_c)-cos(δ)sin(δ_c)cos(Δα)], sin(δ)=y/k_y cos(δ_c)+r sin(δ_c), tan(Δα)=x/[r cos(δ_c)-y sin(δ_c)]where r is a radius,
r^2 = (1-x^2/k_x^2-y^2/k_y^2)The scaling factors k_x and k_y can be calculated using
k_x = 1/2 sin(δ_c)/[tan(a/2)*(1-sin^2(δ_c)cos^2(a/2))^0.5], k_y = 0.5/sin(b/2)Note that above formulars render the center of projection at (0,0). To allow direct conversion into normalized pixel, 0.5 has to be added.
| Nested Class Summary | |
|---|---|
private static class |
OrthographicTransformation.AngleFormat
A format that formats angles. |
| Field Summary | |
|---|---|
private double |
cosdc
The cosine of the declination of the center of projection. |
private double |
dec
The center of projection, declination in degrees. |
private boolean |
hemisphere
If true we only consider points on the front side. |
private double |
kx
The scaling factor in x for fov-pixel size one. |
private double |
ky
The scaling factor in y for fov-pixel size one. |
private double |
rac
The center of projection, right ascension in degrees. |
private double |
sindc
The sine of the declination of the center of projection. |
| Constructor Summary | |
|---|---|
OrthographicTransformation(double ra,
double de,
double width,
double height)
The center of the projcetion and the extend of the field-of-view in x and y directions must be specified. |
|
OrthographicTransformation(double ra,
double de,
double width,
double height,
boolean half)
The center of the projcetion and the extend of the field-of-view in x and y directions must be specified. |
|
| Method Summary | |
|---|---|
private void |
defaultFormats()
Sets the default formats for normal sky sizes. |
Format |
estimateX(double rasize)
From ra-size to formatter. |
Format |
estimateY(double desize)
From ra-size to formatter. |
Vector2D |
getCenter()
Retruns the center of the projection as a vector2d. |
Point2D |
toNormalizedDistance(VectorG ul,
VectorG dist)
Converts a ra/dec distance to a normalized distance. |
Point2D |
toNormalizedSpace(VectorG radec)
Converts a point from ra/dec into normalized pixel. |
VectorG |
toUserDistance(Rectangle2D norm)
Converts a distance in normalized space to s distance in user space. |
VectorG |
toUserSpace(Point2D pixel)
This conversation is non-unique, but we assume the solution closer to the center of projection to be the correct one. |
void |
useEstimatedFormats(Rectangle2D view,
int nx,
int ny)
Does nothing, except if viewport is so small that we want to show sub-arcsec. |
| Methods inherited from class jview.AbstractFormattingTransform |
|---|
deltaFormatUserSpaceX, deltaFormatUserSpaceY, formatUserCoordinates, formatUserSpaceX, formatUserSpaceY, getFormatUserX, getFormatUserY, setDeltaFormatUserX, setDeltaFormatUserY, setFormatUserX, setFormatUserY |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private double rac
private double dec
private double sindc
private double cosdc
private double kx
private double ky
private boolean hemisphere
| Constructor Detail |
|---|
public OrthographicTransformation(double ra,
double de,
double width,
double height)
public OrthographicTransformation(double ra,
double de,
double width,
double height,
boolean half)
| Method Detail |
|---|
public VectorG toUserSpace(Point2D pixel)
toUserSpace in interface CoordinateTransformingpixel - The image coordinates.
UnsupportedOperationExceptionpublic Point2D toNormalizedSpace(VectorG radec)
hemisphere is true, then null is returned if the ra/dec
point handed over is on the 'backside'.
toNormalizedSpace in interface CoordinateTransformingradec - A point in the secondary system.
UnsupportedOperationExceptionpublic VectorG toUserDistance(Rectangle2D norm)
toUserDistance in interface DeltaTransforming
public Point2D toNormalizedDistance(VectorG ul,
VectorG dist)
toNormalizedDistance in interface DeltaTransforming
public void useEstimatedFormats(Rectangle2D view,
int nx,
int ny)
useEstimatedFormats in interface FormattedTransforminguseEstimatedFormats in class AbstractFormattingTransformpublic Format estimateX(double rasize)
estimateX in interface FormattedTransformingpublic Format estimateY(double desize)
estimateY in interface FormattedTransformingpublic Vector2D getCenter()
private void defaultFormats()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||