I have drew a hemi-sphere by myself, and would like to do basic jellyfish animation by animating the vertices of the hemi-sphere. I tried a lot of experiments but it seems I'm doing it wrong. I need hints or idea on about doing it.
This is the code on how to draw a hemi-sphere. I don't know what values actually to play with to animate the sphere as a jellyfish.
for(float phi = 0.0; phi < 1.567; phi += factor) {
glBegin(GL_QUAD_STRIP);
for(float theta = 0.0; theta < 2*3.14 + factor; theta += factor)
{
x = rh * sin(phi) * cos(theta);
z = rh * sin(phi) * sin(theta);
y = -rh * cos(phi);
gl::vertex(Vec3f(x, y, z));
x = rh * sin(phi + factor) * cos(theta);
z = rh * sin(phi + factor) * sin(theta);
y = -rh * cos(phi + factor);
gl::vertex(Vec3f(x, y, z));
}
glEnd();
}