Class PrimitiveGalaxySimulator
java.lang.Object
org.episteme.natural.ui.viewers.physics.astronomy.PrimitiveGalaxySimulator
- All Implemented Interfaces:
GalaxySimulator
Primitive Matrix/Array-less implementation.
Operates directly on StarParticle POJOs using double math.
*
Reference:
Prim, R. C. (1957). Shortest connection networks and some generalizations. Bell System Technical Journal, 36(6), 1389-1401.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublegetG2X()doublegetG2Y()getName()voidinit(List<StarParticle> stars) Initialize the simulator with the star field.voidsetGalaxy2State(double x, double y, double vx, double vy) Updates the state of the second galaxy core.voidupdate(boolean collisionMode, double unusedX, double unusedY) Update the simulation by one step.
-
Constructor Details
-
PrimitiveGalaxySimulator
public PrimitiveGalaxySimulator()
-
-
Method Details
-
init
Description copied from interface:GalaxySimulatorInitialize the simulator with the star field.- Specified by:
initin interfaceGalaxySimulator
-
setGalaxy2State
public void setGalaxy2State(double x, double y, double vx, double vy) Description copied from interface:GalaxySimulatorUpdates the state of the second galaxy core.- Specified by:
setGalaxy2Statein interfaceGalaxySimulator
-
getG2X
public double getG2X() -
getG2Y
public double getG2Y() -
update
public void update(boolean collisionMode, double unusedX, double unusedY) Description copied from interface:GalaxySimulatorUpdate the simulation by one step.- Specified by:
updatein interfaceGalaxySimulator
-
getName
- Specified by:
getNamein interfaceGalaxySimulator
-