Re: [Numpy-discussion] OT: A Way to Approximate and Compress a 3DSurface
Wouldn't a random or regular subsampling of the set will do the job? For data interpolation: 2D-Delaunay triangulation based method (I think you can find one in the scipy cookbook). Nadav. -----Original Message----- From: numpy-discussion-bounces@scipy.org on behalf of Geoffrey Zhu Sent: Tue 20-Nov-07 19:50 To: Discussion of Numerical Python Subject: [Numpy-discussion] OT: A Way to Approximate and Compress a 3DSurface Hi Everyone, This is off topic for this mailing list but I don't know where else to ask. I have N tabulated data points { (x_i, y_i, z_i) } that describes a 3D surface. The surface is pretty "smooth." However, the number of data points is too large to be stored and manipulated efficiently. To make it easier to deal with, I am looking for an easy method to compress and approximate the data. Maybe the approximation can be described by far fewer number of coefficients. If you can give me some hints about possible numpy or non-numpy solutions or let me know where is better to ask this kind of question, I would really appreciate it. Many thanks, Geoffrey _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
Nadav Horesh wrote:
Wouldn't a random or regular subsampling of the set will do the job?
I have N tabulated data points { (x_i, y_i, z_i) } that describes a 3D surface. The surface is pretty "smooth."
If it's equally "smooth" everywhere, then yes, a subsampling would work fine, but I'm guessing the OP wants something smarter than that.
For data interpolation: 2D-Delaunay triangulation based method (I think you can find one in the scipy cookbook).
yup -- but then you need the decimation to remove the "unneeded" points. I don't think Scipy has that. the GNU Triangulated Surface Library: http://gts.sourceforge.net/ should do what you want, but I don't know of any Python bindings -- you may be able to write some to the routines you need without too much pain. CGAL may have something too, and it does have Python bindings. http://cgal-python.gforge.inria.fr/ -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@noaa.gov
Christopher Barker wrote:
For data interpolation: 2D-Delaunay triangulation based method (I think you can find one in the scipy cookbook).
yup -- but then you need the decimation to remove the "unneeded" points. I don't think Scipy has that.
The sandbox does, thanks to Robert Kern. (And I should really submit a patch to move this into the main scipy.) http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
Andrew Straw wrote:
Christopher Barker wrote:
For data interpolation: 2D-Delaunay triangulation based method (I think you can find one in the scipy cookbook). yup -- but then you need the decimation to remove the "unneeded" points. I don't think Scipy has that.
The sandbox does, thanks to Robert Kern. (And I should really submit a patch to move this into the main scipy.) http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
No, this does interpolation. It does not do surface simplification. Also, I'm moving the package over to scikits, instead. http://projects.scipy.org/scipy/scikits/browser/trunk/delaunay -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
participants (4)
-
Andrew Straw
-
Christopher Barker
-
Nadav Horesh
-
Robert Kern