MathGroup Archive 2009

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

Search the Archive

Text on a curve, revisited and modified

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104921] Text on a curve, revisited and modified
  • From: Bill <WDWNORWALK at aol.com>
  • Date: Fri, 13 Nov 2009 05:55:24 -0500 (EST)

Text on a curve, revisited and modified


Hi:

Thanks to help from Daniel and inspiration from David, I have the 
following Mathematica 6.0.1 code that gives a nice graph:

(* Code part A: *)

Module[{f, fs, t}, f[t_] = {Cos[t] + Sin[t], Sin[t]};
 fs[t_] = D[f[t], t] // N;
 h = Graphics[
     Translate[
      Rotate[Style[Text["\n" <> #], {0, 100}, 18, Purple, Bold], 
       90 Degree], {0.1, 0}]] & /@ Characters["Typing onto a curve works. "];
 i = 0;
 Show[Graphics[{{White, {Arrowheads[{{Automatic, Automatic, h[[++i]]}}], 
          Arrow[#]} & /@ 
        MapThread[{#1 + 
            0.001 #2, (#1 - 
             2 #2)} &, {f /@ #, ({-1, 1} Reverse[#]/21) & /@ (#/
                 Sqrt[#.#] & /@ (fs /@ #))} &[#]]}, {Thickness[0.005], {Blue, 
        Line[f /@ #]}}} &[
    Table[\[Rho], {\[Rho], 0.0, 2*Pi // N, 2*Pi/26 // N}]]], 
  AspectRatio -> Automatic, Axes -> True, 
  PlotRange -> {{-2, 2}, {-2, 2}}, ImageSize -> 500, 
  Background -> LightYellow]]
  
  The next section of code presents text that blinks different colors:
  
  (* Code part B: *)
  
  Text[Row[Dynamic@
     Style[#, 24, Refresh[Hue[Random[]], UpdateInterval -> .2]] & /@ 
   Characters["Typing onto a curve works."]]]
   
   Question: How can something like Code part B be modified, and merged into Code part A
   successfully? I've tried without success.
   
   What I want is for the text on the curve in Code part A to blink random flashing colors for 
   each letter on the curve, similiar to the random blinking text colors that is output by Code 
   part B graphics output.
   
   
   Thanks in advance,
   
   Bill


  • Prev by Date: Re: NonlinearModelFit on correlated data
  • Next by Date: Re: Using For[] for Generating Multiple Output Cells
  • Previous by thread: Scripts to stop/start windows programs/services, help w execute on
  • Next by thread: Re: Text on a curve,