RosettaCodeData/Task/Animate-a-pendulum/Amazing-Hopper/animate-a-pendulum-3.hopper
2023-07-01 13:44:08 -04:00

12 lines
275 B
Text

// in "Animate a Pendulum"
SET( px, 640 )//65 )
SET( py, 30 ) //7 )
// long of the line:
LET( bx := ADD( px, MUL( MUL( l, 180 ), SIN(theta) ) ) )
LET( by := SUB( py, MUL( MUL( l, 180 ), COS(theta) ) ) )
// and circle ratio:
{bx, by, 10} GOSUB( CIRCLE )