ScratchData LogoScratchData
Back to locker99's profile

8 BouncingMusicBalls

LOlocker99•Created April 8, 2010
8 BouncingMusicBalls
0
0
29 views
View on Scratch

Description

Bouncing Balls with Soundcolors is a much enlarged version of: http://scratch.mit.edu/projects/Canthiar/7369 by Canthiar You now have colors an sounds and many parameters to play with: Up / Down = -/+ Gravity Left / Right = -/+ Emitter Speed B / A = -/+ more Balls 1 = switch Edges 2 = switch Turn Effect 3 = switch Random 4 = switch Drawing 5 = switch Sound Space = start Balls again DragDrop Collision Objects DragDrop Balls DragDrop Emitter Turn Emitter by pulling it's tip H = Help (english) G = Help (german) Chantiers original description: You can move the object emitter around with the mouse and change the direction by clicking on the pointed end. This is what I consider a production version since I've inlined a few things. I have a more academic version that is a little easier to read. The whole thing is also dumbed down a little to make the math a little easier. How it works: When a ball encounters a collision object it uses the [ point towards[ Collision ] ] command block and then uses sin and cos to calculate a colliion normal. That normal is used to calculate a resulting velocity perpendicular to the surface and velocity tangent to the surface. Friction and restitution are applied to make the ball bounce.

Project Details

Project ID974307
CreatedApril 8, 2010
Last ModifiedApril 8, 2010
SharedApril 8, 2010
Visibilityvisible
CommentsAllowed

Remix Information

Parent ProjectView Parent
Root ProjectView Root