   Hermite patch
  Hey guys!I am developping a landscape where I would like to generate a Hermite patch or a patch closed to its behaviour. What I need is a patch defined by positions and normals and with a surface going through control points.The problem is that I find a lot of documentation about 2D curve but not for 3D surface. Do you know where I can find it?Thansks a lot!Arno.[Edited by - ArnoAtWork on June 8, 2006 7:46:03 AM]
  Hi!I think you would be better off with bezier patches, which have all the characteristics you're looking for.After a quick search I came across this article: http://web.cs.wpi.edu/~matt/courses/cs563/talks/surface/bez_surf.htmlwhich covers bezier patches quite nicely.Hope that helps.Cheers!   ;  Unfortunately, the control points are altimetric data. In this case, surface must connect the control points. In the case of Bezier, control points are not on the surface.   ;  The patch goes trough the corner control points of the Bezier patch and the rest of the control points define the normals. This is also the case with Hermite patches, and I don't know of a patch that would go through ALL control points, as then you could not define the normals.Why not use the heightdata for the points the patch goes through, and calculate the points which define the normals?Cheers!   ;  "The patch goes trough the corner control points of the Bezier patch and the rest of the control points define the normals"The control points do not only define the normals but the behaviour of the curve. In Hermite case the patch go through all control points because you define a patch of four points and the calculation is done using position and tangents of each of these four control points...   ;  Yes, I was actually simplifying a "little" with stating the control points define the normals, they truly define tangents in both directions and also "twist" at the corners.However, in the only references I found, they state that the Hermite patch has more or less the same layout, 4 points defining the corners, tangents in both directions and "twist" vectors (for example here: http://www.dotcsw.com/poy2002.txt)As I see it, the difference between Bezier and Hermite patches is conceptually the same as between Bezier and Hermite splines, that being the different representation of the tangents.I hope someone more qualified than me will come over here and shed some light on this though, as you made me a bit uncertain here... :)   ;  Thank you for your help.I finally found a document talking about Hermite patch ;)http://www.microflown.com/data/2005_Development%20of%20an%20Energy-based%20Nearfield%20Acoustic%20Holography%20System.pdfArno.   ;  You want to have a look at natural cubic splinesThere it is guaranteed that the surfaces goes through the control points and they are pretty easy to implementEvaluate natural cubic splinesLets say you got N control points.To calculate the coefficients(Z0,...,Zn) you need to evaluate a n-2 dimensional tridiagonal matrix(linear equation system).So you get the coefficients (Z1,...,Zn-1)Z0 = Zn = 01.Just calculate the determinant of the tridiagonal matrix.2.Now you need to calculate the other N-2 determinants for the result vectorz=(Z1,...,Zn-1)Az = BFor Z1:Use the unmodified tridiagonal matrixa)replace the first column of the matrix with the result vector Bb)calculate determinant dz1c) Z1 = dz1 / det(tridiagonal matrix)analog for the other coefficients Z2,...,Zn-1Just let me know if you need some reference code, I have implemented a general matrix class which is used by my natrual cubic spline evaluator. ~ 250 lines of code all together.   ;  A hermite curve is prob. not you best bet (I would suggest  catmull rom is what your after).  You will need a border region of unused points along the edge of your surface however.   ;  natural cubic splines don t.   