Re: How to put text on a curved surface?
- To: mathgroup at smc.vnet.net
- Subject: [mg87258] Re: How to put text on a curved surface?
- From: m.r at inbox.ru
- Date: Sun, 6 Apr 2008 06:40:13 -0400 (EDT)
- References: <ft2als$p8t$1@smc.vnet.net>
On Apr 3, 4:14 am, P_ter <petervansumme... at gmail.com> wrote: > Thanks. > I followed the link. I discovered that the Presentations Package of David = Park is needed. I found in that a reason to buy it. I already wanted to do t= hat a long time. > Still, I am interested in other solutions. > with friendly greetings, > P_ter For some purposes just using thick lines will be sufficient: Module[{R = 10, r = 3, S, L, edgemul, xmin, xmax, ymin, ymax}, S[u_, v_] := {Cos[u] (R + r Cos[v]), (R + r Cos[v]) Sin[u], r Sin[v]}; L = First@ Cases[ ImportString[ExportString["Mathematica", "PDF"], "PDF"], Polygon[L_] :> L, -1]; edgemul = Intersection[#, Reverse[#, 2]]&@ Partition[L, 2, 1, {1, 1}]; {{xmin, ymin}, {xmax, ymax}} = {Min /@ #, Max /@ #}&@ Transpose@ L; L = Split[L, !MemberQ[edgemul, {##}]&]; L = Flatten[#, 1]&@ Table[ (1 - t) #[[k]] + t #[[k + 1]], {k, Length@ # - 1}, {t, 0, 1, .1}]& /@ L; Show[ParametricPlot3D[S[u, v], {u, 0, 2 Pi}, {v, 0, 2 Pi}, PlotPoints -> {80, 30}, Mesh -> None], Graphics3D[{Red, AbsoluteThickness[6], Line@ Transpose@ S[Rescale[#[[All, 1]], {xmin, xmax}, {0, Pi}], Rescale[#[[All, 2]], {ymin, ymax}, {0, Pi/2}] ]& /@ L}], Axes -> False, Boxed -> False, ImageSize -> 500, ViewAngle -> Pi/9, ViewPoint -> {1.3, 2.4, 2.}] ] If you don't have any transparency in the graphic and if you bend your head just right, it looks like filled outlines. Maxim Rytin m.r at inbox.ru