public class SphereTiles extends Object implements PI
Δh_0*sin(Δh_0/2)=A_sphere/N
| Modifier and Type | Class and Description |
|---|---|
static class |
SphereTiles.Test
Test class.
|
| Modifier and Type | Field and Description |
|---|---|
private double |
area
The area per tile.
|
private double |
dh0
The principle height, from 2hsin(h/2)=area.
|
private List |
tiles
Filled on construct, these are centers and d(az) dh of tiles.
|
| Constructor and Description |
|---|
SphereTiles(int n,
double h0)
Constructs a new tiling of the part of the sphere above the minimal
height h_0.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getDistanceToTile(int index,
double azrad,
double hrad)
Returns the distance of the point on the sphere indicated by azimuth and
altitude to the center of the tile given by the index.
|
int |
getNumberOfTiles()
Returns the number of tiles within this sky sphere.
|
VectorG |
getTile(int index)
Retruns the tile with the given index.
|
int |
getTileIndex(double azrad,
double hrad)
This method scans all tiles in this sphere and returns the index of
the tile the requested position is in.
|
private static boolean |
probeTile(VectorG v,
double az,
double h)
Probes if a point on the sky lies within the tile specified by the
4-dimensional vector passed over.
|
private List tiles
private double area
private double dh0
public SphereTiles(int n,
double h0)
n - Number of tilesh0 - Starting height above the horizon, in radian.public int getNumberOfTiles()
public int getTileIndex(double azrad,
double hrad)
azrad - The azimuth to probe in radians.hrad - The altitude to probe in radians.public double getDistanceToTile(int index,
double azrad,
double hrad)
azrad - The azimuth to probe in radians.hrad - The altitude to probe in radians.index - The tile index.public VectorG getTile(int index)
private static boolean probeTile(VectorG v, double az, double h)