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
MANDELBROT SET
graphic

PROGRAM mandelzoom !(1987 november Pascal to true basic 2004 march)
!© W.van Duyn 2004
SET MODE "color"
SET WINDOW 0,1199,0,903 !aspect ratio 1:1 tuned to 1280x1024 res
PRINT "input cornA, cornB (try -2.00, -1.30 to start)"
INPUT cornA,cornB
PRINT "Input side, size (try 1.30,100 to start)"
INPUT side,size
CLEAR
SET COLOR "black"
BOX AREA 10,1189,10,893
FLOOD 10,10
LET gap=side/size
LET a = cornA
LET dxy = 10 + size
FOR i = -size to size
LET a = a+gap
LET b = cornB
FOR j = -size to size
LET b=b+gap
LET x=0
LET y=0
LET z=0
LET mc=0
DO WHILE =mc < 200 AND z =< 4
LET xx=X^2-y^2+a
LET y=2*x*y+b
LET x=xx
LET z=(x^2+y^2)
LET mc=mc+1
LOOP
LET xi=i-dxy
LET yj=j+dxy
    CALL colpatA(mc)
PLOT yj,-xi !to rotate axes
NEXT J
NEXT I
END

SUB colpatA(mc)     !alter color table to suit
IF mc < 200 THEN LET mm=MOD(mc,10)
LET ac=mm/9    !red
LET bc=mm/9    !green
LET cc=mm/9    !blue
SET COLOR MIX (col)1-ac,0,cc
IF mc>= 200 THEN SET COLOR MIX (col)0,0,0    !black
SET COLOR col
END SUB

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