[General] Designing Programs with Physics

Got questions? Got answers? Go here for both.

Moderator: MaxCoderz Staff

darkstone knight
New Member
Posts: 67
Joined: Sun 09 Nov, 2008 1:56 pm

Re: [General] Designing Programs with Physics

Post by darkstone knight »

Code: Select all

:While 1
: real(0,0
: real(1,R,int(-(F-57)),1,8,0,0,0,0,0,1
: F→I
: N→V
: V+AT→N
: I+VT+.5AT^2→F
: T+.01→T
: If F≤0
: Then
:  θ→F
:  -.8N→N
:  θ→T
: End
:End
you dont need all that stuff, use this

Code: Select all

:While 1
: real(0,0
: real(1,R,int(-(F-57)),1,8,0,0,0,0,0,1
: V+A→V
: F+V→F
: If F≤0
: Then
:  F-V→F
:  .8*abs(V→V
: End
:End
: I+VT+.5AT^2→F
that formula is, if i recall correctly, the formula for calculating distance over Time
I=initial distance
V=initial velocity
A=acceleration (usually 9.82, gravity)

basely what you get if you omit the if F<0 ... part
Post Reply