From Mad Teddy's Fractal #2: Biomorphs
#1
This is from one of the links Andy mentioned.

I colorized it and put it into loop so it changes slightly.

Code:
'radiolarians.bas for QB64 fork (B+=MGA) 2017-05-13
' rotolarians.bas SmallBASIC 0.12.9 (B+=MGA) 2017-05-13
' Mad Teddy's web pages Fractals #2 Biomorphs
' http://www.madteddy.com/biomorph.htm
' colorized mod, bplus

DIM sh, sw, i, j, n AS INTEGER
sh = 720: sw = 960

DIM cReal, cImag, aspRatio, ymax, ymin, xmax, xmin, x0, y0, x, y, xx, yy AS DOUBLE
cReal = .5: cImag = 0: aspRatio = sw / sh '4/3
ymax = 2.5: ymin = -ymax: xmax = ymax * aspRatio: xmin = -xmax

SCREEN _NEWIMAGE(sw, sh, 32)
_TITLE "Fractals #2 Biomorphs, colorized by bplus for QB64 Fork"

WHILE 1
   CLS
   FOR i = 0 TO sh
       FOR j = 0 TO sw
           x0 = xmin + (xmax - xmin) * j / sw
           y0 = -ymin - (ymax - ymin) * i / sh
           x = x0: y = y0
           FOR n = 1 TO 255
               xx = x * (x * x - 3 * y * y) + cReal
               yy = y * (3 * x * x - y * y) + cImag
               x = xx: y = yy
               IF ABS(x) > 10 OR ABS(y) > 10 OR x * x + y * y > 10 ^ 2 THEN EXIT FOR
           NEXT n
           IF n > 255 THEN n = 255
           IF x > 10 THEN x = 10
           IF x < 0 THEN x = 0
           IF y > 10 THEN y = 10
           IF y < 0 THEN y = 0
           PSET (j, i), _RGB(255 - x * 25, x * y * 2.5, y * 25)
       NEXT j
   NEXT i
   _DISPLAY
   cReal = cReal + .01
   'if cImag >= 0 then cImag = cImag - .1
WEND

As you can see, it has completely different look.


Attached Files Thumbnail(s)

B += x
Reply
#2
Nice! I like it. Big Grin
Reply
#3
Hi KingAshish, 

Yes, you probably like how I declared my types  :-))
B += x
Reply
#4
Bing, aren't you done with this yet?

B + this one too:
B += x
Reply
#5
So... You are getting these errors when you reply to a post?
Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts.
profile for Walter Whitman at Stack Overflow, Q&A for professional and enthusiast programmers


Reply
#6
Hi Walter, 

I thought I was getting errors from replying to old posts. Other forums flag you in the Editor when you are about to reply to a post that has been sitting for a certain period of time.

It was true that every old post was bringing the error message but it's was more than just that, if that was even a cause.
B += x
Reply
#7
@Bplus,

The section of internal code where that "soft error" is produced, shows it to be an unknown error. So, I added a bit of extra debugging information to the error message. When you get the error again, please post a screenshot of it so I can try to figure out what is causing the issue. I know which file is causing, but I don't know which section.
Dedicated to empowering computer programming hobbyists, tinkerers, amateurs, and enthusiasts.
profile for Walter Whitman at Stack Overflow, Q&A for professional and enthusiast programmers


Reply