checkpoint post, checkin css change for h1 and h2
This commit is contained in:
parent
8a6bb0bbed
commit
7215ed48d5
6 changed files with 236 additions and 3 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
||||||
*.jpg
|
|
||||||
public/
|
public/
|
||||||
|
images/
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 2.3 MiB |
|
@ -6,4 +6,87 @@ date = "2022-11-11"
|
||||||
tags = ["3dprinting", "CAD", "GIS", "CNC", "art", "sundries", "proclamation"]
|
tags = ["3dprinting", "CAD", "GIS", "CNC", "art", "sundries", "proclamation"]
|
||||||
+++
|
+++
|
||||||
|
|
||||||
![a CNC-carved exaggerated relief of California made of plywood](PXL_20220723_214758454.jpg)
|
![A plywood slab carved with CNC into a topographic representation of California][main_image]
|
||||||
|
|
||||||
|
# A birthday wish
|
||||||
|
|
||||||
|
Last summer, I wanted to get my wife something nice for her birthday. For many years, she had
|
||||||
|
expressed an occasional and casual desire for a topographic carving of the state of California,
|
||||||
|
where we live, and I thought it might be something I could figure out how to get her. In the end,
|
||||||
|
after many dozens of hours of work, five weeks, and several hundred dollars paid to a professional
|
||||||
|
CNC machine shop, I had the artifact shown in the picture above. This is the story of its creation.
|
||||||
|
|
||||||
|
# First steps
|
||||||
|
|
||||||
|
Before you ask, I did not do a ton of research before embarking on this. As I write this, about six
|
||||||
|
months later, it only now occurred to me to do a basic search for an actual physical thing I could
|
||||||
|
buy, and luckily it seems that CNC-carved wooden relief maps of the whole state are not trivially
|
||||||
|
easy to come by, so, *phew!*
|
||||||
|
|
||||||
|
No, my first step was to see if there were any shops in the area that could carve something out of
|
||||||
|
nice plywood, about a week before the intended recipient's birthday. I found one that was less than
|
||||||
|
ten minutes away, and filled out their web contact form. They had a field for material, and I said,
|
||||||
|
"some nice plywood between 0.75 and 1.0 inches thick or similar" (I didn't know exactly what was
|
||||||
|
available and wanted to give broad acceptable parameters), and under "project description", I wrote,
|
||||||
|
|
||||||
|
> A relief map of California, carved from wood. Height exaggerated enough
|
||||||
|
to visibly discern the Santa Monica mountains. I can provide an STL file if needed.
|
||||||
|
|
||||||
|
For some [incorrect] reason that I only later examined, I just sort of assumed that the shop would
|
||||||
|
have a library of shapes available for instantiating into whatever material medium you might
|
||||||
|
need. But just in case, I included that hedge about being able to provide an STL file. Needless to
|
||||||
|
say, that was a bluff.
|
||||||
|
|
||||||
|
![the programmer's creed: we do these things not because they are easy, but because we thought they
|
||||||
|
were going to be easy -- from twitter user @unoservix, 2016-08-05][programmers_creed]
|
||||||
|
*<center><sup><sub>me, every time</sub></sup></center>*
|
||||||
|
|
||||||
|
Also needless to say, my bluff was called almost immediately, and I had the following exchange with the
|
||||||
|
shop:
|
||||||
|
|
||||||
|
> *CNC Shop*: STL can work but I can’t manipulate it, which could save some money. If possible can it
|
||||||
|
>be exported to an .igs or .iges or .stp format?
|
||||||
|
>
|
||||||
|
> *Me*: Yeah, STP should be no problem. Can you give a rough estimate of the cost for 1x2-foot relief carving?
|
||||||
|
>
|
||||||
|
> *Shop*: Without seeing the drawings, I can’t give even a close price but in the past they range from
|
||||||
|
>a few hundred dollars to several thousand dollars.
|
||||||
|
>
|
||||||
|
> *Me*: That's totally fair! I'll get you some files in a few days.
|
||||||
|
|
||||||
|
As you can see, I leaned even harder into the bluff; my next communication with the shop was nearly
|
||||||
|
four weeks later. But that's getting ahead of things.
|
||||||
|
|
||||||
|
# Meshes and solid bodies
|
||||||
|
|
||||||
|
First off, let's talk about file formats and how to represent shapes with a
|
||||||
|
computer.[^math-computers] I said I could provide an *STL
|
||||||
|
file*. [STL](https://en.wikipedia.org/wiki/STL_(file_format)) is a pretty bare-bones format that
|
||||||
|
describes the outside surface of a shape as a set of many, many triangles, each of which is described
|
||||||
|
by three 3D points. This format is popular with 3D printers, which is how I became familiar with
|
||||||
|
it.
|
||||||
|
|
||||||
|
This type of representation is easy to create and read, but it's not great for manipulation.
|
||||||
|
|
||||||
|
# Public data
|
||||||
|
|
||||||
|
## From space?
|
||||||
|
|
||||||
|
## Thanks, California state!
|
||||||
|
|
||||||
|
## In Australia, it's pronounced "g'dal"
|
||||||
|
|
||||||
|
## Give it a good smear
|
||||||
|
|
||||||
|
# Test prints
|
||||||
|
|
||||||
|
# Final cut
|
||||||
|
|
||||||
|
# Thanks
|
||||||
|
|
||||||
|
[main_image]: PXL_20220723_214758454.jpg "A plywood slab carved with CNC into a topographic representation of California"
|
||||||
|
|
||||||
|
[programmers_creed]: programmers_creed.jpg "jfk overlaid with the programmer's creed: we do these things not because they are easy, but because we thought they were going to be easy"
|
||||||
|
|
||||||
|
[^math-computers]: I'm pretty sure this is more "represent shapes with math" than with a computer, but
|
||||||
|
the computer is just helping us do the math and it's more relatable.
|
||||||
|
|
143
content/sundries/a-very-digital-artifact/notes.txt
Normal file
143
content/sundries/a-very-digital-artifact/notes.txt
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
inital comms with CNC shop:
|
||||||
|
------------------------------
|
||||||
|
Me: "project description": A relief map of California, carved from wood. Height exaggerated enough
|
||||||
|
to visibly discern the Santa Monica mountains. I can provide an STL file if needed.
|
||||||
|
|
||||||
|
Shop: STL can work but I can’t manipulate it, which could save some money. If possible can it be
|
||||||
|
exported to an .igs or .iges or .stp format?
|
||||||
|
|
||||||
|
Me: Yeah, STP should be no problem. Can you give a rough estimate of the cost for 1x2-foot relief carving?
|
||||||
|
|
||||||
|
Shop: Without seeing the drawings, I can’t give even a close price but in the past they range from a
|
||||||
|
few hundred dollars to several thousand dollars.
|
||||||
|
|
||||||
|
Me: That's totally fair! I'll get you some files in a few days.
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
next comms with shop three weeks later:
|
||||||
|
------------------------------
|
||||||
|
|
||||||
|
Hi Steve, I'm sorry for taking so long to get back to you! I had a harder time producing the IGES
|
||||||
|
file than I thought I would, but I think this should be OK:
|
||||||
|
|
||||||
|
(snip url to file)
|
||||||
|
|
||||||
|
It's 51 megabytes, otherwise I'd attach here.
|
||||||
|
|
||||||
|
As modeled, there's probably more high-frequency detail in the mountains than is necessary, as I'm
|
||||||
|
going for something that feels nice to the touch so smoother is better. It's also modeled at a
|
||||||
|
slightly larger scale than necessary, though not too far off (it's 500x577mm, and I'm interested in
|
||||||
|
the 400-500mm range for width; the relief height is in the 20-30mm range depending on scale). I was
|
||||||
|
imagining it would be carved with contour cuts in some thick nice ply, though I'm happy to hear
|
||||||
|
better ideas; I have literally no experience with making something like this.
|
||||||
|
|
||||||
|
(NOTE: go back to email thread and summarize the back-and-forth over tooling)
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Note that the shop did the extra work anyway just because they were nice, and that he was glad when
|
||||||
|
I told him it was a gift for my wife.
|
||||||
|
|
||||||
|
|
||||||
|
Zulip dump from 10 days after initial contact:
|
||||||
|
-----------------------------------
|
||||||
|
It IS Mt. Shasta!
|
||||||
|
|
||||||
|
After I made the mosaic out of the tiles I downloaded to cover the area, I masked it with an outline
|
||||||
|
of the state that I downloaded from a California gov geo site, then used a program called
|
||||||
|
gdal_translate to turn the image, a "geotiff" file with height data encoded, into that heightmap png
|
||||||
|
with the lowest value mapped to 0 and the highest to maxint.
|
||||||
|
|
||||||
|
I also had to reproject the geotiff with the height data into the same coordinate system as the
|
||||||
|
state outline was in. The height data was in a system using lat/long called "EPSG:4326", while the
|
||||||
|
state outline was made from line segments with 2d vertices in a projected coordinate system called
|
||||||
|
"EPSG:3857" with units of "meters". 3857 is "web Mercator", and is the coordinate system used by
|
||||||
|
Google and Open Street Map for their map tiles and other shapes.
|
||||||
|
|
||||||
|
It may or may not be surprising that cartography is very complicated!
|
||||||
|
|
||||||
|
My next step is to turn this heightmap into solid geometry that I can 3d print and/or send to a
|
||||||
|
local CNC shop to have them carve a relief of California out of wood, which is close to the final
|
||||||
|
step of producing an artifact as a present for my partner.
|
||||||
|
|
||||||
|
There are a bunch of python packages for working in this domain, but they're all just wrappers
|
||||||
|
around various GDAL libraries or tools.
|
||||||
|
|
||||||
|
The raw topo data I got from
|
||||||
|
https://portal.opentopography.org/raster?opentopoID=OTSRTM.082015.4326.1 (that was the epsg 4326
|
||||||
|
geocoded tiff; actually, several of them because you can only download up to 450km^2 at a time,
|
||||||
|
hence having to mosaic them with the gdal_merge.py command (the '.py' is in the name of the command
|
||||||
|
that gets installed when you do apt install gdal-bin)), then use gdalwarp to re-project to 3857,
|
||||||
|
then I had to write a python program to mask it for some reason, then gdal_translate (no .py on that
|
||||||
|
one, but they're all just python scripts) to convert to the png heightmap. I'm leaving out a couple
|
||||||
|
details in the workflow, but that's the main shape of it.
|
||||||
|
|
||||||
|
OK, actually, now that all that context is established, here's the actual command that produced that
|
||||||
|
file from the geocoded tiff:
|
||||||
|
|
||||||
|
gdal_translate -of PNG -ot UInt16 -scale -130 4412 0 65535 cropped_ca_topo.tif heightmap_cropped.png
|
||||||
|
|
||||||
|
and then I used convert (the imagemagick program) to scale the png from 33,311x38,434 to
|
||||||
|
2,000x2,2308 pixels.
|
||||||
|
|
||||||
|
the -scale -130 4412 0 65535 is mapping the height data min/max to the png whiteness in the output
|
||||||
|
file.
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
Zulip musings from a few days after that, still working on the heightmap:
|
||||||
|
---------------------------------------
|
||||||
|
(re: non-linear scaling of height to reduce pointiness)
|
||||||
|
ok, it was easier than I thought it would be. gdal_translate has a -exponent flag you can use with
|
||||||
|
-scale, so I remade the heightmap with an exponential scaling, using 0.41 as the exponent.
|
||||||
|
|
||||||
|
funny enough, I'm still working on this, since even when I drastically scale the size of the mesh
|
||||||
|
down in Blender (which I export to OBJ for import by FreeCAD), doing anything like modelling (eg,
|
||||||
|
extruding downward or joining with a solid base, or cutting the shape so it's CA-shaped and not a
|
||||||
|
rectangle) requires tens of gigabytes of resident memory and I keep having to kill the program and
|
||||||
|
start over.
|
||||||
|
|
||||||
|
a 60-megabyte OBJ file turns into 21 GB of resident data in the modelling software.
|
||||||
|
|
||||||
|
I have 32GB of RAM installed
|
||||||
|
|
||||||
|
that 21GB expands to 30 when I try manipulating it
|
||||||
|
------------------------------------------
|
||||||
|
|
||||||
|
Zulip from two weeks later (July 7):
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Two weeks later I'm finally printing something out. I've given up on converting it into a parametric
|
||||||
|
CAD-like object; it seems this is a Hard Problem, but I'm not sure why. My goal with doing that was
|
||||||
|
to give a parametric CAD file to a local CNC milling shop, per their request, since when I suggested
|
||||||
|
a mesh-based file (STL), the guy was like "I can't do much manipulation with that to make it more
|
||||||
|
manufacturable, so a real CAD file would be best".
|
||||||
|
|
||||||
|
But at least with an STL file, I can print it myself. So that's going now, we'll see how it turns
|
||||||
|
out in no less than eight hours.
|
||||||
|
|
||||||
|
I haven't really done anything else with my computer besides this for a while.
|
||||||
|
|
||||||
|
(next day)
|
||||||
|
ok, I got something printed out, but I'm not super stoked on it. Also, I'm still chasing the elusive
|
||||||
|
dream of turning this into a parametric solid for easier CNCing. Vape pen for scale:
|
||||||
|
(insert shitty print photo)
|
||||||
|
|
||||||
|
(next day after that, the 9th)
|
||||||
|
I've finally "finished": I've created a mesh that has no missing faces, is not too crazy, and can be
|
||||||
|
converted into a parametric solid, and sent that off to a local CNC shop for a quote on having it
|
||||||
|
routed out of wood. I'll also do another 3D print, since the base is now a larger version of the
|
||||||
|
coastline instead of a rectangle, and the high frequency detail is a little diminished.
|
||||||
|
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
Links:
|
||||||
|
|
||||||
|
https://data.ca.gov/
|
||||||
|
|
||||||
|
https://portal.opentopography.org/raster?opentopoID=OTSRTM.082015.4326.1
|
||||||
|
|
||||||
|
https://www.printables.com/model/240867-topographic-california
|
||||||
|
|
||||||
|
https://touchterrain.geol.iastate.edu/
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Shuttle_Radar_Topography_Mission
|
||||||
|
|
BIN
content/sundries/a-very-digital-artifact/programmers_creed.jpg
Normal file
BIN
content/sundries/a-very-digital-artifact/programmers_creed.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 140 KiB |
|
@ -67,15 +67,22 @@ header .main {
|
||||||
letter-spacing: -0.5px;
|
letter-spacing: -0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
h1 { font-size: 1.5rem }
|
||||||
|
h2 { font-size: 1.2rem }
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
h5,
|
h5,
|
||||||
h6 {
|
h6 {
|
||||||
/* font-size: 1.2rem; */
|
font-size: 1.2rem;
|
||||||
margin-top: 2em;
|
margin-top: 2em;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
h1::before {
|
h1::before {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
|
|
Loading…
Reference in a new issue