|
Post by aurel on May 10, 2021 12:05:54 GMT -6
Just finished Henon fractal with a help of Specbas dude Paul D yes Paul put me in right direction with scaling ...
|
|
|
Post by johnno56 on May 10, 2021 13:48:41 GMT -6
Brilliant! You know I'm going to compare this with the original to see how he did it, right?
Nicely done!
|
|
|
Post by johnno56 on May 10, 2021 14:33:22 GMT -6
Conversion to RC went well. Curious... The variables px and py, where both x and y are multiplied by 200, seems a bit odd because I cannot see the reference to '200' in the listing. I'm going to assume that your friend was making an educated 'guess'. I am not complaining. The idea worked. I was just curious... lol
Now... Let me see if I can apply the same principle to the other fractal listings... Moo ha ha....
|
|
|
Post by aurel on May 10, 2021 16:04:39 GMT -6
My friend is Paul Dunn author of Specbas and you must know him from old bp.org forum it looks that his addition work , but if work on other listings I don't know ..i will try too.
by the way ..the variables px,py are not used in complex calculation just to record calculated position.
|
|
|
Post by johnno56 on May 10, 2021 17:47:18 GMT -6
I have tested the modification on a couple of the other fractals and it seems to work ok. For me, I used pset( 320 + (x * multiplier), 240 + (y * multiplier). Obviously changing multiplier changes the size of the fractal. It seems that the fractal coordinates are based on 320, 240 as 0, 0.
The fractals that use "LINE-(x, y)" are not drawing to a 'relative' position but an 'actual' position. There a some fractals that set the start point of a line outside for..next loops and use the line-() within the loops... Going to have to give those ones a little more thought... The one I was looking at was WHIRL.BAS...
Another thing... As QB uses a colour palette of 16 pre-defined colours, and as the usual the 32 bit colour range, getting the colours right for RC is a bit of a challenge...
Going to be "off keyboard" for most of today, so I will tackle all this later, or perhaps tomorrow.
Best of luck with your conversions.
J
|
|
|
Post by aurel on May 11, 2021 1:37:24 GMT -6
Better hennon I use RGB colors in micro(A) 'from Lauwerier H., 1991. "Fractals Images of Chaos" Penguin 209p.
'Orbits of Henon's Quadratic System ,micro(A) by Aurel 11.5.2021
var k,a,b,n,x,y,z,red,green,blue,abx,aby,abxy,px,py,t
wcolor 0, 0, 0
fcolor 150,150,180: print 10,440, "Orbits of Henon's quadratic system"
k= 1
'For k = 1 TO 20
while k < 20
red=rand(220)+8: green=rand(220)+8 :blue=rand(220)+8
x = -0.4 + rnd(1) : y = -0.4+ rnd(1)
a = 0.24: b = sqr(1-a^2)
n=1
while n < 500
' red=rand(8)+220: green=rand(8)+220 :blue=rand(8)+220
px=x*200+320 : py =y*200+240
fcolor red,green,blue :pset px,py
z = x
x = x * a - (y-x * x) * b
y = z * b + (y-z * z) * a
abx=abs(x) : aby=abs(y) : abxy = abx + aby
if abxy > 10 : goto continue : endif
'rect 8,398,80,24:print 10,400,n
n=n+1
wend
label continue
k=k+0.1
swap
wend
|
|