carving up the land

Google Earth image Rendering of STL file Photo of finished carving
Keuka Lake (Google Earth) Com­puted STL solid model Fin­ished product

It started when L. spot­ted an arti­cle in Ready­Made about Flu­id­Forms, a com­pany which makes cus­tomized “Fluid Earth bowls” out of wood. You go to their Web site, select a geo­graphic area of inter­est, and their com­put­ers carve a scale model of that ter­rain out of a slab of wood. In the­ory you can use it as a bowl for your vegetables.

“That’s easy,” I decided. We had recently acquired a 3-axis CNC router at work, and although I didn’t yet know how to use it, I fig­ured it would be sim­ple enough. We were slated to visit New York’s Fin­ger Lakes region in a cou­ple of weeks, so an obvi­ous first project would be a gift which shows the ter­rain near her family’s lake house. Now, for the data.

Google Earth was the log­i­cal start­ing point, since every­one knows how to use it. Unfor­tu­nately, it is also a closed-source com­mer­cial pro­gram. They make it very easy to put data into it, but for var­i­ous rea­sons it is very dif­fi­cult to get data back out. NASA offers a sim­i­lar appli­ca­tion called World Wind which solves the open­ness prob­lem, but the full fea­ture set is only avail­able on the Microsoft Win­dows ver­sion. What to do?

The solu­tion was pro­vided by the US Geo­log­i­cal Sur­vey, which oper­ates a Web ser­vice called The National Map Seam­less Server. The USGS pro­vides a vari­ety of geo­ref­er­enced data prod­ucts free of charge. These are nor­mally divided up into rec­tan­gu­lar quad­ran­gles which do not nec­es­sar­ily cover the entire area of inter­est. But the Seam­less Server can qui­etly stitch together mul­ti­ple maps. You sim­ply select the area of inter­est, choose the data prod­ucts you need, and down­load them.

Flu­id­Forms, like Google Earth, relies on world­wide ele­va­tion data from Feb­ru­ary 2000′s Shut­tle Radar Topog­ra­phy Mis­sion. NASA cal­cu­lated the height at every point on the Earth’s sur­face using space-based radar inter­fer­om­e­try. Because it is based on radar reflec­tions, it is not tremen­dously accurate—it can’t dis­cern between dense tree­tops and the ground, for example—but it does cover most of the Earth at 30 meter res­o­lu­tion. But because I’m mod­el­ing loca­tions in the United States, the USGS offers me a bet­ter choice: the National Ele­va­tion Dataset. The NED is derived from a vari­ety of sources, includ­ing tra­di­tional sur­vey­ing, and is largely hand-checked for accu­racy. It is avail­able in ridicu­lously high res­o­lu­tions (presently 10 meters, with 3 meters com­ing soon). As a result, even lit­tle streams and creeks are vis­i­ble. Perfect!

The next step was to find a pro­gram to con­vert down­loaded ele­va­tion datasets into 3D solid mod­els in a for­mat that could be under­stood by com­put­er­ized man­u­fac­tur­ing tools like 3D print­ers and CNC routers. I quickly dis­cov­ered that no such pro­gram exists, so I wrote one. The cho­sen DEM data for­mat (Geo­T­IFF) as basi­cally a grid of floating-point alti­tude val­ues geo­ref­er­enced to the UTM coor­di­nate sys­tem. Had I been inter­ested in a larger area, I would have had to “unwrap” the Mer­ca­tor pro­jec­tion onto a spher­i­cal or ellip­ti­cal sur­face, but because the lake is rel­a­tively small, I decided to forego the extra math. The pro­gram sim­ply applies the proper scal­ing fac­tors and adjusts the Z-height to reflect the desired min­i­mum thick­ness of the wood. The solid model out­put is in STL for­mat, which is basi­cally a giant mesh of inter­con­nected tri­an­gles in 3D space. Each tri­an­gle is described by 3 ver­tices and a unit nor­mal vec­tor to tell the com­puter which side is the outer sur­face. For sim­plic­ity, I turned the entire X-Y grid into tri­an­gles. The pro­gram con­nects the tri­an­gu­lated sur­face with yet more tri­an­gles which describe the sides and bot­tom of the fin­ished prod­uct. Done.

Unfor­tu­nately, in my zeal for detail, I dis­cov­ered that STL files with more than one mil­lion tri­an­gles can choke even a pow­er­ful com­puter. Ide­ally I would reduce the num­ber tri­an­gles in non-detailed areas, but such algo­rithms are beyond my skill level. I’m just an elec­tri­cal engi­neer here. I wound up reduc­ing the res­o­lu­tion of the whole area.

With the STL solid model com­plete, all that was left was to gen­er­ate toolpaths—the actual motions that the CNC router will fol­low while carv­ing. For­tu­nately, the router comes with CAM soft­ware to accom­plish this task.

For our first piece, we lam­i­nated 3 pieces of Baltic Birch ply­wood with PVA glue. The outer dimen­sions are 16 x 14.5 inches. The carv­ing takes about 3 hours: a first pass with a 1/2″ diam­e­ter mill roughs the wood down to the approx­i­mate shape, then a final pass with a 1/8″ ball-end mill cre­ates the final sur­face. After about an hour of sand­ing and a cou­ple coats of Dan­ish oil, the bowl was done. Success!

One Comment

  1. Ralf Kull July 15, 2008

    Hello Scott,
    search­ing the inter­net using Google I found your Home­page.
    First of all I want to say you made a good job.
    I am in the same sit­u­a­tion as you, I want to mill a ter­rain nearby my house. In the mean­while I found links, where to get the geo­ref­er­enced data from ger­many. Also I found the pro­gram “3DEM” which can import sev­eral data’s and export geo­t­iff, tiff’s with 24bit res­o­lu­tion per pixel. From for­mer times I now the pro­gram bmp2iges. This pro­gram can import bitmaps and con­vert them into .stl or .iges. My con­cern is, that this pro­gram can only read “nor­mal” tiff’s with 8bit res­o­lu­tion per pixel. Up to now I didn’t found a freeware/shareware pro­gram to con­vert geo­t­iff to stl/iges.
    The pro­gram “Glob­almap­per” can import sev­eral files and export stl, but the costs are 254$. To much for me just to try it.
    Another pro­gram ist Art­cam, it can also import tiff’s, con­vert them to 3D data and pro­duces g-code for milling machines. But this pro­gram costs ~10.000$, also to much for me:-) And I guess it will also import only 8bit res­o­lu­tion tiff’s.
    Are you using the full reso­li­tion of geotiff’s, that means 24bit for the ele­va­tion per pixel? Do you share your program?

    Best regards
    Ralf
    P.S.: Sorry for my worse english

Leave a comment

Leave a Comment

May 31, 2008 May 31, 2008 archives by Scott [permanent link]