Microsoft Small Basic

Program Listing:
Embed this in your website
x = 10
y = 320
GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.SetPixel(320, x, "White")


While x<300

  x = x + 1
  spread = spread + 1

  For div = -spread To spread

    If (GraphicsWindow.GetPixel(320 - 1 + div, x - 1) = "#000000") Then
      '[X][?][?]
      If (GraphicsWindow.GetPixel(320 + div, x - 1) = "#000000") Then
        '[X][X][?]
        If(GraphicsWindow.GetPixel(320 + 1 + div, x - 1) = "#000000") Then
          '[X][X][X]
          GraphicsWindow.SetPixel(320 + div, x, "Black")
        Else
          '[X][X][ ]
          GraphicsWindow.SetPixel(320 + div, x, "White")
        EndIf
      Else
        '[X][ ][?]
        If (GraphicsWindow.GetPixel(320 + 1 + div, x - 1) = "#000000") Then
          '[X][ ][X]
          GraphicsWindow.SetPixel(320 + div, x, "Black")
        Else
          '[X][ ][ ]
          GraphicsWindow.SetPixel(320 + div, x, "Black")
        EndIf
      EndIf
    Else
      '[ ][?][?]
      If (GraphicsWindow.GetPixel(320 + div, x - 1) = "#000000") Then
        '[ ][X][?]
        If(GraphicsWindow.GetPixel(320 + 1 + div, x - 1) = "#000000") Then
          '[ ][X][X]
          GraphicsWindow.SetPixel(320 + div, x, "White")
        Else
          '[ ][X][ ]
          GraphicsWindow.SetPixel(320 + div, x, "Black")
        EndIf
      Else
        '[ ][ ][?]
        If (GraphicsWindow.GetPixel(320 + 1 + div, x - 1) = "#000000") Then
          '[ ][ ][X]
          GraphicsWindow.SetPixel(320 + div, x, "White")
        Else
          '[ ][ ][ ]
          GraphicsWindow.SetPixel(320 + div, x, "Black")
        EndIf
      EndIf
    EndIf

    'Interesting results:
    'BWBBWBWB
    'BWWBWBWB

  EndFor

EndWhile

Copyright (c) Microsoft Corporation. All rights reserved.