Re: How to put text on a curved surface?
- To: mathgroup at smc.vnet.net
- Subject: [mg87178] Re: How to put text on a curved surface?
- From: "Fred Klingener" <gigabitbucket at gmail.com>
- Date: Thu, 3 Apr 2008 05:15:48 -0500 (EST)
- References: <fsvels$sto$1@smc.vnet.net>
- Reply-to: "Fred Klingener" <gigabitbucket at gmail.com>
"P_ter" <peter_van_summeren at yahoo.co.uk> wrote in message news:fsvels$sto$1 at smc.vnet.net... >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 resolution. 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[ "\t\tMathematica\t\t" , "RGBColor" , ImageSize -> {160, 30} , ImageResolution -> 20]; grid = Take[Dimensions[map, 2] - 1]; r = 1; r0 = 0.3; ParametricPlot3D[{ (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 it. 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. Hth, Fred Klingener