I want to achieve the same effect like the project on http://www.mymo.is/. By taking two letters and combine them in 3d, you can get a complex shape that looks like one letter on the one side and the other letter on the other side. I tried several ways of doing this, but all failed. Maybe I way of making it is totally wrong. Can anyone give a suggestion? I think making this will be fun.
this is how a monogram of letter "C" and "K" looks like. Here are some ways I tried: (1)
t = Text[Style["A", Bold]];
regionmeasure =
Flatten[Differences /@
Transpose[
List @@ BoundingRegion[
RandomPoint[
RegionBoundary@
BoundaryDiscretizeGraphics[t, _Text, MaxCellMeasure -> 0.01], 1000]]]];
(*measure the bounding box of the measure, then used to convert the region to fit in a 1*1 square*)
region = TransformedRegion[
DiscretizeGraphics[t, _Text, MaxCellMeasure -> 0.1],
ScalingTransform[Reverse[1/Times @@ regionmeasure regionmeasure]]];
(*the 2dregion*)
region3d =
RegionProduct[region,
BoundaryMeshRegion[{{0}, {1}}, Point[{{1}, {2}}]]];(*generates a 3d region*)
region3d2 =
TransformedRegion[region3d,
RotationTransform[Pi/2, {0, 1, 0}, {0, 0, 0.5}]](*generates the rotated region*)
Now we have the two regions in hand, it seems a simple task to get their intersection with the built-in function RegionIntersectionRegionIntersection
. But this function do not support the MeshRegionMeshRegion
format in 3D!
(2)
I convert the 2d region of letter "A" into many polygons by first generating randompoints within the region then using BoundingRegionBoundingRegion
. But this will make hundreds of polygons to achieve a not so bad covering of the original letter, and become impossible to calculate their union and intersection in 3d.
(3) I want to just export the 3d letter "A" denoted by region3d in (1) and simply manipulate it in other CAD software. But although ExportExport
claims to support export MeshRegionMeshRegion
object into STL file, it does not. Now I am completely out of idea...