Trigonometric funtions from "8,000 LINE SEGMENTS"

Charlie Veniot20th June 2022 at 11:54pm
' The trigonometric functions by Hamid Naderi Yeganeh from his original artwork (8,000 LINE SEGMENTS)
' https://blogs.scientificamerican.com/guest-blog/making-mathematical-art/

pi = 3.1415929
screen _newimage(4400, 4400, 21)
for k = 1 to 8000
a = sin(14 * pi * k / 8000) * ( (sin(12 * pi * k / 8000))^2 + (sin(18 * pi * k / 8000))^2 ) * 1000
b = cos(14 * pi * k / 8000) * ( (sin(12 * pi * k / 8000))^2 + (sin(18 * pi * k / 8000))^2 ) * 1000
c = sin(14 * pi * k / 8000) * ( (sin(8 * pi * k / 8000))^2 + (sin(10 * pi * k / 8000))^2 ) * 1000
d = cos(14 * pi * k / 8000) * ( (sin(8 * pi * k / 8000))^2 + (sin(10 * pi * k / 8000))^2 ) * 1000
couleur = &h00ff00
if b+2200>800 and b+2200<2000 or b+2200>2400 and b+2200<3600 then couleur = &hffff00
line (a+2200,b+2200) - (c+2200,d+2200), couleur
next k