Create a bubble effect on a grid OpenGL-ES
- by Charles Michael
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