home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD71056242000.psc / vector.frm (.txt) next >
Encoding:
Visual Basic Form  |  2000-06-24  |  2.9 KB  |  109 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Vectors"
  6.    ClientHeight    =   11805
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   11265
  10.    ForeColor       =   &H00000000&
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    ScaleHeight     =   11805
  14.    ScaleWidth      =   11265
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin VB.Timer Timer1 
  18.       Interval        =   1000
  19.       Left            =   2280
  20.       Top             =   1920
  21.    End
  22.    Begin VB.PictureBox Display 
  23.       BackColor       =   &H00000000&
  24.       BorderStyle     =   0  'None
  25.       Height          =   9015
  26.       Left            =   600
  27.       ScaleHeight     =   601
  28.       ScaleMode       =   3  'Pixel
  29.       ScaleWidth      =   593
  30.       TabIndex        =   0
  31.       Top             =   480
  32.       Width           =   8895
  33.    End
  34.    Begin VB.PictureBox Buffer 
  35.       AutoRedraw      =   -1  'True
  36.       BackColor       =   &H00000000&
  37.       BorderStyle     =   0  'None
  38.       FillColor       =   &H00C0FFC0&
  39.       FillStyle       =   0  'Solid
  40.       ForeColor       =   &H00000000&
  41.       Height          =   8175
  42.       Left            =   360
  43.       ScaleHeight     =   545
  44.       ScaleMode       =   3  'Pixel
  45.       ScaleWidth      =   745
  46.       TabIndex        =   1
  47.       Top             =   360
  48.       Visible         =   0   'False
  49.       Width           =   11175
  50.    End
  51. Attribute VB_Name = "Form1"
  52. Attribute VB_GlobalNameSpace = False
  53. Attribute VB_Creatable = False
  54. Attribute VB_PredeclaredId = True
  55. Attribute VB_Exposed = False
  56. Public SelectX, SelectY, Going, G, FPS
  57. Private Sub Display_Click()
  58. Cursor True
  59. End Sub
  60. Private Sub Form_Click()
  61. Cursor True
  62. End Sub
  63. Private Sub Form_Load()
  64. Form1.Left = 0
  65. Form1.Top = 0
  66. Form1.Width = Screen.Width
  67. Form1.Height = Screen.Height
  68. Display.Left = (Screen.Width - Display.Width) / 2
  69. Display.Top = (Screen.Height - Display.Height) / 2
  70. Form1.ForeColor = RGB(255, 255, 255)
  71. Cursor False
  72. R1 = 255
  73. G1 = 255
  74. B1 = 0
  75. R2 = 255
  76. G2 = 0
  77. B2 = 0
  78. Display.AutoRedraw = True
  79. SetWave
  80. DrawFrame
  81. DoEvents
  82. Display.AutoRedraw = False
  83. Form1.Visible = True
  84. DoEvents
  85. RotateVecs Sin(G / 4) * 8, Sin(G) + 1, 1
  86. TotZ = 60
  87. DrawFrameB 'DrawPic '
  88. G = G + 0.5
  89. R1 = (Sin(G / 6) * 128 + 128)
  90. G1 = 0
  91. B1 = (Cos(G / 4) * 128 + 128)
  92. R2 = (Sin(G / 2) * 128 + 128)
  93. G2 = (Cos(G / 2) * 128 + 128)
  94. B2 = 0
  95. For i = -9 To 10
  96. For X = -9 To 10
  97.     vector(i + 10, X + 10).X = (Sin(G + Sqr((vector(i + 10, X + 10).X ^ 2) + (vector(i + 10, X + 10).Y ^ 2) + (vector(i + 10, X + 10).Z ^ 2)) / 20) * 30) 'Sin((G / 20)) + G) * 50
  98.     vector(i + 10, X + 10).Y = i * 15
  99.     vector(i + 10, X + 10).Z = X * 15
  100. Next X
  101. Next i
  102. FPS = FPS + 1
  103. Cursor True
  104. End Sub
  105. Private Sub Timer1_Timer()
  106. Print "Grid Morph - FPS: " & FPS & " - Time: " & Time
  107. FPS = 0
  108. End Sub
  109.