What is this 'Dot fever' about?
[size=150][b]Hi! Welcome to the Dot fever series![/b][br][br]In Twitter I saw some amazing animations with red and white dots by [url=https://twitter.com/ntsutae]ntsutae[/url]. You can see the tweet [url=https://twitter.com/ntsutae/status/1327422887515439104]here[/url]. These animations were made with the minimalistic creative coding environment called [url=https://tixy.land/]tixy.land[/url] created by [url=http://aem1k.com/]Martin Kleppe[/url]. After studying the source code I thought it was possible to make a GeoGebra (GGB) version of these animations. This book contains the results of my implementation in GGB.[br][br]I would like to thank [url=https://www.geogebra.org/u/thijs]Thijs[/url] who helped me to improve the GGB script. If you like to see more amazing applets, you must check [url=https://www.geogebra.org/u/thijs]Thijs[/url]'s work.[br][br]Finally, if you like to see the script, please download the GGB file and look for the button with label: [i]Script. [/i]Or check the last chapter of this book to see the initial and improved versions of the script.[br][br][b]Enjoy![/b][/size]
Dot fever 001
Fireworks in blue
Dot fever: Initial script
GGB script
[size=150]#=====================================[br]# Define slider and initial settings[br]#=====================================[br]t = Slider(0, 2pi, 0.01, 1, 170, false, true, false, false)[br]L = Sequence(k, k, -10, 10)[br]size = Length(L)[br][br]#=====================================[br]# Functions[br]#=====================================[br]g(x) = (2 / (1+exp(-x)) - 1)*0.5[br]f(x, y) = 0.5 * sin(sqrt(x^2 + y^2) - t)[br][br]#=====================================[br]# Define Circles with names[br]#=====================================[br]Execute(Flatten(Sequence(Sequence("A"+k+"_"+j+" = Circle((Element(L, "+k+"), Element(L, "+j+")), abs(g( f( Element(L, "+k+"), Element(L, "+j+") ) ) ) )", k, 1, size), j, 1, size)))[br][br]#=====================================[br]# Settings and colors :)[br]#=====================================[br]Execute(Flatten(Sequence(Sequence("ShowLabel(A"+k+"_"+j+", false)", k, 1, size), j, 1, size)))[br]Execute(Flatten(Sequence(Sequence("SetDynamicColor(A"+k+"_"+j+", If(f( Element(L, "+k+"), Element(L, "+j+")) < 0, 1, 1), If(f( Element(L, "+k+"), Element(L, "+j+")) < 0, 1, 0), If(f( Element(L, "+k+"), Element(L, "+j+")) < 0, 1, 0), 1)", k, 1, size), j, 1, size)))[br][/size][size=150][br]#=====================================[br]# That's it! Enjoy! [br]#=====================================[/size]