Rolling Circle Illusion (OR is it? see below) Click Flag to start the Illusion with default parameters. You can change the values of those parameters at any time, using the 4 sliders provided (one in each corner). Click the stage to toggle Line drawing Off/On. Roll Direction change now combined with Speed slider. *** NOTE *** to properly observe the effect of increasing the Loops parameter you will need to significantly increase the Balls parameter! *** ILLUSION ? *** NO, it's not. There is a Rolling Disc. If a big circle has a half radius disc rolling around inside it (so it's always touching the big circle's edge), any point on the inner disc's edge, traverses a linear path back & forth across the big circle. The Balls are just a bunch of points on the inner disc's circumference! To prove there is NO illusion, there's a ** New Feature ** when Loops = 1, to make the actual Rolling Disc that really is there, visible! Just click on the little Grey Disc! NOTE: The 1st time it's clicked, Balls is set to 2, because I think this setting is the clearest way to dispel the myth that there is an illusion here. Furthermore the rolling disc, can only be toggled on/off, if Loops = 1. My favourite parameter combination is "The Propeller" -Any Radius, 100 (or 50) Balls, 5 Loops, Speed 6!
Created by @gregatku for use in Coding Classes for Kids Unlimited, for whom I work as a Coding teacher. Inspired by @colinmacc's project "The Magic Circle", but some mathematics for placing the Balls at their correct locations, according to the variable parameters, came from @scratch99911's "Circle illusion" project & @Bhachdi's "Circle Illusion! 100% Pen!" project gave me clues for making the Roll Direction change smooth! And a big thank you to @grandpasp for showing me how to combine the Roll Direction with the Speed slider which I had done in other projects previously but hadn't been able to make it work here until he showed me the other changes that needed to made to make it work! And the bonus was, this new way required less code. Ironically the Rolling Disc (added to prove there is no illusion here), is in fact itself an illusion, because it isn't actually rolling around the edge of the big circle at all! Its costume has the bottom of the disc as its centre, and what it is actually doing is simply rotating around the big black circle's centre. It is only the Balls sitting on its circumference that make it appear to be rolling around the black circle's outer edge. It was a "cheat" to minimize the amount of code required to implement it, but it achieves the desired effect because it sure looks like it's rolling around the black circle's outer edge.