about summary refs log tree commit diff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go22
1 files changed, 7 insertions, 15 deletions
diff --git a/main.go b/main.go
index e10aa2a..d173cba 100644
--- a/main.go
+++ b/main.go
@@ -9,14 +9,6 @@ import (
 	"fmt"
 )
 
-func AddToChannel(starsChan chan structs.Star, slice []structs.Star) {
-
-	for index, _ := range slice {
-		starsChan <- slice[index]
-	}
-
-}
-
 func main() {
 	// the slice starsSlice stores the star structures
 	starsSlice := []structs.Star{
@@ -29,18 +21,18 @@ func main() {
 		{structs.Coord{X: 20000.0, Y: 80000}, structs.Force{X: 0, Y: 0}, 4000000},
 	}
 
-	// Define a channel
-	starsChannel := make(chan structs.Star, len(starsSlice))
-
 	llog.Good("Opening the csv")
 	starsSlice = csv.Import("data/structure03.ita.uni-heidelberg.de_26635.csv", 0, 2000, starsSlice)
-	go AddToChannel(starsChannel, starsSlice)
+	// starsSlice = csv.Import("data/U_ALL.csv", 0, 2000, starsSlice)
 	fmt.Printf("Done\n")
 
 	llog.Good("Calculate the acting forces")
 	forces.CalcAllForces(starsSlice)
 
-	llog.Good("Drawing the slice")
-	draw.Slice(starsSlice, "out_50000.png")
-	fmt.Printf("Done\n")
+	// Filename without suffix and extension
+	path := "out"
+
+	llog.Good(fmt.Sprintf("draw the slice and save it to %s", path))
+	draw.Slice(starsSlice, path)
+
 }