Freigeben über


Featured Article - Small Basic: How to Rotate a Shape Not from the Center

We recently featured this Small Basic article on the home page of TechNet Wiki. It's the Small Basic Guru gold medal winner for October!

 

Small Basic: How to Rotate a Shape Not from the Center

By Nonki Takahashi
December 8, 2013

This article shows how to rotate a shape not from it's center in Small Basic programming language.  Because Shapes.Rotate() rotates a shape from the center of the shape. This is a simple analog stop watch which have a second hand.  This second hand is a rectangle. This rectangle is rotated not from it's center. In line 24, this rectangle is rotated.  But after that...

Excerpt:

So, the most important part is from which point you should move the rectangle.  The following picture shows the rectangle before rotation.

If you'd like to rotate this rectangle from the rotation center (the red point), you should move this rectangle as following, using the green arrow.

 

Read the rest here:

 

Small Basic: How to Rotate a Shape Not from the Center

 

Special thanks to Nonki and for this great contribution!

   - Ninja Ed

Comments

  • Anonymous
    December 16, 2013
    Nonki has had the most Small Basic Guru medals in the competitions over the last 6 months or so!