T -90 A 250 -108 # an arc 250 cogs, 108 degrees to the right A 250 180 # an arc 250, 180 degrees to the left * # let the program to close the path X W 0.2 # penwidth 0.2 points S 0.5 D 250 # disc 250 cogs H 300 # hole 280, constant V 90 18 20 # deviation 0, increment of deviation 18 degrees 20 times R 50 # resolution 50 points per segment N # compute how many cycles will be required # to close the spirogram C 255 0 0 > 0 0 255 5 # red -> blue 5 values + 0 0 255 > 255 0 0 5 # blue -> red 5 values G 10 D -250 # And now, in the outside. G 10