Skip to content

sulphuric-sudip/Parabolic-Object-Movement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Parabolic-Object-Movement

Here, I have moved a object in a parabolic path using equation Y = aX2 + bX + c

Steps:

1. Take three points: starting point, ending point and a point that lies in the path. For my case, points are (10, 100), (70, 80) and (50, 20) respectively.

2. Put these all points in equation above and generate three equations as:

   100 = a*102 + b*10 + c ..............(i)

   80 = a*702 + b*70 + c ..............(ii)

   20 = a*502 + b*50 + c ..............(iii)

3. Solve the above three equations to get the value of constants a, b and c

4. Then equation becomes Y = (1/12)X2 - (7)X + (485/30)

5. Use this equation and use loop to move object as shown in sample code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors