   3d parabola
  I want to have a loop that will generate a 3d parabola.  At the moment i have this.double height=-2;for(int indx=15;indx<25;indx++){for(int indz=25;indz<35;indz++)Terrain->SetVertexHeight(indz,indx,(-(height-2)*(height+2))+1);height+=0.4;}How would i make it so it comes out like a dome shape rather than like a half circle sort of bridge. 
  Try playing with some functions f(x) (exp,sin,..) and check if they fit the shape you want for your dome, it''s easy to translate to 3D. I don''t know why you start with indx at 15, you should have such a loop :for x=-5 to 5 for z=-5 to 5   height = (x*x + z*z)  // f(x,z) = x^2 + z^2   setHeight(x+5,height*some_constant,z+5) end for;end for; ;  strange formula... I don't understand what your code has to do with a parabola nor a hafl-circle.In order to make a dome centered around the z-axis, use following functions to find z coordinates of a vertex depending on x, y coordiantes.For a 3D parabola (can be asymetric):  /*  * param: x[] ,y[] - x,y coordinate pairs which will be used to compute the corresponding z coordinate. * param: minX, maxX, minY, maxY - the 4 "main zeros" of the parabola. * param: maxHeight - the height of the parabola maximum. * * returns: z[] - corresponding z coordinate for the x,y pairs. */double[] zParabola(double[] x, double[] y, double minX, double maxX, double minY , double maxY, double maxHeight){z = new double[x.length];maxZ = maxHeight / ( (maxX - minX)/2 * (minX - maxX)/2 + (maxY - minY)/2 * (minY - maxY)/2 );for (int i=0; i<z.length; i++)    z[i] = maxZ*((x[i] - minX)*(x[i] - maxX) + (y[i] - minY)*(y[i] - maxY));return z;}sorry if it's not c++ code, i'm too used to java to change! ;-)However, it should work with minimal changes (if i didn't made a mistake!).[edited by - misterX on February 15, 2004 10:02:32 AM];  That''s an equation for a parabola.  Just like y=-(x-2)(x+2)  it has x intersects at -2 and 2 that why height starts at -2.  thanks i''ll convert it to c++ and see what i get. ;  cool got it working. thanks   [edited by - hello_there on February 15, 2004 7:27:53 PM];  What would be the equation for a half sphere.  It''s the holidays and i''m trying to think as little as possible. ;  y = sqrt(1.0f - x^2 - z^2)You'd probably want to use a sin/cos parameterization instead, to make it more evenly tessellated.[edit: z^2, not z2. can we have a 'preview' button please? :]   [edited by - fractoid on February 16, 2004 3:17:15 AM]