3D simulation in Java