Create a bubble effect on a grid OpenGL-ES
Posted
by Charles Michael
on Stack Overflow
See other posts from Stack Overflow
or by Charles Michael
Published on 2010-06-04T21:37:33Z
Indexed on
2010/06/07
6:22 UTC
Read the original article
Hit count: 295
Hi there. I have created a grid with 40 x 40 vertex3D (small but useful)
I can pick a single vertex out of that grid by simply calling a function with the position array[X][Y], And therefore neighbors too. How can I raise up neighbor vertex Z value so they kinda look like a bubble or sphere kind of thingy?
My first tough was to use:
Neighbor_vertex.Z = sin(PI/4 * 1 - ( 1/ distance_between_Neighbor_and_Pivot) ) * desired_Max_Height
But all I got is something like a wave.... and I would like to have a bubble or Sphere like shape.
THX dudes and dudettes
© Stack Overflow or respective owner