I Made Krisna's Times My Way to Write the Times

10Nov/100

Rounding Shapes SmallBasic Source Code

Hmm... there are some new programming language from Microsoft again, SmallBasic, i think it like be small edition of Visual Basic because the error checking or debugging use Visual Basic style. Okay this post is my sparetime work, i will put number of a shapes to create some circle-like shape. Start from line, triangle, square, until nearly-circle shape and look what the shapes looks like. Beautiful.

size = 250
Turtle.Speed = 10

For sides = 2 To 10
  For blocks = 2 To 10
    DrawShapes()
    Program.Delay(2000)
  EndFor
EndFor
GraphicsWindow.DrawText(400, 10, "End of Program!")

Sub DrawShapes
  GraphicsWindow.Clear()
  GraphicsWindow.DrawText(10,10, "Sides    : " + sides + " of 10")
  GraphicsWindow.DrawText(10,30, "Blocks  : " + blocks + " of 10")
  GraphicsWindow.DrawText(10,400, "Created By : I Made Krisna W ~ http://times.imkrisna.com")

  Turtle.PenUp()
  Turtle.MoveTo(300,200)
  Turtle.Angle = 0
  Turtle.PenDown()
  For i=1 To blocks
    For j=1 To sides
      Turtle.Move(Math.Round(size / sides))
      Turtle.Turn(Math.Round(360 / sides))
    EndFor
    Turtle.Turn(Math.Round(360 / blocks))
  EndFor
EndSub

Related posts:

  1. Draw a “stdio” Square Shape C Source Code
  2. Draw a “stdio” BL Right-Angled Triangle C Source Code
  3. Matrix-Vector Multiplication MPI C Source Code
  4. DataGridView DataSource C# Source Code
  5. Hello World MPI C Source Code
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.