final class StarfieldImage extends Object
The following data is rendered for each visible star: its magnitude (brightness), color (surface temperature), and position.
Constructor and Description |
---|
StarfieldImage(Projector aProjector,
File aOutputFile,
int aImageSize,
int aMagnification)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
(package private) void |
add(BoostedStar aBoostedStar,
double aPhi)
Add a boosted star to the generated image.
|
(package private) void |
dispose()
Clean up resources when finished with this object.
|
(package private) void |
generateFile()
Notify this class that no more stars are to be added, and to generate
the final file as output.
|
StarfieldImage(Projector aProjector, File aOutputFile, int aImageSize, int aMagnification)
aProjector
- how to position each star on the image.aOutputFile
- where the file will be saved on the local file system. The extension of the file name determines the
type of file generated - jpg, png, etc. The file format .png seems to give the best results.aImageSize
- the width (and height) of the image in pixels; the generated image is square. If this is too large,
then your host may run out of memory.aMagnification
- applies only to the half-sky projections. Magnifying to ~6x gives a nice result for high beta.void add(BoostedStar aBoostedStar, double aPhi)
void generateFile()
dispose()
at the end.void dispose()
Starfield - Copyright Hirondelle Systems. Published March 1, 2014