We use the HyperFun Polygon Convertor: a 2D polygon drawing tool (polygon.exe) and a convertor from a polygon to HyperFun (Polygon_FRep.exe) for modeling a relief for carving. Then, we carve the generated relief on a block and on a spoon.
Polygon_FRep HF_let.txt HF_let.hf
The HyperFun file HF_let.hf is generated. Note that x[3] is used in this model, so formally it is an infinite cylinder in 3D. The maximal bounding box for drawn polygons is x:[0,760], y:[0,470].
Assign x[3] -> 0 f -> 0
In Redering-Polygonization-Axes/Box visibility, make:
Long step 100 short step 0 Render frame: [[http://www.hyperfun.org/HFab/FabLabHF/HF_let_HFW.jpg|HF_let_HFW.jpg]]
Note, it is up side down, because of the drawing the letter in screen coordinates. The letter can be vertically flipped later.
-- box to fit the letter in xmin = 2; xmax = 4; ymin = 2; ymax = 4; xt = 760*(x[1]-xmin)/(xmax-xmin); yt = 470*(1-(x[2]-ymin)/(ymax-ymin));
and change in the text below these symbols
x[1] to xt
x[2] to yt \\See HF_let_up.hf as an example and its image HF_let_up.jpg.
zmax = 1.1; slope = 0.2; letnorm = zmax * (2/(1+exp(-slope*letfit))-1); height = letnorm-x[3]; bound = x[3]-0.1; letrel = height & bound;
See HF_let_relief.hf model and its image HF_let_relief.jpg, where
zmax is height of the relief;
slope controls smoothness of the relief;
height defines a solid as f(x,y)-z >= 0
bound is a boundary solid for the relief.
-- box to fit the letter in xmin = 1.7; xmax = 4.7; ymin = 1.4; ymax = 4.4;
center = [3, 3, 3]; bound = hfSphere(x, center, 2.9);
hfp HF_spoon3.hf -b 0,0,0,20,8,8 -g 131 -stl hf_spoon.stl