Results 1 to 1 of 1

Thread: Fractal Island

  1. #1
    Member
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    406
    Rep Power
    56

    Fractal Island

    Hello,

    3D Island.

    It seems that every Basic dialect has its own RGB algorithms.
    If you change Thinbasic RGB to xRGB, you will see what I mean.

    Uses "ui"
    #INCLUDE "abc.inc"
    
    OpenWindow 400, 300
    Canvas_Clear 0
    DrawString 10,10,"A MOMENT...",&hffffff
    Canvas_Redraw
    
    Single cRe,cIm,newRe,newIm,oldRe,oldIm,z,movex,movey
    Long imax,x,y,i,a
    
    cRe = -0.8 : cIm = 0.27015 : z=1 
    imax=256  
    
    For x=0 To 400
       For y=0 To 300
           newRe = 1.8 * (x-400*.5) / (.5*z*400) + movex
           newIm = (y-300*.5) / (.5*z*300) + movey
           For i=0 To imax
               oldRe = newRe
                 oldIm = newIm
                 newRe = oldRe * oldRe - oldIm * oldIm +cRe
                 newIm = 2 * oldRe * oldIm + cIm
                 If((newRe * newRe + newIm * newIm) >5) Then Exit For
           Next
           canvas_SetPixel x,y, Rgb 55*i, 55, 155-i 
       Next
    Next
    Canvas_Redraw
    
    While IsWindow(hwnd) And Key(27)=0
       Sleep 10
    Wend
    Canvas_Window End hwnd
    
    Attached Files Attached Files

Similar Threads

  1. Biomorphs , a Fractal creatures
    By zak in forum Math: all about
    Replies: 6
    Last Post: 14-03-2010, 12:02
  2. Fractal Videos
    By Charles Pegge in forum Shout Box Area
    Replies: 2
    Last Post: 13-03-2010, 12:04
  3. Monkey Island for free
    By Petr Schreiber in forum Gaming
    Replies: 2
    Last Post: 20-09-2009, 15:39
  4. fractal tbgl help
    By Lionheart008 in forum TBGL General
    Replies: 12
    Last Post: 16-06-2009, 11:57
  5. Fractal Fern
    By Michael Clease in forum TBGL General
    Replies: 17
    Last Post: 08-08-2007, 11:58

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •