I am trying to put some 3D text inside a 3D graphics. So far I find two ways to make 3D text.
wordData = ImportString[ExportString["Mathematica", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[Tube[#, 0.2] & /@ Map[Append[#, 0] &, wordData, {2}]]
RegionProduct[DiscretizeGraphics[Text[Style["Mathematica", Bold, FontFamily -> "Times"]],
_Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]
halirutan's method gives a set of coordinates which is easy to manipulate (for example - change position, orientation, colour etc.)
word1=ImportString[ExportString["Hello","PDF"],"PDF"][[1,1,2,1,1,2]];
(*scale=0.5; rotation Pi/4 around {0,1,1}*)
wline1=Map[RotationTransform[Pi/4,{0,1,1}][0.5Join[#,{0}]]&,word1,{2}];
word2=ImportString[ExportString["World","PDF"],"PDF"][[1,1,2,1,1,2]];
(*scale=0.2; shift {1,0,-1}*)
wline2=Map[(0.2Join[#,{0}]+{1,0,-1})&,word2,{2}];
Graphics3D[{Green, Sphere[],
Blue, Map[Tube[#, 0.3] &, wline1], Red, Map[Tube[#, 0.3] &, wline2]}]
How can I do the same thing with J.M.'s method?
TranslationTransform
andRotationTransform
. Now I am left with size and colour. I am playing withRegionResize
, but can't fix it properly. Should I modify my question with this information or would you like to post a compact answer? $\endgroup$