|
Morphic - How to animate without defining #step ?: msg#00078lang.smalltalk.squeak.beginners
Hi Folks, I have been struggling with Morphic animation. I would like to animate some different algorithms that compute solutions to various puzzles. (It is for an introduction to Squeak for high school students.) Normally animations in Morphic are done by defining the #step method. But in this case I want to animate various stages of an algorithm. I cannot split the algorithm into bits and pieces that can be evaluated by #step without destroying the algorithm. I have tried to update the morph from within the algorithm (i.e., by changing the color of various submorphs) but this does not work. I only see the final state. Can anyone tell me if what I want to do is even possible? Any pointers to some existing application that does this? If you want to see what I am trying to do, look at Mazemorph>>shortestPath in http://www.squeaksource.com/SOI.html MazeMorph soi openInWorld; shortestPath There is a simple BoardMorph made up of CellMorphs, specialized to search through a maze and find the shortest path. I would like to animate the depth-first searching, but I can only display the final state. There are other algorithms I would like to animate, but this is a typical case. (I thought of evaluating the algorithm as a separate process, with pauses at key points, and using #step to continue to the next pause, but that seems like overkill to me. There must be an easier way ...) - on
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Overriding methods, Oscar Nierstrasz |
|---|---|
| Next by Date: | Re: Morphic - How to animate without defining #step ?, Edgar J. De Cleene |
| Previous by Thread: | Overriding methods, Blake |
| Next by Thread: | Re: Morphic - How to animate without defining #step ?, Edgar J. De Cleene |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |