Animate a pendulum: Difference between revisions

m
Line 162:
 
DEF-FUN( Animate a Pendulum )
MSET( theta, accel, speed, bx, by )
SET( theta, M_PI_2 ) // pi/2 constant --> flow.h
SET( g, 9.81 )
Line 192:
 
STOR( SUB(x2, x1) SUB(y2, y1), dx, dy )
LET( paso := IF( GE?( ABS(dx) » (DX), ABS(dy)»(DY) ), ABS(dx)DX, ABS(dy)DY ) )
 
// increment:
543

edits