Re: [Flightgear-devel] nurbs headaches
On Tuesday 09 November 2004 15:38, Curtis L. Olson wrote: > Gerhard Wesp wrote: > >Hmm... About what resolution are we talking here? > > Generally, 90m SRTM. > > >What additional data do you have available for the runways? > > I guess you have it's position (two endpoints? center > > point, direction, length?) and ``elevation''? Commonly, the > > runway elevation at both thresholds is given in the approach > > plates, is this data available? > > Often, elevation of each touch down point is available, > although that is not included in Robin's database. > > >How about the following KISS solution: Do a first- or > > second-order approximation of the elevation of the > > centerline (least squares). Define the runway using its > > width, this centerline and no sideways slope. > > This [wc]ould cause problems in places where runways intersect > and doesn't account for the surface of all the taxiways and > the rest of the airport, and it doesn't help blend the airport > cleanly into the surrounding terrain. > > For what it's worth, I believe I have beaten the nurbs > approach into submission (mostly) and I hope that the next > scenery release will be an incremental improvement over the > last one, with better surface matching to the underlying dem, > but with fewer odd artificats (I believe I have eliminated > those 5m drop offs that occured in the middle of a very few > runways.) > > Regards, > > Curt. Hello Curt, I might be a bit late on this one - you say you've beaten the problem now. I've used nurbs and splines quite a lot in 3d modelling but don't have any programming experience with them. First of all, when I use them for modelling I don't normally expect the resulting curves to pass through the knots/control points. However, with the software I use I can 'invert' the control points so that the curve _does_ pass through them. The difference is like drawing a circle within a square or regular polygon, so that the curve touches the sides, or outside the square or polygon, so that it touches the points. I'd imagine that the data you've got - an array of x,y,z points - would be treated as the control points for the curves and so I wouldn't expect the curves to pass through them. It's also possible to use double or triple points to control the 'sharpness' of the curve. They'd also commonly be used along the edges of a nurb or spline patch to make sure the patch actually extends to the edges. Dunno if that's any help - it's one of those things that are easier to do than explain. LeeE ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
> This [wc]ould cause problems in places where runways intersect and > doesn't account for the surface of all the taxiways and the rest of the Ack. I missed that point. > For what it's worth, I believe I have beaten the nurbs approach into > submission (mostly) and I hope that the next scenery release will be an OK, congrats! Cheers -Gerhard -- Gerhard Wesp o o Tel.: +41 (0) 43 5347636 Bachtobelstrasse 56 | http://www.cosy.sbg.ac.at/~gwesp/ CH-8045 Zuerich \_/ See homepage for email address! ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
Gerhard Wesp wrote: Hmm... About what resolution are we talking here? Generally, 90m SRTM. What additional data do you have available for the runways? I guess you have it's position (two endpoints? center point, direction, length?) and ``elevation''? Commonly, the runway elevation at both thresholds is given in the approach plates, is this data available? Often, elevation of each touch down point is available, although that is not included in Robin's database. How about the following KISS solution: Do a first- or second-order approximation of the elevation of the centerline (least squares). Define the runway using its width, this centerline and no sideways slope. This [wc]ould cause problems in places where runways intersect and doesn't account for the surface of all the taxiways and the rest of the airport, and it doesn't help blend the airport cleanly into the surrounding terrain. For what it's worth, I believe I have beaten the nurbs approach into submission (mostly) and I hope that the next scenery release will be an incremental improvement over the last one, with better surface matching to the underlying dem, but with fewer odd artificats (I believe I have eliminated those 5m drop offs that occured in the middle of a very few runways.) Regards, Curt. -- Curtis Olsonhttp://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text:2f585eeea02e2c79d7b1d8c4963bae2d ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
Gerhard Wesp wrote: > What additional data do you have available for the runways? I guess you > have it's position (two endpoints? center point, direction, length?) Runway center point, orientation, length, width and in rare cases an exact elevation - not to think about that the whole stuff has to match thousands of small taxiway sections as well Martin. -- Unix _IS_ user friendly - it's just selective about who its friends are ! -- ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
> Unfortunately DEM data is *way* too noisy and has too much potential for > odd artifacts to use directly. What I have done is to take a coarse Hmm... About what resolution are we talking here? What additional data do you have available for the runways? I guess you have it's position (two endpoints? center point, direction, length?) and ``elevation''? Commonly, the runway elevation at both thresholds is given in the approach plates, is this data available? How about the following KISS solution: Do a first- or second-order approximation of the elevation of the centerline (least squares). Define the runway using its width, this centerline and no sideways slope. Cheers -Gerhard -- Gerhard Wesp o o Tel.: +41 (0) 43 5347636 Bachtobelstrasse 56 | http://www.cosy.sbg.ac.at/~gwesp/ CH-8045 Zuerich \_/ See homepage for email address! ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
On Monday 08 November 2004 13:28, Christian Mayer wrote: > Curtis L. Olson schrieb: > > Christian Mayer wrote: > >> Well, googling for "bezier 2d" gave me: > >> > >> http://www.cs.wpi.edu/~matt/courses/cs563/talks/surface/bez_surf.html > >> (not exactly what you are looking for, but it looked like an easy to > >> read "memory refresher") > > > > It would be great if I didn't have to write and debug my own bezier > > library, are you aware of any existing code that could help me out here? > > I don't know any implementations, but I'm sure Norman's sources are as > good as they allways are. :) > OpenGl has some NURBS support. Look for gluNurbs* These are listed in my 1.1 reference manual so they are not that recent. Also, the book "An introduction to NURBS" promises "C" code at http://www.mkp.com/NURBS/nurbs.html I have never looked at that site so I make no promise. Richard Harke ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
Curtis L. Olson schrieb: Christian Mayer wrote: What you might try is putting a bezier patch through the points. The Bezier curve guarantees you that it won't leave the convex hull of your points. But it won't go through your controll points (what you actually want to achive to smooth your data...) And IIRC bezier curves are good conditioned. How would I determine the control points? I'd take the noisy hight resolution DEM-data as the control points. The bezier surface will automatically smooth the data then. The bezier surface won't go through the control points - except the start and endpoint (in the 1D/2D case; in 3D the border points) I suggest you try an interactive demo of bezier lines (are the bezier surface demos as well?) in the internet. There are many Java-applet implementations arround. Well, googling for "bezier 2d" gave me: http://www.cs.wpi.edu/~matt/courses/cs563/talks/surface/bez_surf.html (not exactly what you are looking for, but it looked like an easy to read "memory refresher") It would be great if I didn't have to write and debug my own bezier library, are you aware of any existing code that could help me out here? I don't know any implementations, but I'm sure Norman's sources are as good as they allways are. :) BTW: At least in the case of bezier lines the implementation is very easy. I've done it a few times already. It's so easy that I prefer writing it myself than reading foreign code ;) CU, Christian PS: (Nearly) every paint/graphics programm has bezier curves. PPS: The reason why NURBS are thought of the "best splines" is just their flexibility (you can model exact circles). But in reality more simple splines are usually better suited PPPS: You can fill whole lectures on the pro and cons of the different splines ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
RE: [Flightgear-devel] nurbs headaches
Curtis L. Olson writes: > > It would be great if I didn't have to write and debug my own bezier > library, are you aware of any existing code that could help me out here? This is another 'classic' that has source available http://eros.cagd.eas.asu.edu/~farin/cagdbook/cagdbook.html Norman ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
RE: [Flightgear-devel] nurbs headaches
Curtis L. Olson writes: > > It would be great if I didn't have to write and debug my own bezier > library, are you aware of any existing code that could help me out here? Here is a classic source http://www.nar-associates.com/nurbs/c_code.html Note that you will want to repeat the edge vertices to insure that they are honored You might want to check out the main site too :-) http://www.nar-associates.com/ Norman ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
Christian Mayer wrote: NURBS aren't good conditioned. That means that depending on the input data it can easily happen that your result will be rubbish. I'm not married to nurbs, but I'm looking for a way to fit a smooth curved surface through a set of points. The nurbs++ library is what I found first, but the more I dig into it, the more problems I find with it. What you might try is putting a bezier patch through the points. The Bezier curve guarantees you that it won't leave the convex hull of your points. But it won't go through your controll points (what you actually want to achive to smooth your data...) And IIRC bezier curves are good conditioned. How would I determine the control points? Well, googling for "bezier 2d" gave me: http://www.cs.wpi.edu/~matt/courses/cs563/talks/surface/bez_surf.html (not exactly what you are looking for, but it looked like an easy to read "memory refresher") It would be great if I didn't have to write and debug my own bezier library, are you aware of any existing code that could help me out here? Thanks, Curt. -- Curtis Olsonhttp://www.flightgear.org/~curt HumanFIRST Program http://www.humanfirst.umn.edu/ FlightGear Project http://www.flightgear.org Unique text:2f585eeea02e2c79d7b1d8c4963bae2d ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d
Re: [Flightgear-devel] nurbs headaches
Curtis L. Olson schrieb: I find that when I try to interpolate a nurbs surface through the grid points, the resulting surface misses many/most of the points, which is not what I expected. I also tried a least squares fit which actually I *really* like, however, I'm finding that the least squares fit blows up on some data sets for no apparent reason ... there's nothing ill defined about the data sets it is blowing up on. NURBS aren't good conditioned. That means that depending on the input data it can easily happen that your result will be rubbish. I don't know what least square fit you are doing, but it might as well be badly implemented (I don't know of the top of my head if they are badly conditioned as well) What you might try is putting a bezier patch through the points. The Bezier curve guarantees you that it won't leave the convex hull of your points. But it won't go through your controll points (what you actually want to achive to smooth your data...) And IIRC bezier curves are good conditioned. Does anyone have any experience with nurbs++ No, I have never used nurbs++ or any other nurbs library who could help me out here? I've heard quite a bit over nurbs in my numerics course at university though I'm *not* looking for people who can help me google. Well, googling for "bezier 2d" gave me: http://www.cs.wpi.edu/~matt/courses/cs563/talks/surface/bez_surf.html (not exactly what you are looking for, but it looked like an easy to read "memory refresher") Oh, I forgot I shouldn't have helped you googling :( CU, Christian ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d