Google Classroom
GeoGebraClasse GeoGebra

Advanced example 1: Colored circles

Script Setup

A = (0.5, 0.5, 0.5) B = (0.5, 0.5, 0.5) C = (1, 1, 1) D = (0, 1/3, 2/3) functionRed(x) = x(A) + x(B) * cos(2pi(x(C) * x + x(D))) functionGreen(x) = y(A) + y(B) * cos(2pi(y(C) * x + y(D))) functionBlue(x) = z(A) + z(B) * cos(2pi(z(C) * x + z(D))) Execute(Zip("C"+i+" = Circle((4*random(),4*random()), RandomUniform(0.2, 1))", i, 1..10)) Execute(Zip("SetDynamicColor(C"+i+",Min(1, Max(0, functionRed("+i+"/10))), Min(1, Max(0, functionGreen("+i+"/10))), Min(1, Max(0, functionBlue("+i+"/10))),1)", i, 1..10))