ScratchData LogoScratchData
Back to Wes64's profile

Circle Physics

WEWes64•Created September 21, 2013
Circle Physics
442
294
10629 views
View on Scratch

Instructions

Just a math animation - no controls! This uses no costumes and to <touching?> sensing. Everything is math and pen.

Description

The ball will bounce off the circles with mathematically correct precision. I mathed the formulas myself. HOW IT CALCULATES The ball has the center Hb, Kb, and the radius of 16. Each circle has the center Ha, Ka, with radius of Ra. Therefore, the angle from the ball to the circle θb is atan(Ka-Kb / Ha-Hb). The ball must bounce over the line P perpandicular to the line connecting the two circles. The ball approaches at angle θv. I can explain further, but I would need paper to explain the geometry. Finally, you get the formula (new direction) = -θv - 2θb When the ball bounces off the X edge, it calculates (new direction) = (old direction) * -1 And off the Y edge (new direction) = 180 - (old direction)

Project Details

Project ID12571073
CreatedSeptember 21, 2013
Last ModifiedOctober 24, 2014
SharedSeptember 21, 2013
Visibilityvisible
CommentsAllowed