public class Pendulum
extends java.lang.Object
Constructor and Description |
---|
Pendulum(double timestepinsec,
boolean enableVisualization)
Create a pendulum
|
Modifier and Type | Method and Description |
---|---|
double |
getPhi()
returns the angle of the pendulum. 0 ......
|
double |
getPosition()
returns the x position of the slide
|
javax.swing.JPanel |
getVisualization()
Returns the visualization of the pendulum (only if the visualization has
been enabled in the constuctor)
|
double |
getVp()
returns the tangential velocity of the pendulum-mass
|
double |
getVs()
returns the x velocity of the slide
|
void |
movePendulum(double forceX)
does one simulation-step
|
public Pendulum(double timestepinsec, boolean enableVisualization)
timestepinsec
- time between two simulation-stepsenableVisualization
- defines if the simulation is done with or without
visualizationpublic double getPosition()
public double getVs()
public double getPhi()
public double getVp()
public javax.swing.JPanel getVisualization()
public void movePendulum(double forceX)
forceX
- the strength that moves the slide