public class Aperture extends Object
splitlevel area error
1 0.5 0.2853981633974483
3 0.71875 0.06664816339744828
5 0.775390625 0.010007538397448279
7 0.7843017578125 0.001096405584948279
10 0.7853221893310547 7.59740663935915E-5
15 0.7853977028280497 4.605693986192705E-7
20 0.7853981612443022 2.1531461058543755E-9
For a circular aperture at 100.123, 100.574, diameter 10.23 adding all pixel
areas and comparing it to the total known area of (5.115)^2*PI
splitlevel area error (dA/A)
1 82.5 0.0037067217670689635
3 82.25 6.784747207682614E-4
5 82.1943359375 1.7091601457346031E-6
7 82.1939697265625 2.7462799894133292E-6
10 82.19415760040283 4.6054141904468886E-7
15 82.19419539812952 6.823752873478206E-10
20 82.19419545471465 6.056810455152413E-12
Default split level is 10. Note that Sun's implementation of the PathIterator
of an ellipse only uses 4*6 points, making it unfavourable to use code like
this:
annulus = new Area(Ellipse2D(80., 80., 20., 20.);
annulus.subtract(new Area(Ellipse2D(90., 90., 10., 10.)
Better results are acheived with two Apertures made from Ellipses and then
manually subtract the results.| Modifier and Type | Class and Description |
|---|---|
static class |
Aperture.Circular
Test the aperture class on a criculare aperture at center zero, zero and
with radius 1.
|
static class |
Aperture.Circular100
Test the aperture class on a circulare aperture at center 100, 100 and
with radius 10, for x,y = 0->200
|
private class |
Aperture.Pixel
A subpixel of the CCD-pixel.
|
| Modifier and Type | Field and Description |
|---|---|
private Shape |
aperture
The aperture area.
|
private int |
splitmax
The maximum split level, defaults to 10.
|
| Constructor and Description |
|---|
Aperture(Shape pinhole)
Constructs a new aperture class from a given Area that defines the
aperture.
|
Aperture(Shape pinhole,
int split)
Constructs a new aperture class from a given Area that defines the
aperture.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getInsideAperture(Point2D center)
Returns the fractional part of the 1x1 pixel located at the central point
passed to this argument within the aperture.
|
double |
getInsideAperture(Point2D center,
double width,
double height)
Returns the fractional part of the pixel with the given dimensions
located at the central point passed to this argument within the aperture.
|
private double |
intersect(Aperture.Pixel parent,
Shape with)
The recursive method that takes a pixel and returns its aperture weight
or splits the pixel further if intersection is signaled and the maximum
split level is not reached.
|
private int splitmax
private Shape aperture
public Aperture(Shape pinhole)
#getInsideApertue.public Aperture(Shape pinhole, int split)
#getInsideApertue. If the
argument is already an area, no new object is created.public double getInsideAperture(Point2D center)
#getInsideApertue(Point2D, double, double).public double getInsideAperture(Point2D center, double width, double height)
#getInsideApertue(Point2D)private double intersect(Aperture.Pixel parent, Shape with)