2

How do I include text on a curved surface? For example, and as a starting point, how can I reproduce the following image

enter image description here

I've seen some examples where people geometrically described letters to do this, for example, the code

R = 10; r = 3;
map[p1_, p2_] := {R Sin[p1] + r Cos[p2] Sin[p1], 
   R Cos[p1] + r Cos[p2] Cos[p1], r Sin[p2]};
charA2D[p_, pos_, size_] := 
  Plus[#, pos] & /@ {{0.5 p, p}, {0.5 + 0.5 p, 1 - p}, {0.25 + 0.5 p, 
     0.5}};
txt[p_] := Join[charA2D[p, {0, -.5}, 1], charA2D[p, {1.1, -.5}, 1]];
g1 = {Graphics3D[Thickness[0.02]], 
    ParametricPlot3D[map @@@ txt[p], {p, 0, 1}]} // Show;
g2 = ParametricPlot3D[map[p1, p2], {p1, 0, 2 Pi}, {p2, 0, 2 Pi}];
Show[g2, g1]

gives the string "AA" inscribed on the surface of a torus

enter image description here

This, however, seems a bit too complicated. Using the raw text as an image (.SVG, for example), we could perhaps simply use the mapping of photographic images to 3D surfaces, gives something like

enter image description here

I wonder if there is a more straightforward tool for text and strings. Any ideas?

sam wolfe
  • 4,663
  • 7
  • 37

0 Answers0