Airport surfaces

"Curtis L. Olson" <[email protected]> Fri, 09 Sep 2005 16:11:57 -0500
Newsgroups gmane.games.flightgear.terragear.devel
Message-ID <[email protected]>
Here's a quick update on airport surfaces.

I have removed the libnurbs++ dependency from TerraGear.  I got sick of 
the build problems on newer systems, it always leaked memory, and 
occasionally failed for no good reason.

I have replaced libnurbs++ with libnewmat11 which is a much simpler 
[large] matrix library.  With newmat I can use a least squares technique 
to fit an arbitrary function to the sampled surface data.  Most people 
are familiar with the least squares technique for fitting the best line 
to a bunch of 2d data, however many people don't know that this same 
technique can be applied to fitting a 3d polynomial to a surface.  It's 
actually a pretty cool thing if math excites you.

For instance, I could pick some 3d surface function such as:

f(x,y) = a*x + b*x*y + c*y + d*x*x* + e*x*x*y + f*x*x*y*y + g*y*y + h*x*y*y

If I have a bunch of sampled (x,y,z) points I can wave the mathemagic 
wand and get the values of a, b, c, d, e, f, g, and h that make the 
above function best fit the original data.

The resulting surface isn't quite as flexible as a nurbs surface 
(without adding an obscene amount of terms) but the result is still 
better than the perceived quality of our surface data.

My plan is to devote some time in the upcoming weeks to taking a pass 
through the terragear code, fixing some known problems, and hopefully 
adding a couple of useful features that I've had in the back of my head 
for a while.  And that would include looking at the shapefile patches 
someone submitted to me (which are still in my inbox someplace.)

Regards,

Curt.

-- 
Curtis Olson        http://www.flightgear.org/~curt
HumanFIRST Program  http://www.humanfirst.umn.edu/
FlightGear Project  http://www.flightgear.org
Unique text:        2f585eeea02e2c79d7b1d8c4963bae2d


_______________________________________________
Terragear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/terragear-devel
2f585eeea02e2c79d7b1d8c4963bae2d