o1.stars
Type members
Classlikes
Each Constellation
object represents a constellation visible on a star map.
A constellation consists of one or more imaginary “lines” between stars.
Each Constellation
object represents a constellation visible on a star map.
A constellation consists of one or more imaginary “lines” between stars.
- Value parameters:
- lines
one or more pairs of stars; each pair defines an imaginary line between two stars
- name
the name of the constellation
Each Star
object represents a star on a star map. It records some basic information
(an identifier, a location, and a magnitude); in addition, some but not all stars have
been assigned a name. (In reality, many stars have multiple alternative names, but this
class does not capture that fact.)
Each Star
object represents a star on a star map. It records some basic information
(an identifier, a location, and a magnitude); in addition, some but not all stars have
been assigned a name. (In reality, many stars have multiple alternative names, but this
class does not capture that fact.)
- Value parameters:
- coords
the location of the star on a two-dimensional star map
- id
a number that uniquely identifies the star from the other visible stars (a so-called Henry Draper number)
- magnitude
the apparent magnitude (brightness) of the star: smaller means brighter!
- name
the star’s name (wrapped in
Some
), orNone
A StarCoords
object describes the location of a star on a two-dimensional star map.
A location consists of two components, x
and y
, each of which has a value between
-1.0 and +1.0. The x coordinate ranges from -1.0 at the very left of the map to +1.0 on
the right; the y coordinate similarly ranges from -1.0 at the bottom to +1.0 at the top.
For instance, a star with StarCoords
of (0.0,0.0) appears at the exact center of the map.
A StarCoords
object describes the location of a star on a two-dimensional star map.
A location consists of two components, x
and y
, each of which has a value between
-1.0 and +1.0. The x coordinate ranges from -1.0 at the very left of the map to +1.0 on
the right; the y coordinate similarly ranges from -1.0 at the bottom to +1.0 at the top.
For instance, a star with StarCoords
of (0.0,0.0) appears at the exact center of the map.
- Value parameters:
- x
the x coordinate of a location on the star map, between -1.0 and +1.0
- y
the y coordinate of a location on the star map, between -1.0 and +1.0
- Companion:
- object
The singleton object StarCoords
provides some constants and convenience methods for
use alongside the StarCoords
class.
The singleton object StarCoords
provides some constants and convenience methods for
use alongside the StarCoords
class.
- Companion:
- class
Each object of type StarMap
represents a specific perspective of a night sky.
Each object of type StarMap
represents a specific perspective of a night sky.
- Value parameters:
- constellations
the constellations visible in the sky
- stars
the stars visible in the sky