Documentation ¶
Overview ¶
Package aow implements the Architect of Worlds generator for systems and planets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Catalog_t ¶
type Catalog_t struct { Id string Name string Description string Radius float64 // the radius of the map in parsecs StarSystems []*StarSystem_t }
func NewSolClusterCatalog ¶
NewSolClusterCatalog returns a generator initialized with the values for a sol-like cluster. Parameters:
- n: The number of systems to target.
- tweak: A tweak factor to adjust the volume of space returned.
- prng: A source of randomness.
func (*Catalog_t) SaveAsPNG ¶
SaveAsPNG writes the catalog to a PNG file. The PNG file is a map of the star systems in the catalog using the X and Y coordinates of each star system. Each star system is colored based on its age. The stars that are furthest away from the center of the map are rendered first.
type Coordinates ¶
func (Coordinates) DistanceBetween ¶
func (c Coordinates) DistanceBetween(o Coordinates) float64
func (Coordinates) DistanceTo ¶
func (c Coordinates) DistanceTo(o Coordinates) float64
func (Coordinates) Scale ¶
func (c Coordinates) Scale(s float64) Coordinates
func (Coordinates) String ¶
func (c Coordinates) String() string
func (Coordinates) Translate ¶
func (c Coordinates) Translate(s Coordinates) Coordinates
type PopulationModel_t ¶
type PopulationModel_t struct { YoungPopulationI populationModel_t IntermediatePopulationI populationModel_t OldPopulationI populationModel_t DiskPopulationII populationModel_t HaloPopulationII populationModel_t CombinedDensity float64 }
type StarColor_t ¶
type StarColor_t int
const ( Grey StarColor_t = iota BlueWhite // Class A Orange // Class K Red // Class M White // White Dwarf Yellow // Class G YellowWhite // Class F )
func (StarColor_t) RGBA ¶
func (sc StarColor_t) RGBA() color.RGBA
type StarSystem_t ¶
type StarSystem_t struct { Population StellarPopulation_e Age float64 // in billions of years? Coordinates Coordinates // relative to center of the catalog // contains filtered or unexported fields }
func (*StarSystem_t) DistanceTo ¶
func (ss *StarSystem_t) DistanceTo(os *StarSystem_t) float64
type StellarPopulation_e ¶
type StellarPopulation_e int
StellarPopulation_e is a grouping of stellar systems that have similar characteristics.
const ( YoungPopulationI StellarPopulation_e = iota IntermediatePopulationI OldPopulationI DiskPopulationII HaloPopulationII )
Click to show internal directories.
Click to hide internal directories.