[Thread Prev] [Thread Next]
On 19 Dec 2001 at 21:59, mike sandy wrote:
> A more flexible general proc to replace glide is:
>
> to travel :dist
> let[sgn :dist / abs :dist
> spd :sgn * speed * .01]
> repeat :dist / :spd[fd :spd]
> end
>
> which will now cope with negative distances.
> Mike
>
Or, if the slider goes from 1 to 10, this:
to travel :distance
let [sgn ifelse 0 < :distance [1][-1]
spd :sgn / (11 - speed)]
repeat :distance / :spd [fd :spd]
end
I almost did not understand that the
signs of :distance and :spd in:
:distance / :spd
cancel out.
Attached is my corrected nestingDollsShow.mw2
Some other example which shows embedded recursion in an easy
way?
Daniel
Attachment:
nestingDollsShow.mw2
Description: Binary data
Previous by thread:
Re: Dolls - recursion
Next by thread:
Poll Results
To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.
|