stairs Art/Electric
PROGRAMS
general
color methods
col hypercube
fuzzy logic 1
fuzzy logic 2
fuzzy logic 3
macrame
mandelzoom
julia set
ripples
sines
newtons basin
hadamard matrix
 
PROGRAMS 2
L-systems
IF-Systems
 
e-mail
RIPPLES
graphic

PROGRAM ripples     !1986 GWbasic to TRUE Basic March 2004
!(© W.van Duyn 2004)
SET MODE "color"
SET WINDOW 0,1199,0,903    !aspect ratio 1:1 tuned for 1280x1024 res
SET BACKGROUND COLOR "white"
PRINT "Circles Squared - input cornerA, cornerB"
INPUT CORNA, CORNB
PRINT "input Side (smaller is larger),Size (min to 900 max)"
INPUT SIDE
CLEAR
FOR I = -SIZE/2 TO SIZE/2
FOR J = -SIZE/2 TO SIZE/2
LET X = CORNA + (SIDE * I/100)
LET Y = CORNB + (SIDE * J/100)
LET Z = X^2 + Y^2
    CALL colorpat(C,Z)
LET xx=I+600     !centers image
LET yy=J+452
PLOT xx,yy
NEXT J
NEXT I
END

SUB colorpat(C,Z)    !alter to suit
LET C = INT(MOD(Z,6))
IF C = 0 THEN SET COLOR 13
IF C = 1 THEN SET COLOR 16
IF C = 2 THEN SET COLOR 10
IF C = 3 THEN SET COLOR 14
IF C = 4 THEN SET COLOR 9
IF C = 5 THEN SET COLOR 15
END SUB

Website, Text and Some Images Copyright © 2002 tzingaro.com, all rights reserved.