Tweeted twitter.com/StackMma/status/929472406388867072
3 added 157 characters in body
source | link

I am trying to put some 3D text inside a 3D graphics. So far I find two ways to make 3D text.

halirutan in "Rotating an image along a Möbius strip?")

wordData = ImportString[ExportString["Mathematica", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[Tube[#, 0.2] & /@ Map[Append[#, 0] &, wordData, {2}]]

enter image description here

J.M. in "Strategies for creating 3D text"

RegionProduct[DiscretizeGraphics[Text[Style["Mathematica", Bold, FontFamily -> "Times"]],
         _Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]

enter image description here

halirutan's method gives a set of coordinates which is easy to manipulate (for example - change position, orientation, colour etc.)

word1 = ImportString[ExportString["Hello"word1=ImportString[ExportString["Hello", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
word2(*scale=0.5; =rotation ImportString[ExportString["World",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]];
Graphics3D[(*scale=0.2; shift {Tube[#1, 0,-1}*)
wline2=Map[(0.2] & /@ Map[Append[#2Join[#, 0] {0}]+{1,0,-1})&, word1word2, {2}]];

Graphics3D[{Green, Sphere[],
   Tube[RotationTransform[Pi/2, {1, 0Blue, 0}][#]Map[Tube[#, 0.2]3] & /@, Map[Append[#wline1], 0]Red, &Map[Tube[#, word20.3] &, {2}]wline2]}]

enter image description hereenter image description here

How can I do the same thing with J.M.'s method?

I am trying to put some 3D text inside a 3D graphics. So far I find two ways to make 3D text.

halirutan in "Rotating an image along a Möbius strip?")

wordData = ImportString[ExportString["Mathematica", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[Tube[#, 0.2] & /@ Map[Append[#, 0] &, wordData, {2}]]

enter image description here

J.M. in "Strategies for creating 3D text"

RegionProduct[DiscretizeGraphics[Text[Style["Mathematica", Bold, FontFamily -> "Times"]],
         _Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]

enter image description here

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]];
word2 = ImportString[ExportString["World", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[{Tube[#, 0.2] & /@ Map[Append[#, 0] &, word1, {2}], 
   Tube[RotationTransform[Pi/2, {1, 0, 0}][#], 0.2] & /@ Map[Append[#, 0] &, word2, {2}]}]

enter image description here

How can I do the same thing with J.M.'s method?

I am trying to put some 3D text inside a 3D graphics. So far I find two ways to make 3D text.

halirutan in "Rotating an image along a Möbius strip?")

wordData = ImportString[ExportString["Mathematica", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[Tube[#, 0.2] & /@ Map[Append[#, 0] &, wordData, {2}]]

enter image description here

J.M. in "Strategies for creating 3D text"

RegionProduct[DiscretizeGraphics[Text[Style["Mathematica", Bold, FontFamily -> "Times"]],
         _Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]

enter image description here

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]}]

enter image description here

How can I do the same thing with J.M.'s method?

2 edited tags; edited title
| link

Manipulating Performing geometric transforms on 3D text inside a Graphics3D expression

1
source | link

Manipulating 3D text inside Graphics3D

I am trying to put some 3D text inside a 3D graphics. So far I find two ways to make 3D text.

halirutan in "Rotating an image along a Möbius strip?")

wordData = ImportString[ExportString["Mathematica", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[Tube[#, 0.2] & /@ Map[Append[#, 0] &, wordData, {2}]]

enter image description here

J.M. in "Strategies for creating 3D text"

RegionProduct[DiscretizeGraphics[Text[Style["Mathematica", Bold, FontFamily -> "Times"]],
         _Text, MaxCellMeasure -> 0.1], MeshRegion[{{0}, {2}}, Line[{1, 2}]]]

enter image description here

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]];
word2 = ImportString[ExportString["World", "PDF"], "PDF"][[1, 1, 2, 1, 1, 2]];
Graphics3D[{Tube[#, 0.2] & /@ Map[Append[#, 0] &, word1, {2}], 
   Tube[RotationTransform[Pi/2, {1, 0, 0}][#], 0.2] & /@ Map[Append[#, 0] &, word2, {2}]}]

enter image description here

How can I do the same thing with J.M.'s method?