05-19-2026, 12:01 AM
(This post was last modified: 05-19-2026, 02:38 AM by 1micha.elok.)
Let's rotate the waves 

Code:
set window "Gold Waves_modified", 600, 480, false
set redraw off
zoom = 1.0
angle = 0.0
do
for t = 1 to 99 step 0.3
if keydown(KEY_UP, true) and zoom < 3.0 then zoom = zoom + 0.05
if keydown(KEY_DOWN, true) and zoom > 0.2 then zoom = zoom - 0.05
angle = angle + 0.02
s = zoom
set color 64, 0, 0
cls
for y1 = 0 to 24
for x1 = 0 to 24
' Original grid position centered around origin
gx = (x1 - 12) * 20
gy = (y1 - 12) * 20
' Apply rotation around Z-axis
rx = gx * cos(angle) - gy * sin(angle)
ry = gx * sin(angle) + gy * cos(angle)
' Isometric projection
proj_x = (rx - ry) * 0.5
proj_y = (rx + ry) * 0.25
' Scale and center on screen
x = proj_x * s + 300
y = proj_y * s + 240
d = ((10 - x1)^2 + (10 - y1)^2)^0.5
h = 60 * sin(x1 / 4 + t) + 65
if t > 10 and t < 20 then h = 60 * sin(y1 / 4 + t) + 65
if t > 20 and t < 30 then h = 60 * sin((x1 - y1) / 4 + t) + 65
if t > 30 and t < 40 then h = 30 * sin(x1 / 2 + t) + 30 * sin(y1 / 2 + t) + 65
if t > 40 and t < 50 then h = 60 * sin((x1 + y1) / 4 + t) + 65
if t > 50 and t < 60 then h = 60 * sin(d * 0.3 + t) + 65
vh = h * s
hw = 10 * s
hh = 5 * s
set color 100 + h, 100 + h, h
draw poly [x, y - vh, x + hw, y + hh - vh, x + hw * 2, y - vh, x + hw, y - hh - vh], true ' TOP
set color 60, 60, 0
draw poly [x, y - vh, x + hw, y + hh - vh, x + hw, y, x, y - hh], true ' FRONT-LEFT
set color 150, 150, 0
draw poly [x + hw, y + hh - vh, x + hw, y, x + hw * 2, y - hh, x + hw * 2, y - vh], true ' FRONT-RIGHT
if keydown(KEY_ESCAPE, true) then end
next
next
redraw
fwait 20
next
loop
