about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--main.go22
1 files changed, 14 insertions, 8 deletions
diff --git a/main.go b/main.go
index 1727d62..48ed075 100644
--- a/main.go
+++ b/main.go
@@ -4,34 +4,40 @@ import (
 	"./csv"
 	"./draw"
 	"./forces"
-	"./llog"
 	"./structs"
 	"fmt"
+	"git.darknebu.la/bit/logplus"
 )
 
 func main() {
 	var threads int = 8
 	var frames int = 1
+	var stars int = 800
 
 	// the slice starsSlice stores the star structures
 	starsSlice := []structs.Star{}
 
-	llog.Good("Opening the csv")
-	starsSlice = csv.Import("data/U_ALL.csv", 0, 2500, starsSlice)
+	logplus.LogPositive("Opening the csv")
+	starsSlice = csv.Import("data/U_ALL.csv", 0, stars, starsSlice)
 
 	// Simulate the position of the stars after a specific time
 	for i := 0; i < frames; i++ {
-		llog.Great("--- --- --- --- ---")
-		llog.Great(fmt.Sprintf("Frames %d/%d", i, frames))
 
-		llog.Good("Calculate the new Star positions")
+		// Print the iterator
+		logplus.LogPositive("--- --- --- --- ---")
+		logplus.LogPositive(fmt.Sprintf("Frames %d/%d", i, frames))
+
+		// Calculate the position of stars after one timestep
+		logplus.LogPositive("Calculate the new Star positions")
 		starsSlice = forces.NextTimestep(starsSlice, 500000)
 
-		llog.Good("Calculate the acting forces")
+		// Calculate all the forces acting inside of the galaxy
+		logplus.LogPositive("Calculate the acting forces")
 		starsSlice = forces.CalcAllForces(starsSlice, threads)
 
+		// Save the slice
 		outputName := fmt.Sprintf("out_%d.png", i+1)
-		llog.Good(fmt.Sprintf("draw the slice and save it to %s\n", outputName))
+		logplus.LogPositive(fmt.Sprintf("draw the slice and save it to %s\n", outputName))
 		draw.Slice(starsSlice, outputName)
 	}
 }