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