1

Is it possible to "drape" text on a globe, with shapepar or some other package? The code that I am using is:

\usepackage{shapepar}
\usepackage{ulem}
\begin{document}
\Shapepar{\circleshape} \footnotesize{\rmfamily{\uline{blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah}}}\par
\end{document}

This yields the following figure:

enter image description here

Obviously, this does not come across as a 3d object. Ideally, I would like to have the string of words create the illusion of a globe, complete with curved latitude lines.

Would appreciate any help in this. Thanks.

2

I'm not going to do it all manually, but show this in hopes it will spur someone to automate it. Each letter is subjected to a horizontal and vertical scale, as well as a slant. I picked the values manually, but I see that, in theory, the first argument of \scalebox depends on the longitude, the optional argument to \scalebox depends on the latitude, while the optional \slantbox argument depends on latitude and longitude.

I am sure these trigonometric functions are analytically available in a variety of places for the orthographic projection (https://en.wikipedia.org/wiki/List_of_map_projections, https://en.wikipedia.org/wiki/Orthographic_projection_in_cartography). The trick would be in mapping the (x,y) location of a given letter into a latitude and longitude and then applying the functional transformation of stretch and slant to reflect the value.

\documentclass{article}
\usepackage{shapepar}
\usepackage{ulem,graphicx,xcolor}
\newsavebox\foobox
\newcommand{\slantbox}[2][30]{%
        \mbox{%
        \global\sbox{\foobox}{\textcolor{red}{#2}}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\begin{document}
\Shapepar{\circleshape} \footnotesize{\rmfamily{\uline{%
\slantbox[2]{\scalebox     {.6}[.5]{b}}%
  \slantbox[1.75]{\scalebox{.8}[.5]{l}}%
  \slantbox[1.33]{\scalebox{.95}[.5]{a}}%
  \slantbox[1]{\scalebox   {.95}[.5]{h}} 
\slantbox[-1]{\scalebox     {.95}[.5]{b}}%
  \slantbox[-1.33]{\scalebox{.95}[.5]{l}}%
  \slantbox[-1.75]{\scalebox{.8}[.5]{a}}%
  \slantbox[-2]{\scalebox   {.6}[.5]{h}} 
%%%%%%
\slantbox[1.8]{\scalebox  {.6}[.65]{b}}%
  \slantbox[1.6]{\scalebox{.7}[.65]{l}}%
  \slantbox[1.5]{\scalebox{.75}[.65]{a}}%
  \slantbox[1.4]{\scalebox{.82}[.65]{h}} 
\slantbox[1.0]{\scalebox  {.86}[.65]{b}}%
  \slantbox[0.8]{\scalebox{.90}[.65]{l}}%
  \slantbox[0.6]{\scalebox{.92}[.65]{a}}%
  \slantbox[0.4]{\scalebox{.94}[.65]{h}} 
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah}}}\par
\end{document}

enter image description here

  • Doing it word by word using tikz shouldn't be that difficult. Letter by letter might be possible using a decoration. – John Kormylo Aug 10 '17 at 21:19
  • Steven, intuitively I see this is brilliant. Since my math is up to the mark, I'll wait to see if someone else jumps in to automate. Otherwise, I'd be happy to do it word by word if push comes to shove. Many thanks. PS: Any idea how to curve the lines up above the center line and down below? – user3671 Aug 11 '17 at 4:32
  • @user3671 I think orthographic is as far as I can think in my mind. More complex transformations are probably best attempted using other tools, like tikz (though I know little of that) – Steven B. Segletes Aug 11 '17 at 9:57
  • Okay, cool. Many thanks - this is most useful. – user3671 Aug 11 '17 at 9:58
  • @user3671 I would just add that, with the \slantbox macro, the value of the optional argument is the tangent of the slanting angle. If you do get brave to attempt "curving" with the above primitive technique, this answer may be useful, tex.stackexchange.com/questions/254010/… – Steven B. Segletes Aug 11 '17 at 10:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.