[HELP] Bouncing ball problem
Adam Bloom
admanb at hotmail.com
Sun Oct 8 17:28:28 UTC 2000
>From: "Jochen F. Rick" <nadja at cc.gatech.edu>
>Reply-To: squeak at cs.uiuc.edu
>To: squeak at cs.uiuc.edu
>Subject: Re: [HELP] Bouncing ball problem
>Date: Fri, 6 Oct 2000 17:01:13 -0400
>
>Hello Adam,
>
>I think it isn't infinite. It's just really long.
>The first time you do '0 to 29' thing, you get a half bounce. 'path :=
>path, path reversed' gives you a full bounce.
Your right its not infinite.
>You can fix this in several ways. One way to change this might be call
>the first full bounce just a bounce. Then, you could do
>
> path := OrderedCollection new.
> 1 to: 5 do: [:i | path := path, bounce].
Do you mean create bounce as a method? I tried that but it doesn't work.
(If you copy everything in from John Maloneys tutorial you can try it
yourself)
Adam
>
>On Fri, Oct 06, 2000 at 07:28:39PM +0000, Adam Bloom wrote:
> > This may seem like a elementary problem to most of you, however its not
>to
> > me, I'm working with the "TestMorph" that is created in John Maloney's
> > Morphic tutorial, I'm trying to make it bounce five times, however it
>just
> > bounces on forever, heres the code
> >
> > #TestMorph Method
> > startAnimation
> > path := OrderedCOllection new.
> > 0 to: 5 do: "This is the part that is supposed to make it bounce 5
> > times"
> > [:h | 0 to: 29 do: [:i | path add: self position + (0@(i squared /
> > 5.0)))]. "This makes it go"
> > path := path, path reversed]. "This makes it go up and down"
> > self startStepping.
> >
> > Any help?
> >
> > Adam
> >
>_________________________________________________________________________
> > Get Your Private, Free E-mail from MSN Hotmail at
>http://www.hotmail.com.
> >
> > Share information about yourself, create your own public profile at
> > http://profiles.msn.com.
>
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.
More information about the Squeak-dev
mailing list
|