jueves, 12 de marzo de 2020

Programas de prueba

Programas de prueba

FORMAS DIVERTIDAS: 

RECTANGALORE:


GraphicsWindow.BackgroundColor = "Black" GraphicsWindow.PenColor = "LightBlue" GraphicsWindow.Width = 200
GraphicsWindow.Height = 200
For i = 1 To 100 Step 5
GraphicsWindow.DrawRectangle(100 - i, 100 - i, i * 2, i * 2) EndFor







ESPECTACULAR:

GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.PenColor = "LightGreen"
GraphicsWindow.Width = 200
GraphicsWindow.Height = 200
For i = 1 To 100 Step 5
  GraphicsWindow.DrawEllipse(100 - i, 100 - i, i * 2, i * 2)
EndFor







ALEATORIOS:
GraphicsWindow.BackgroundColor = "Black"
For i = 1 To 1000
GraphicsWindow.BrushColor = GraphicsWindow.GetRandomColor()
x = Math.GetRandomNumber(640)
y = Math.GetRandomNumber(480)
GraphicsWindow.FillEllipse(x, y, 10, 10)
EndFor





FRACTALES:



GraphicsWindow.BackgroundColor = "Black"
x = 100
y = 100
For i = 1 To 100000
  r = Math.GetRandomNumber(3)
  ux = 150
  uy = 30
If (r = 1) then
  ux = 30
  uy = 1000
EndIf
If (r = 2) Then
  ux = 1000
  uy = 1000
EndIf
x = (x + ux) / 2
y = (y + uy) / 2
GraphicsWindow.SetPixel(x, y, "LightGreen")
EndFor

No hay comentarios:

Publicar un comentario