This is true. The technique we have used is to take the regular elevation grid and sub-divide in a 3:1 ratio. We use the AWT general path classes to plot a bezier spline over the grid points, so in a 100 x 100 heightmap that would create 200 splines. Thats 100 paths along the x axis and 100 paths along the z axis. We then create a virtual heightmap which contains the splines only as data. When we want a point at x,z we calculate the spline height at four locations bounding the desired point. We then interpolate between the bounding X axis and Z axis to create two Y values and then average them. So then if you took a grid and made geoemtry you would have bends between the points instead of straight lines. The last trick is to eleminate geoemtry which does not match an error metric of some kind (coplanar for example) to reduce the geometry.
Dave Yazel http://www.magicosm.net ----- Original Message ----- From: "Scott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 8:44 PM Subject: Re: [JAVA3D] Help smoothing polygon's edges Smoothing the normals won't eliminate jaggies and sharp edges, it will only smooth out your lighting. You might want to look at creating some splines or bezier curves, and throw a few more polygons into the mix. But to answer your question directly, a quick and dirty method of normal smoothing (when you have face normals but not vertex normals) is: (your elevation grid from a Plan view) P1 P2 P3 Normal of Point1 is: n.x=(P1.y-P2.y)/2.0; n.y=1.0; n.z=(P1.y-P3.y)/2.0; n.normalize(); That has drawbacks (the furthest right row of vertex's have to be handled differently), and overall it's not that accurate, but can certainly smooth out your mesh. If anyone has better methods, I'd love to hear them Scott ----- Original Message ----- From: "Paula Sanchez" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 24, 2002 6:27 PM Subject: [JAVA3D] Help smoothing polygon's edges > Hello Everyone, > > I am trying to create a surface with variations in elevation and layers of > soil. I would like to eliminate the sharp edges of the elevations and > make them appear smoother. Does anybody have any suggestions on how to do > this in Java 3D. > > I have tried the crease angle, but I have not had any luck with it. If > you could send me a small sample of code, I will greatly appreciate it. > > Code changing the crease angle: > NormalGenerator method setCreaseAngle((float) Math.toRadians(100) > > Something desireable could be what it is in the webpage: > http://grunwald.ifas.ufl.edu/Projects/VR/VRML_files/vrml.html > > Thanks a lot, > > Paula. > [EMAIL PROTECTED] > > Paula Sanchez > [EMAIL PROTECTED] > > The fear of God is the beginning of knowledge. St. Ivo > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA3D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".