From 6933f99ddb2d7103515d26838496309a807bba26 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 16 Nov 2026 21:28:20 -0300 Subject: Move standalone sketches into sketchbook examples --- examples/noc/test/pendulum.script | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/noc/test/pendulum.script (limited to 'examples/noc/test/pendulum.script') diff --git a/examples/noc/test/pendulum.script b/examples/noc/test/pendulum.script new file mode 100644 index 0000000..244be44 --- /dev/null +++ b/examples/noc/test/pendulum.script @@ -0,0 +1,18 @@ +# Grab the bob where it starts (angle PI/4), drag it out to the left, let go. +down 444 154 +expect dragging true +move 300 120 +move 200 100 +move 160 60 +frames 2 +expect dragging true +# The rod points at the pointer: (160, 60) from the pivot (320, 30). +expect angle -1.3854 ~0.001 +up 160 60 +expect dragging false +# Let go from rest: one step of gravity since. +expect angle_velocity 0.0022 ~0.0001 +# It swings back from the left. +frames 40 +expect angle 0.1588 ~0.001 +screenshot .zig-cache/e2e/pendulum.png -- cgit v1.3