Results 1 to 1 of 1

Thread: Trauma

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

    Trauma

    Hi,

    Is a little bit slow, but funny.
    Uses "ui"
    #INCLUDE "abc.inc"
    
    OpenWindow 320, 320
    SetHandleDC hdc, hwnd
    
    Sub Trauma(im,ii,st As Single)
        Local fx, fy, i As Single
        Local r, g, b, c, x, y As Long
        For x=0 To 320
            i =1 
            fy=0
            For y=0 To 320
                c=i*(Cos(fx))+i*(Cos(fy))
                r = Get_R(c)
                g = Get_G(c)
                b = Get_B(c)
                 Canvas_SetPixel x,320-y,xRgb(r,g,b)
                i=i*im+ii
                fy +=st
            Next
            fx +=st
        Next
    End Sub    
    
    Dim m,n As Single
    Dim i As Long
    
    While IsWindow(hwnd) And Key(27)=0
    m=1 : n=1 
    For i=1 To 40
        Trauma (m,n,.01)
        n +=111
        Canvas_Redraw
    Next
    
    m=1 : n=1 
    For i=1 To 40
        Trauma (m,n,.02)
        n +=111
        Canvas_Redraw
    Next
    
    m=.5 : n=.5 
    For i=1 To 40
        Trauma (m,n,.03)
        n +=111
        Canvas_Redraw
    Next
    
    m=1 : n=1
    For i=1 To 40
        Trauma (m,n,.04)
        n +=111
        Canvas_Redraw
    Next
    Wend
    Canvas_Window End hwnd
    
    ps: small correction, xRgb instead of rgb.
    Last edited by peter; 11-04-2014 at 12:39.

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
  •