o1.stars.gui
Members list
Value members
Concrete methods
Given a StarMap
that details what is visible in the sky, produces a Pic
that represents that information as an image. The background of the image is a Black
square of the given size. Each star and constellation in the sky appear against that background.
Given a StarMap
that details what is visible in the sky, produces a Pic
that represents that information as an image. The background of the image is a Black
square of the given size. Each star and constellation in the sky appear against that background.
Parameters
- bgSize
-
the width and height, in pixels, of the desired square image
- skyData
-
the contents of the night sky that are to be represented as an image
Attributes
Given an image of the sky and a star, returns a version of the original image with a constellation drawn on top.
Given an image of the sky and a star, returns a version of the original image with a constellation drawn on top.
A constellation is depicted using a combination of red circles and yellow lines. At each star that belongs to the constellation, a red circle with a diameter of 4 pixels is added. A yellow line is then drawn between each pair of connected stars. The positions of the stars within the image are determined as in placeStar.
Attributes
Given an image of the sky and a star, returns a version of the original image with an image of the star placed on top. That is, forms an image of the star and places it against the given (larger) image in a Pos
that corresponds to the star’s StarCoords
.
Given an image of the sky and a star, returns a version of the original image with an image of the star placed on top. That is, forms an image of the star and places it against the given (larger) image in a Pos
that corresponds to the star’s StarCoords
.
The star is depicted as a White
circle whose diameter is 12.0 / (M + 2)
, where M
is the star’s magnitude. Its position within the resulting image is determined by the star’s posIn
method. The given star must have a magnitude greater than -2.
For example, say the background image is 400 by 400 pixels, and the given star has the coords (0.5,0.0) and a magnitude of -0.5. The returned image will then consist of the given background image with white circle of radius 4 placed upon it at (300,200).
Parameters
- skyPic
-
an image to place the star upon
- star
-
a star (of magnitude > -2) that should be depicted against the given image
Attributes
Launches a GUI that presents the user with a map of the night sky.
Launches a GUI that presents the user with a map of the night sky.
The app uses readStarMap
to read the star map from a local folder. It then uses createSkyPic
to turn that data into a Pic.