|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectview.OrthographicMorpher
public class OrthographicMorpher
This morphing instance translates ra/dec to 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 = w/2 sin(δ_c)/[tan(a/2)*(1-sin^2(δ_c)cos^2(a/2))^0.5], k_y = h/2 1/sin(b/2)with w and h being the width and height of the field-of-view in pixel.
Note that above formulars render the center of projection at (0,0). To allow direct conversion into component pixels, the pixels are translated for half the component's width and side, respectively.
| 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 Dimension |
fov
The size of the field of view in pixel. |
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 | |
|---|---|
OrthographicMorpher(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. |
|
OrthographicMorpher(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 | |
|---|---|
void |
setFieldSize(Dimension size)
Sets the current size of the field of view in pixels. |
Point2D |
toPrimary(Point2D radec)
Converts a point from the secondary system to the primary. |
Point2D |
toSecondary(Point2D pixel)
This conversation is non-unique, but we assume the solution closer to the center of projection to be the correct one. |
| 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 Dimension fov
private boolean hemisphere
| Constructor Detail |
|---|
public OrthographicMorpher(double ra,
double de,
double width,
double height)
public OrthographicMorpher(double ra,
double de,
double width,
double height,
boolean half)
| Method Detail |
|---|
public void setFieldSize(Dimension size)
public Point2D toSecondary(Point2D pixel)
toSecondary in interface Morphingpixel - The image coordinates.
UnsupportedOperationExceptionpublic Point2D toPrimary(Point2D radec)
hemisphere is true, then null is returned if the ra/dec
point handed over is on the 'backside'.
toPrimary in interface Morphingradec - A point in the secondary system.
UnsupportedOperationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||