MathGroup Archive 2013

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

Search the Archive

Teleprompter Code

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130222] Teleprompter Code
  • From: bruce.colletti at gmail.com
  • Date: Fri, 22 Mar 2013 04:18:01 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net

The Washington DC-Area Mathematica Special Interest Group has been collaborating to build teleprompter code.  The code below is the brainchild of Dan Martinez and we've been tinkering with it.  We've also looked at other code, notably from the Great Guru himself, Harry Calkins.

Here's my question about the code below:  why does ListAnimate inexplicably pause sometimes?  The text should run smoothly until the end. 

Tech Support says there's an issue with ListAnimate, one tied to AnimationRate:  if it's "good", the passage will scroll smoothly.  Otherwise not.  I can get it to run smoothly when the rate is high--but then I can't follow the words.

Can this code be fixed so that the text always runs smoothly for any rate? Thanks.

Bruce

X=StringJoin@ConstantArray[" ",25] <>"Let's define calculus terms using this sketch in which you're hiking over hills and valleys.   You may want to pause this clip now in order to study the sketch and when you're ready, hit play.  \t\t If the shape of the land is regarded as a function f(x), the sketch says that you start at a point whose x-coordinate is a and that you end at a point whose x-coordinate is b.   \tWhile hiking, you'll always track the altitude--sometimes you're above sea level and sometimes you're not. (open new layer)\t\t\t At a blue point, you're at the hi-point for that part of the hike.     (close/open layer)\t\t\t At a red point, you're at the lo-point for that part of the hike.   (show both layers) \t\t\t  The y-value of each blue point is called a maximum (WRITE THIS OUT in blue) and the y-value of each red point is called a minimum (WRITE THIS OUT in red).   The blue points' y-values are collectively called the maxima (in BLUE) and likewise (in RED) mi
 nima for
  the red points.   If you're wondering why the green peak isn't blue, it's because the hike ends before you reach that peak,\t ";

L=StringLength@X;
subLength=80;

Clear@Y;
Y=(y=StringTake[X,{#,Min[#+subLength,L]}];
Style[y,Blue,Bold,12,FontFamily->"Courier"])&/@Range@L;

ListAnimate[Y,AnimationRate->20,ContentSize->{700,50},AnimationRepetitions->\[Infinity]]



  • Prev by Date: Overdetermined NDSolve
  • Next by Date: Re: Teleprompter Code
  • Previous by thread: Re: Overdetermined NDSolve
  • Next by thread: Re: Teleprompter Code