Google Classroom
GeoGebraGeoGebra Classroom

Rainbow circles

Script

c = Circle((-4, 4), 1) a = Slider(1, 5, 0.1, 1, 170, false, true, false, false) b = Slider(1, 5, 0.01, 1, 170, false, true, false, false) n = Slider(1, 10, 1, 1, 170, false, true, false, false) i = Slider(1, 10, 1, 1, 170, false, true, false, false) C = (0, 0) Lk = 1..n Li = 0..i F = Flatten( Zip( Rotate( Zip( Dilate( Rotate( c, li * 360° / (n * b), C ), a^li, C) , li, Li ), k * 360° / n, C ), k, Lk ) ) Lname = Flatten( Zip( Zip( "circle"+k+li, k, Lk ), li, Li+1 ) ) Execute( Zip( name + " = Element(F, "+ ind +")", name, Lname, ind, 1..Length(F) ) ) op = Slider(0, 1, 0.01, 1, 170, false, true, false, false) Execute( Zip( "SetDynamicColor( "+ name +", "+ k +"/Length(F), 1, 1, op)", name, Lname, k, 1..Length(F) ) ) Execute( Zip( "ShowLabel( "+ name +", false)", name, Lname ) ) CenterView( C ) ShowGrid( false ) ShowAxes( false ) SetBackgroundColor( "Black" )