VERSION 5.00 Begin VB.Form frmmoire BackColor = &H00400040& Caption = "swirling peace pattern generator http://gregvan.tripod.com" ClientHeight = 6705 ClientLeft = 60 ClientTop = 375 ClientWidth = 9480 FillColor = &H00400040& BeginProperty Font Name = "Arial Black" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty LinkTopic = "Form1" ScaleHeight = 26440.1 ScaleMode = 0 'User ScaleWidth = 9480 StartUpPosition = 3 'Windows Default Begin VB.TextBox txtspeed Height = 435 Left = 120 TabIndex = 2 Text = "300" Top = 120 Width = 615 End Begin VB.CommandButton cmdKali Caption = "START " BeginProperty Font Name = "Arial Black" Size = 9.75 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 8520 TabIndex = 1 Top = 5520 Width = 855 End Begin VB.CommandButton cmdQuit Caption = "QUIT" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 495 Left = 8520 TabIndex = 0 Top = 6120 Width = 855 End Begin VB.Label Label1 BackColor = &H00FFC0C0& Caption = $"dada.frx":0000 Height = 4095 Left = 120 TabIndex = 3 Top = 720 Width = 1935 End End Attribute VB_Name = "frmmoire" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False 'Visual Basic program that paints a 'psychedelic PATTERN on the screen... 'other Kaleidoscope programs can be found at: 'http://gregvan.tripod.com 'This project is called dada.vbp 'this form is named frmmoire saved as dada.frm Private Sub cmdKali_Click() 'when you push the "Start" button 'this part of the program executes... frmmoire.Scale (0, 460)-(640, 0) Dim col1 As Single Dim col As Single Dim col2 As Single Dim ha As Integer Dim hat As Integer Dim haf As Integer Dim hatf As Integer haf = -1 hatf = 1 Dim ba As Integer Dim bat As Integer Dim baf As Integer Dim batf As Integer baf = -1 batf = 1 Dim extreme As Integer Dim slow As Integer Dim speed As Integer Dim fred As Integer, sue As Integer Dim fredf As Integer, suef As Integer fredf = 1 suef = 1 fredfa = 1 suefa = 1 Dim forever As Integer Dim endless As Integer Dim dark As Integer Randomize 'generate some random numbers sue = Int(Rnd * 200) bob = Int(Rnd * 400) bob = bob - 200 fred = Int(Rnd * 140) + 25 For j = 1 To fred col2 = col2 + &H175893 If col2 > &HFFFFFF Then col2 = col2 - &HFFFFFF col = col + &H2A1123 If col > &HFFFFFF Then col = col - &HFFFFFF col1 = col1 + &HE23456 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF krsna = krsna + 1 If krsna > 4 Then krsna = 1 Next j frmmoire.DrawWidth = 1 z0 = fred z4 = sue '??????????????????????????????????????????????????????? For forever = 1 To 1000 For endless = 1 To 1000 col = col + &H2A1123 If col > &HFFFFFF Then col = col - &HFFFFFF col1 = col1 + &HE23456 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF col2 = col2 + &H127691 If col2 > &HFFFFFF Then col2 = col2 - &HFFFFFF 'GoTo testinga 'pasted from kathydrawing Dim suef6 As Integer 'suefactor suef6 = -2 Dim fredf6 As Integer 'fredfactor fredf6 = krsna 'set z to known random number for printing fred6 = bob sue6 = sue z6 = fred w6 = 0 For jorma = 30 To 3 Step -3 c = c + &H2A1123 If c > &HFFFFFF Then c = c - &HFFFFFF 'some loops to repeat the radial line plotting For peter = 1 To 5 For pete6 = 18 To 1 Step -1 For joe6 = -3 To pete6 Step 1 col = col + &H102 If col > &HFFFFFF Then col = col - &HFFFFFF c = c + &H20001 If c > &HFFFFFF Then c = c - &HFFFFFF notpete6 = pete6 w6 = w6 + 1 If w6 > joe6 - pete6 Then w6 = -w6 z6 = z6 + w6 If z6 > 400 Then z6 = -400 If z6 < -400 Then z6 = 400 'up-down counter for fred...it increases fred until a threshhold 'is reached then it decreases fred until another threshhold is 'reached then it increases fred... "a triangle wave oscillator" fred6 = fred6 + fredf6 If fred6 > 500 Then fred6 = 0 If fred6 < -400 Then fredf6 = joe6 If fred6 > 400 Then fredf6 = -joe6 sue6 = sue6 + suef6 If sue6 > 350 Then suef6 = -joe6 If sue6 < -350 Then suef6 = joe6 z = z6 x = fred6 y = sue6 frmmoire.Line (420 - z, 240 - y)-(420 - x, 240 + z), c frmmoire.Line (220 + z, 240 + y)-(220 + x, 240 - z), c frmmoire.Line (320 - y, 280 - z)-(320 - x, 280 + x), col frmmoire.Line (320 + y, 200 + z)-(320 + x, 200 - x), col frmmoire.Line (420 - z, 240 - y)-(420 + x, 240 - z), c frmmoire.Line (220 + z, 240 + y)-(220 - x, 240 + z), c frmmoire.Line (320 - y, 280 - z)-(320 + z, 280 - y), col frmmoire.Line (320 + y, 200 + z)-(320 - z, 200 + y), col DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To (speed + 400) Next extreme Next slow Next joe6 Next pete6 Next peter col1 = col1 + &HE23456 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF 'draw the peace sign Dim dust As Single For dust = 1 To 120 Step 0.5 frmmoire.Circle (320, 240), dust, col1 Next dust For wind = -5 To 5 frmmoire.Circle (320, 240), 100 + wind, &H0 frmmoire.Line (320 + wind, 120)-(320 - wind, 360), &H0 frmmoire.Line (320, 240)-(240 - wind, 160 + wind), &H0 frmmoire.Line (320, 240)-(400 + wind, 160 + wind), &H0 Next wind circus = circus + 1 If circus > 5 Then circus = 1 col1 = col1 + &HE23456 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF For sideshow = 1 To 480 Step circus col1 = col1 + &H100203 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To (speed + 400) Next extreme Next slow frmmoire.Line (0, sideshow)-(sideshow, 480), col1 frmmoire.Line (640, 480 - sideshow)-(640 - sideshow, 0), col1 Next sideshow Next jorma 'pasted from kathydrawing For thyme = 25 To 1 Step -2 For pete = thyme To 1 Step -1 col1 = col1 + &HE23456 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF For joe = -pete To pete + 1 Step 1 c = c + &H10203 If c > &HFFFFFF Then c = c - &HFFFFFF w = w + 1 If w > pete Then w = joe z = z + joe - w If z > 300 Then z = -300 If z < -300 Then z = 300 'up-down counter for fred...it increases fred until a threshhold 'is reached then it decreases fred until another threshhold is 'reached then it increases fred... "a triangle wave oscillator" krsna = krsna + 1 If krsna > 4 Then krsna = 1 freddy = freddy + fredfa If freddy < -400 Then fredfa = krsna If freddy > 400 Then fredfa = -krsna susan = susan + suefa If susan > 450 Then suefa = -krsna If susan < -450 Then suefa = krsna 'calculate the endpoints of the lines 'We use x to represent horizontal distances 'increasing from left to right 'We use y to represent vertical distances 'increasing from bottom to top...Just like geometry class x = bob y = susan DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To speed Next extreme Next slow dada = -200 For dadaism = 0 To 65 Step 3 dada = dada + dadaism x = x + dada y = y - dada z = z - dada frmmoire.Line (320 - y, 240 - z)-(320 + x, 240 + z), c frmmoire.Line (320 + y, 240 + z)-(320 - x, 240 - z), c 'frmmoire.Line (320 - y, 240 - z)-(320 - x, 240 + y), c 'frmmoire.Line (320 + y, 240 + z)-(320 + x, 240 - y), c 'frmmoire.Line (320 + x, 240 + z)-(320 - x, 240 + y), c 'frmmoire.Line (320 - x, 240 - z)-(320 + x, 240 - y), c x = x + 2 z = z + 3 y = y + 5 frmmoire.Line (320 - y, 240 - z)-(320 + x, 240 + z), col1 frmmoire.Line (320 + y, 240 + z)-(320 - x, 240 - z), col1 'frmmoire.Line (320 - y, 240 - z)-(320 - x, 240 + y), col1 'frmmoire.Line (320 + y, 240 + z)-(320 + x, 240 - y), col1 'frmmoire.Line (320 + x, 240 + z)-(320 - x, 240 + y), col1 'frmmoire.Line (320 - x, 240 - z)-(320 + x, 240 - y), col1 x = x - 2 z = z - 3 y = y - 5 x = x - dada y = y + dada z = z + dada Next dadaism Next joe Next pete '...................................................... 'draw some circles to create a hexagon... testinga: ax = 320 ay = 240 For rangaroon = 4 To 1 Step -1 For hexagoon = 1 To 70 wx = wx + rangaroon If wx > 190 Then wx = -110 col2 = col2 + &H110203 If col2 > &HFFFFFF Then col2 = col2 - &HFFFFFF frmmoire.Circle (ax, ay), 120 + wx, col2 frmmoire.Circle (ax + 210, ay), 120 + wx, col2 frmmoire.Circle (ax - 210, ay), 120 + wx, col2 frmmoire.Circle (ax + 105, ay + 180), 120 + wx, col2 frmmoire.Circle (ax + 105, ay - 180), 120 + wx, col2 frmmoire.Circle (ax - 105, ay + 180), 120 + wx, col2 frmmoire.Circle (ax - 105, ay - 180), 120 + wx, col2 v = v + 1 If v > 5 Then v = -5 frmmoire.Circle (ax, ay), 100 + v, col1 frmmoire.Line (ax - v, ay - 100)-(ax + v, ay + 100), col1 frmmoire.Line (ax, ay)-(ax - 60 + v, ay - 87 - v), col1 frmmoire.Line (ax, ay)-(ax + 60 - v, ay - 87 - v), col1 col1 = col1 + &H80808 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To (speed + 400) Next extreme Next slow Next hexagoon Next rangaroon For doctor = 1 To 3 For freud = 1 To 300 DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To (speed + 400) Next extreme Next slow col1 = col1 + &H30201 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF frmmoire.Circle (ax, ay), 400 - freud, col1 Next freud Next doctor Next thyme For hey = 1 To 5 For achoo = 1 To 28 Step 1 col = col + &H12 If col > &HFFFFFF Then col = col - &HFFFFFF col1 = col1 + &H1200 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF col2 = col2 + &H120000 If col2 > &HFFFFFF Then col2 = col2 - &HFFFFFF z1 = z1 + 1 If z1 > 300 Then z1 = z1 - 600 z2 = z2 + 2 If z2 > 250 Then z2 = z2 - 500 z0 = z0 + 3 If z0 > 370 Then z0 = z0 - 740 z4 = z4 + 4 If z4 > 275 Then z4 = z4 - 550 frmmoire.DrawWidth = 1 For joe = 1 To achoo Step 1 DoEvents col = col + &H30102 If col > &HFFFFFF Then col = col - &HFFFFFF col1 = col1 + &H10203 If col1 > &HFFFFFF Then col1 = col1 - &HFFFFFF col2 = col2 + &H13 If col2 > &HFFFFFF Then col2 = col2 - &HFFFFFF col3 = &HFFFFFF - col2 sue = sue + suef If sue > 198 Then suef = -1 If sue < 2 Then suef = 1 fred = fred + fredf If fred > 250 Then fredf = -1 If fred < 2 Then fredf = 1 DoEvents speed = Val(txtspeed.Text) For slow = 1 To speed For extreme = 1 To speed Next extreme Next slow frmmoire.Circle (320 + z0, 240 + z1), fred + 2, col1 frmmoire.Circle (320 + z4, 240 + z2), sue, col frmmoire.Circle (320 - z0, 240 - z1), fred + 2, col1 frmmoire.Circle (320 - z4, 240 - z2), sue, col z1 = z1 + 15 z2 = z2 + 27 z0 = z0 + 8 z4 = z4 + 5 frmmoire.Circle (320 + z0, 240 + z1), fred, col2 frmmoire.Circle (320 + z4, 240 + z2), sue + 2, col3 frmmoire.Circle (320 - z0, 240 - z1), fred, col2 frmmoire.Circle (320 - z4, 240 - z2), sue + 2, col3 z0 = z0 - 8 z4 = z4 - 5 z1 = z1 - 15 z2 = z2 - 27 GoTo el frmmoire.Circle (320 + z4, 240 + z0), 252 - fred, col2 frmmoire.Circle (320 + z2, 240 + z1), 202 - sue, col3 frmmoire.Circle (320 - z4, 240 - z0), 252 - fred, col2 frmmoire.Circle (320 - z2, 240 - z1), 202 - sue, col3 z0 = z0 - achoo z4 = z4 - achoo z1 = z1 - 15 z2 = z2 - 27 + achoo frmmoire.Circle (320 + z4, 240 + z0), 255 - fred, col1 frmmoire.Circle (320 + z2, 240 + z1), 200 - sue, col frmmoire.Circle (320 - z4, 240 - z0), 255 - fred, col1 frmmoire.Circle (320 - z2, 240 - z1), 200 - sue, col z1 = z1 + 15 z2 = z2 + 27 - achoo z0 = z0 + achoo z4 = z4 + achoo el: Next joe Next achoo Next hey Next endless Next forever End Sub Private Sub cmdQuit_Click() Unload frmmoire End End Sub