Square waves
Inspired by Jean-Baptiste Etienne
From Des prismes de hauteurs dymamiques !
GGB scripting
speed = 1
t = Slider(0, 2pi, 0.01, speed, 200, false, true, false, false)
f(x, y) = 1.5 * sin(1/4x - 1/4y) cos(1/4x + 1/4y + t)
A1 = (0, 1)
A2 = (1, 1)
A3 = (1, 0)
A4 = (0, 0)
s1 = Polygon(A1, A2, A3, A4)
n = 6
Ln = -n...n
LV = Flatten( Zip(Zip(Vector((0, 0, 0), (j, k, f(j, k))), k, Ln), j, Ln) )
LT = Zip( Translate(s1, vec), vec, LV )
SetActiveView( -1 )
SetBackgroundColor( "Black" )
StartAnimation(t, true)
#---Extra Settings---#
SetVisibleInView(f, -1, false)
SetVisibleInView(A1, -1, false)
SetVisibleInView(A2, -1, false)
SetVisibleInView(A3, -1, false)
SetVisibleInView(A4, -1, false)
SetVisibleInView(A1, 1, false)
SetVisibleInView(A2, 1, false)
SetVisibleInView(A3, 1, false)
SetVisibleInView(A4, 1, false)
SetVisibleInView(s1, -1, false)
SetVisibleInView(s1, 1, false)
SetVisibleInView(a1, 1, false)
SetVisibleInView(a2, 1, false)
SetVisibleInView(a3, 1, false)
SetVisibleInView(a4, 1, false)
SetVisibleInView(a1, -1, false)
SetVisibleInView(a2, -1, false)
SetVisibleInView(a3, -1, false)
SetVisibleInView(a4, -1, false)