starmap

package
v0.0.0-...-71157ff Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OffsetConfig

type OffsetConfig struct {
	Rotation float64
	X        int
	Y        int
}

OffsetConfig is the description on how to rotate/translate the stars

type Star

type Star struct {
	X    float64
	Y    float64
	Size float64
}

func (Star) Copy

func (s Star) Copy() Star

func (Star) GetOverlap

func (s Star) GetOverlap(s2 Star) float64

func (Star) IntersectWith

func (s Star) IntersectWith(x, y float64) bool

func (Star) IsNeighbor

func (s Star) IsNeighbor(s2 Star) bool

type Starmap

type Starmap struct {
	Bounds image.Rectangle
	Stars  Stars
}

func (Starmap) AddStar

func (sm Starmap) AddStar(s ...Star)

func (Starmap) Compress

func (sm Starmap) Compress() Starmap

Compress several stars into appropriate bigger stars. Find neighboring stars and add them together.

func (Starmap) Copy

func (sm Starmap) Copy() Starmap

func (Starmap) FindOffset

func (sm Starmap) FindOffset(sm2 Starmap) (OffsetConfig, float64)

func (Starmap) GetOverlap

func (sm Starmap) GetOverlap(sm2 Starmap) float64

func (Starmap) IntersectWithStar

func (sm Starmap) IntersectWithStar(x, y float64) bool

func (Starmap) Offset

func (sm Starmap) Offset(x, y float64) Starmap

func (Starmap) Rotate

func (sm Starmap) Rotate(deg float64) Starmap

func (Starmap) ToImage

func (sm Starmap) ToImage() *image.NRGBA64

func (Starmap) WriteFile

func (sm Starmap) WriteFile(filename string) error

type Starmaps

type Starmaps []Starmap

func (Starmaps) CorrectPixels

func (sms Starmaps) CorrectPixels() float64

func (Starmaps) CorrectPixelsSlow

func (sms Starmaps) CorrectPixelsSlow() float64

func (Starmaps) IsOverlap

func (sms Starmaps) IsOverlap(x, y int) bool

func (Starmaps) VisualizeDifference

func (sms Starmaps) VisualizeDifference() *image.NRGBA64

type Stars

type Stars []Star

func (Stars) Center

func (stars Stars) Center() Star

func (Stars) IsCloseTo

func (stars Stars) IsCloseTo(s Star) bool

IsCloseTo checks if a star is neighbouring a cluster.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL