View Full Version : Brownian Trails
Lindquist
05-04-2005, 02:12 PM
height=240 width=320
I was wondering what combining Brownian Motion and Trails would create. Turned out pretty nice.
Enjoy ;)
-L
amitgeorge
05-04-2005, 02:24 PM
define Brownian Motion for the dumb (like me)
Lindquist
05-04-2005, 02:40 PM
It's random motion discovered by a guy named Brown. Brownian motion usually refers to things like dust that moves randomly in a glass of still water because the molecules (that are constantly in motion) in the water knock the dust around.
tu comprends?
define Brownian Motion for the dumb (like me)
amitgeorge
05-04-2005, 03:48 PM
oui je
Krilnon
05-04-2005, 06:28 PM
Eh.... but the movement in Flash isn't brownian motion.
Lindquist
05-04-2005, 06:57 PM
That's like arguing that the movement in the gravity tutorials isn't really gravity... Are you trying to make a point or something?
Eh.... but the movement in Flash isn't brownian motion.
Krilnon
05-04-2005, 07:01 PM
I don't know, but it just sounds like you were trying to make a cool name for it, but I think random is a better descriptor. In the case of the gravity-in-flash tutorials, can you think of a more fitting name? (Then it would be most helpful for it to be named that)
I think brownian motion was first explained in cells, no?
Lindquist
05-04-2005, 07:10 PM
There is a difference between the motion in my movie and the random motion normally presented on kirupa.
The majority of random motion tutorials focus on finding a random point to move to and then moving to that point.
My example travels at random increments and directions.
Brownian Motion - "A stochastic process in which the random variable moves continuously and follows a random walk with normally distributed, independent increments."
Krilnon
05-04-2005, 07:26 PM
Hmm.. Your reasons for naming it that make more sense now, I hadn't scrutinized your code as the motion doesn't look that different ( though looking at it more closely, it does seem different) :)
You could make invisible particles fly around the stage and their collision with an object could cause it to move :P
thehappyappy
07-24-2007, 07:56 AM
height=240 width=320
I was wondering what combining Brownian Motion and Trails would create. Turned out pretty nice.
Enjoy ;)
-L
That looks really cool. I'm trying to create a fluid motion of the buttons in my movie (http://www.lucyohara.talktalk.net/menu.swf). I've addedportfolio.onEnterFrame = function () {
this._x += (5*Math.random()-1);
this._y += (5*Math.random()-1);
}
to the keyframe of my movie, but it seems to just jump around rather than float. I'd be extremely grateful if you could offer me any help.
Thanks
Charleh
07-24-2007, 08:49 AM
The reason for that if because you are just setting the position of the object to the same position + random increment every frame.
You are not really moving it anywhere just randomly jiggling it around every frame..
thehappyappy
07-24-2007, 08:50 AM
Sorry to be so stupid, but how would I go about doing that?
Charleh
07-24-2007, 06:25 PM
You need to add increments to the objects velocity - not the actual position. Check out the source in the experiment above. It's simply a case of adding a small value to the velocity of the object every increment, then you won't get jiggling, but a smoother motion which will appear quite random.
You just add the velocity to the x/y position each frame after manipulation and that should be it
gonzolo
07-24-2007, 08:27 PM
lol seem's my brain just played a trick on me :P i thought it was interacting with my mouse :p turns out i was just following it around :P
look's good :D
thehappyappy
07-26-2007, 02:30 PM
I'm reaaly sorry, I still don't follow. Do I add it to the object itself or the keyframe? and do I just need to modify the code I've got or completely re-write it? I'm quite new to ActionScript and am trying to uild this site for my husband.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.