discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Bezier Courves - elevation model

C
cbernhardt
Tue, Mar 7, 2017 8:59 PM

rob63:
Since your example looks like a DEM (digital elevation mode) of the surface
of the earth, I will tell you how to solve this problem the way land
surveyors do it, but you probably will not like the answer.  I was a land
surveyor for many years and wrote code in AutoCad to solve this problem.
Basically surveying data is just a group of x,y,z coordinates, not
necessarily, and usually not, in a grid pattern.  I used the software to
calculate volumes of coal piles and computing earthwork volumes on large
grading projects.

The process involves creating a TIN (triangular irregular network) from the
x,y,z coordinate data.  If you do a search for TIN,  Renka, and Delaunay you
will probably find some sample code that you may be able to adapt to your
particular situation.

Personally I would not even attempt to try programming this method in
OpenSCAD.  Below is a model of a large coal pile I created in AutoCad.
There were over 26,000 data points and the TIN was created in about 2
seconds on a 32 bit 3.0GHz machine.
http://forum.openscad.org/file/n20793/tin.jpg

--
View this message in context: http://forum.openscad.org/Bezier-Courves-elevation-model-tp20778p20793.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

rob63: Since your example looks like a DEM (digital elevation mode) of the surface of the earth, I will tell you how to solve this problem the way land surveyors do it, but you probably will not like the answer. I was a land surveyor for many years and wrote code in AutoCad to solve this problem. Basically surveying data is just a group of x,y,z coordinates, not necessarily, and usually not, in a grid pattern. I used the software to calculate volumes of coal piles and computing earthwork volumes on large grading projects. The process involves creating a TIN (triangular irregular network) from the x,y,z coordinate data. If you do a search for TIN, Renka, and Delaunay you will probably find some sample code that you may be able to adapt to your particular situation. Personally I would not even attempt to try programming this method in OpenSCAD. Below is a model of a large coal pile I created in AutoCad. There were over 26,000 data points and the TIN was created in about 2 seconds on a 32 bit 3.0GHz machine. <http://forum.openscad.org/file/n20793/tin.jpg> -- View this message in context: http://forum.openscad.org/Bezier-Courves-elevation-model-tp20778p20793.html Sent from the OpenSCAD mailing list archive at Nabble.com.
RP
Ronaldo Persiano
Tue, Mar 7, 2017 9:26 PM

@cbernhardt

Delaunay triangulation is standard for scattered data. But as stated,
droftarts input data are distributed on a regular grid (whose Delaunay
triangulation is trivial). I have tried to code a Delaunay triangulation
method in OpenSCAD. The hardest part is to implement the triangulation data
structure with just simple lists. I gave up.

2017-03-07 17:59 GMT-03:00 cbernhardt charlie@carols62.com:

rob63:
Since your example looks like a DEM (digital elevation mode) of the surface
of the earth, I will tell you how to solve this problem the way land
surveyors do it, but you probably will not like the answer.  I was a land
surveyor for many years and wrote code in AutoCad to solve this problem.
Basically surveying data is just a group of x,y,z coordinates, not
necessarily, and usually not, in a grid pattern.  I used the software to
calculate volumes of coal piles and computing earthwork volumes on large
grading projects.

The process involves creating a TIN (triangular irregular network) from the
x,y,z coordinate data.  If you do a search for TIN,  Renka, and Delaunay
you
will probably find some sample code that you may be able to adapt to your
particular situation.

Personally I would not even attempt to try programming this method in
OpenSCAD.  Below is a model of a large coal pile I created in AutoCad.
There were over 26,000 data points and the TIN was created in about 2
seconds on a 32 bit 3.0GHz machine.
http://forum.openscad.org/file/n20793/tin.jpg

--
View this message in context: http://forum.openscad.org/
Bezier-Courves-elevation-model-tp20778p20793.html
Sent from the OpenSCAD mailing list archive at Nabble.com.


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

@cbernhardt Delaunay triangulation is standard for scattered data. But as stated, droftarts input data are distributed on a regular grid (whose Delaunay triangulation is trivial). I have tried to code a Delaunay triangulation method in OpenSCAD. The hardest part is to implement the triangulation data structure with just simple lists. I gave up. 2017-03-07 17:59 GMT-03:00 cbernhardt <charlie@carols62.com>: > rob63: > Since your example looks like a DEM (digital elevation mode) of the surface > of the earth, I will tell you how to solve this problem the way land > surveyors do it, but you probably will not like the answer. I was a land > surveyor for many years and wrote code in AutoCad to solve this problem. > Basically surveying data is just a group of x,y,z coordinates, not > necessarily, and usually not, in a grid pattern. I used the software to > calculate volumes of coal piles and computing earthwork volumes on large > grading projects. > > The process involves creating a TIN (triangular irregular network) from the > x,y,z coordinate data. If you do a search for TIN, Renka, and Delaunay > you > will probably find some sample code that you may be able to adapt to your > particular situation. > > Personally I would not even attempt to try programming this method in > OpenSCAD. Below is a model of a large coal pile I created in AutoCad. > There were over 26,000 data points and the TIN was created in about 2 > seconds on a 32 bit 3.0GHz machine. > <http://forum.openscad.org/file/n20793/tin.jpg> > > > > -- > View this message in context: http://forum.openscad.org/ > Bezier-Courves-elevation-model-tp20778p20793.html > Sent from the OpenSCAD mailing list archive at Nabble.com. > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
CA
Carsten Arnholm
Tue, Mar 7, 2017 9:36 PM

On 07. mars 2017 21:59, cbernhardt wrote:

The process involves creating a TIN (triangular irregular network) from the
x,y,z coordinate data.  If you do a search for TIN,  Renka, and Delaunay you
will probably find some sample code that you may be able to adapt to your
particular situation.

Personally I would not even attempt to try programming this method in
OpenSCAD.  Below is a model of a large coal pile I created in AutoCad.
There were over 26,000 data points and the TIN was created in about 2
seconds on a 32 bit 3.0GHz machine.
http://forum.openscad.org/file/n20793/tin.jpg

Very cool. Does this dataset or similar data exist on the net for download?

Carsten Arnholm

On 07. mars 2017 21:59, cbernhardt wrote: > The process involves creating a TIN (triangular irregular network) from the > x,y,z coordinate data. If you do a search for TIN, Renka, and Delaunay you > will probably find some sample code that you may be able to adapt to your > particular situation. > > Personally I would not even attempt to try programming this method in > OpenSCAD. Below is a model of a large coal pile I created in AutoCad. > There were over 26,000 data points and the TIN was created in about 2 > seconds on a 32 bit 3.0GHz machine. > <http://forum.openscad.org/file/n20793/tin.jpg> Very cool. Does this dataset or similar data exist on the net for download? Carsten Arnholm