Moving spheres to new coordinates

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Moving spheres to new coordinates

dorien
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.
Reply | Threaded
Open this post in threaded view
|

Re: Moving spheres to new coordinates

gouessej
Administrator
Hi

dorien wrote
import net.java.games.jogl.GL;
import net.java.games.jogl.GLU;
import net.java.games.jogl.GLUquadric;
You still use a terribly old pre-beta version of JOGL 1, maybe released in 2006 or 2005. Please use JOGL 2.3.2. JOGL 1 is no longer maintained.

You should look at the OpenGL Red Book to learn the OpenGL basics, translation, rotation, etc... What you want to do is doable with JOGL but you need to understand OpenGL which doesn't seem to be the case right now.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Moving spheres to new coordinates

elect
In reply to this post by dorien
Hi dorien,

so, in order to get you start quick, set up your ide and start from a simple rotating Hello Triangle

To generate geometry for your sphere, you may want to do something like this ..

But don't worry for the moment, start with the "hello triangle" and then once you get that working and you get a raw idea about the very OpenGL basics, you can move on and try the sphere

Have you already used an IDE and/or cloned projects?