MathGroup Archive 2010

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

Search the Archive

Question about adding thumbnails and snapshots to Wolfram Demonstration.

  • To: mathgroup at
  • Subject: [mg111627] Question about adding thumbnails and snapshots to Wolfram Demonstration.
  • From: David Carraher <david_carraher at>
  • Date: Sun, 8 Aug 2010 07:20:22 -0400 (EDT)


For some reason, the thumbnails and snapshots in a Demonstration I just 
made change after I set them the way I want them to appear on

More specifically...

I can make independent adjustments in snapshots, e.g., select different 
tabs for different snapshots. But these adjustments are not retained when 
the file is uploaded from my computer to my demonstrations area.
If I click on a button as part of the adjustment,  all the other snapshots 
update so as to look be working with the same data from the currently 
active snapshot.  This makes it impossible to display different fractions 
in different snapshots. 

I suspect that the code in the demo reinitializes when uploaded to the 
demonstration area.
And that it reinitializes each time I click on the New button (in the 
demo) to work with a new fraction.

The following code runs from the initialization section of the 
demonstration when the New  button is clicked.

toM["NewTarget", lev_] := 
 Module[{minLevels = 2, maxLevels = 12, minMoves = 3, maxMoves = 12, num,  
(s = 0;
 m = I; 
{num, den} = {RandomInteger[{1, lev}], RandomInteger[{1, lev}]}; 

Length[ContinuedFraction[num/den]] > maxLevels 
Or   Length[ContinuedFraction[num/den]] < minLevels
Or   M[toM[num/den], "nMoves"] > maxMoves
Or   M[toM[num/den], "nMoves"] < minMoves, 
{num,        den} = {RandomInteger[{1, lev}], 
RandomInteger[{1, lev}]}]; 

I can send the whole demo source code to anyone who is willing to give it 
a look. It is about 300 lines long.



  • Prev by Date: Re: Combine these displays
  • Next by Date: Re: A new graphic user interface
  • Previous by thread: Re: ExistsURLQ
  • Next by thread: ploting piecewise function in contourplot3d section