I am trying to adapt the solution here, which places text in 3D on the xy plane, so that the text can be placed in any orientation. So, I wrapped it in three Rotate statements, first by tilt around the x axis, then by elevation around the y-axis, then by longitude around the z-axis. However, this rotation happens after the text has been placed, away from the center of the axes. Trying to put the Rotation statements inside the meat of the function runs into the problem that I cannot tell from where the x and y coefficients are deriving so as to manipulate them using Rotate. Anyway, the original is
xyText[str_, scaling_: 1, location_: {0, 0, 0}] :=
Module[{mesh =
DiscretizeGraphics[Text[Style[str, FontFamily -> "Times"]], _Text,
MaxCellMeasure -> 0.2]},
Join[{EdgeForm[]},
MeshPrimitives[mesh,
2] /. {x_?NumberQ,
y_?NumberQ} :> (scaling {x, y, 0} + location), {Black},
MeshPrimitives[BoundaryMesh[mesh],
1] /. {x_?NumberQ,
y_?NumberQ} :> (scaling {x, y, 0} + location)]]
and my inadequate adaptation is
ClearAll[xyText]
xyText[str_, scaling_: 1, location_: {0, 0, 0}, longitude_,
elevation_, tilt_] :=
Module[{mesh =
DiscretizeGraphics[Text[Style[str, FontFamily -> "Times"]], _Text,
MaxCellMeasure -> 0.2]}, Rotate[
Rotate[
Rotate[
Join[{EdgeForm[]},
MeshPrimitives[mesh,
2] /. {x_?NumberQ,
y_?NumberQ} :> (scaling {x, y, 0} + location)
, {Black},
MeshPrimitives[BoundaryMesh[mesh],
1] /. {x_?NumberQ,
y_?NumberQ} :> (scaling {x, y, 0} + location)],
tilt, {1, 0, 0}], elevation, {0, 1, 0}], longitude, {0, 0, 1}]]
The objective is for the yellow and the red "Dodecahedron" texts to intersect each other in this:
meshedSol =
Graphics3D[{Antialiasing -> True, Yellow, Opacity[.8],
PolyhedronData["Dodecahedron", "Faces"],
xyText["Dodecahedron", 0.2, {1, 1, 1}, 0, 0, 0],
Red, xyText["Dodecahedron", 0.2, {1, 1, .9}, 0, 0, \[Pi]/2]},
ViewPoint -> {-2, -2, 2}]
But instead, the red one is rotated after having been placed.
Update:
I gathered that x and y come from MeshPrimitives, so I made that 3D and wove in rotation matrices. Till we get a more elegant answer, I moved the result to be an answer.

M = scaling*RotationMatrix[longitude,{0,0,1}].RotationMatrix[-elevation,{0,1,0}].RotationMatrix[tilt,{1,0,0}]as aModulevariable, i.e. this quantity only needs to be computed once. As you have it, it's being computed for every triangle created. – Greg Hurst Nov 23 '16 at 02:05\[Rule]or\[LongRightArrow]instead of->. – Greg Hurst Nov 23 '16 at 03:51\[Rule], LOL, but it does have\[LongRightArrow]. – Nicholas G Nov 23 '16 at 10:14EulerMatrix[{longitude, -elevation, tilt}, {3, 2, 1}]? And another option is to use the replace on the mesh primitives to transform it to a 3D object quickly ({x, y} -> {x, y, 0}), and then just work withTranslateandRotate(orGeometricTransformationwithEulerMatrix). Alternatively, you can do all of that at once withTransformedRegionsupplying a function that does both the embedding from 2D into 3D and the transformation. (I'll try to write an answer after working this out.) – Tom Verhoeff Feb 19 '21 at 20:28Text[Style["x",Italic],...]which works with text3D but the optionBackgroundColor -> Greendoes not. Is there any way that option can be incorporated into your nice code? – David G. Stork Feb 24 '21 at 01:36text3Dstatement is cumbersome. For background, however, you can easily place aRectanglebehind thetext3D. – Nicholas G Feb 24 '21 at 08:24