Services & Resources / Wolfram Forums / MathGroup Archive

MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to put text on a curved surface?

  • To: mathgroup at
  • Subject: [mg87178] Re: How to put text on a curved surface?
  • From: "Fred Klingener" <gigabitbucket at>
  • Date: Thu, 3 Apr 2008 05:15:48 -0500 (EST)
  • References: <fsvels$sto$>
  • Reply-to: "Fred Klingener" <gigabitbucket at>

"P_ter" <peter_van_summeren at> wrote in message
news:fsvels$sto$1 at
>I would like to put "Mathematica" on a curved surface, e.g. a torus.
> Can anyone help here?
> with friendly greetings,

My response is a reprise of my post of a couple of weeks ago on texture 
mapping, for which there were helpful responses, but no satisfying 

One straightforward approach is to map an image of the text onto a mesh
generated on a torus.

Applying the earlier method to your case, I'll use Rasterize to generate an 
RGBColor array directly from the text:

map = Rasterize[
, "RGBColor"
, ImageSize -> {160, 30}
, ImageResolution -> 20];

grid = Take[Dimensions[map, 2] - 1];
r = 1; r0 = 0.3;

(r1 = (r + r0 Cos[phi])) Cos[theta]
, r1 Sin[theta]
, r0 Sin[phi]}

, {phi, -Pi, Pi}
, {theta, 0, 2 Pi}

, Mesh -> Reverse[grid]
, MeshStyle -> None
, MeshFunctions -> {#5 &, -#4 &}
, MeshShading -> map
,ViewPoint -> {-1, 2, 1}

On the one hand, the technique evidently produces a useful result, but on 
the other, it's so bog-slow that it can't possibly be the right way to do 

On my WinXP 6.0.1, the timing (huge difference between Timing[] report and 
meat clock time elapsed) and memory (inexorable rise in page file usage) 
puzzles remain when I work with meshshading.

Fred Klingener

  • Prev by Date: Pythonika and dictionaries.
  • Next by Date: Re: The FinancialData Function
  • Previous by thread: Re: How to put text on a curved surface?
  • Next by thread: Re: How to put text on a curved surface?