Folks,
I'm building a math demo. It is a complex diagram that changes as the user moves a slider. I'm using the turtle Pen to draw the diagram. It needs to be "double-buffered" so that the user does not see the area get cleared to white and does not see the drawing being made. That is, no flashing. Here's the plan. Make a drawing (SketchMorph). Make another drawing that is the same size and hide it. Each sketch will be a costume for a player of the first sketch. Whenever the slider moves, get the Form of the sketch that is not currently showing. Draw into it with the Pen. Switch it to be the costume that shows. Is there a simpler way to do this in Etoys? If not, maybe we can extend Etoys to allow this, so an author does not need to know Squeak to make it happen. --Ted. -- Ted Kaehler If you're not hungry enough to eat an apple, then you're not hungry. If you are that hungry, then do eat an apple. -- paraphrasing Michael Pollan. http://www.vpri.org/html/team_bios/kaehler.html _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
Ted, I had a similar problem trying to visualize all the different combinations of turn by angles in a loop. In Etoys its simple. Make the drawing on a hidden playfied. Then set the Sketch's graphic to the Playfield's: pen trail graphic
Cheers, Stephen
On Mon, Mar 24, 2014 at 12:31 PM, Ted Kaehler <[hidden email]> wrote: Folks, To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up. When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity. - Martin Harverbeke (from Eloquent JavaScript) _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
Free forum by Nabble | Edit this page |