Login  Register

Moving spheres to new coordinates

Posted by dorien on Oct 26, 2015; 1:27pm
URL: https://forum.jogamp.org/Moving-spheres-to-new-coordinates-tp4035596.html

Is there a straightforward way of animating spheres with 3D coordinates in an animation? I have been reading a bunch of tutorials but nothing quite does that exactly.

Here is an example of what I want to achieve:

Second 0:
- sphere at (0,0,1): (relative) size 1, colour green
- sphere at (1,1,1): size 2, colour green

Second 1:
- sphere at (0,2,2): size 3, colour green
- sphere at (4,4,1): size 4, colour red
- sphere at (1,2,1): size 1, colour green

Second 2:
- sphere at (1,0,1): size 2, colour red

This synchronized with music playback.

With or without smooth transitions. I have no idea how to get started on this with JOGL or if it's possible.


I have read that I can use glu
import net.java.games.jogl.GL;
import net.java.games.jogl.GLU;
import net.java.games.jogl.GLUquadric;

GLUquadric quad = glu.gluNewQuadric();
glu.gluSphere(quad, 2, 10, 15);
glu.gluDeleteQuadric(quad);


I am very new to all of this. If there is somebody out there that can help me, please reply or send me a pm.