MathGroup Archive 2009

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

Search the Archive

Re: Text on a curve,

  • To: mathgroup at smc.vnet.net
  • Subject: [mg105008] Re: Text on a curve,
  • From: dh <dh at metrohm.com>
  • Date: Tue, 17 Nov 2009 05:16:51 -0500 (EST)
  • References: <200911131055.FAA11361@smc.vnet.net> <hdqb65$6ps$1@smc.vnet.net>


Hi Syd,

TimeConstrained evaluates the expression exactly once and then it is 

done. The result looks like:

Text[Row[List[

    Dynamic[Style["T", 24,

      Refresh[Hue[Random[]], Rule[UpdateInterval, 0.2]]]],....

You will note that the dynamic behaviour is built into the result and 

has nothing to do with TimeConstrained.

Therefore, what you e.g. can do is to put the update intervall value 

into a variable that can be chabged from the outside. E.g.:

time = 0.2;

Text[Row[Dynamic@

      Style[#, 24, Refresh[Hue[Random[]], UpdateInterval -> time]] & /@

     Characters["Typing onto a curve works."]]]

This shows blinking text.

If you now say:

time=Infinity

the blinking stops.

Daniel



Syd Geraghty wrote:

> Hi All,

> 

> The code below is a very interesting attention getting display but how do you control the length of time it is active?

> 

> I have tried using TimeConstrained without luck.

> 

> The code runs continously and I can only stop it by changing the TimeConstrained time limit to 0.00001 as below.

> 

> Using 0.00001 returns $Aborted immediately, setting t=0.0001 runs continuously ....

> 

> TimeConstrained[

>  Text[Row[

>    Dynamic@Style[#, 24, Refresh[Hue[Random[]], UpdateInterval -> .2]] & /@ 

>     Characters["Typing onto a curve works."]]], 0.00001]

> 

> 

> This question really goes to the whole question of setting timers for interactive displays and forms via Mathematica 7.

> 

> Any and all insight would be greatly appreciated.

> 

> 

> Cheers .... Syd

> 

> Syd Geraghty B.Sc, M.Sc.

> 

> sydgeraghty at mac.com

> 

> Mathematica 7.0.1.0 for Mac OS X x86 (64 - bit) (12th September 2009)

> MacOS X V 10.6.1 Snow LeopardMacBook Pro 2.33 GHz Intel Core 2 Duo  2GB RAM

> 

> 

> On Nov 13, 2009, at 2:55 AM, Bill wrote:

> 

>> 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."]]]

> 

> 

> 




  • Prev by Date: Re: Text on a curve,
  • Next by Date: Re: Strange behavior with loading Experimental package
  • Previous by thread: Re: Text on a curve,
  • Next by thread: Re: Text on a curve, revisited and modified