about summary refs log tree commit diff
path: root/main.go
blob: 43240ef02374c8c56d255759f150a1af61851ec0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main

import (
	"./csv"
	"./draw"
	"./forces"
	"./structs"
	"fmt"
)

func main() {
	// the slice starsSlice stores the star structures
	starsSlice := []structs.Star{
		{structs.Coord{X: 100, Y: 100}, structs.Force{0, 0}, 1000},
		{structs.Coord{X: 200, Y: 300}, structs.Force{0, 0}, 1000},
		{structs.Coord{X: 100, Y: 500}, structs.Force{0, 0}, 1000},
	}

	fmt.Printf("%-60s", "Opening the csv")
	starsSlice = csv.Import("data/structure03.ita.uni-heidelberg.de_26635.csv", 0, 4000, starsSlice)
	fmt.Printf("Done\n")

	fmt.Printf("%-60s", "Calculate the forces")
	forces.CalcAllForces(starsSlice)
	fmt.Printf("Done\n")

	fmt.Printf("%-60s", "Plotting the stars")
	draw.Slice(starsSlice, "out.png")
	fmt.Printf("Done\n")
}