Monday, March 18, 2013

Lesson #2 - The Stationary Square

This lesson focuses on drawing a stationary red square.  

Main concepts:
  • Colors are set by a three number tuple (red, green, blue).  Each value ranges from 0 to 255
  • Each point on the phone screen has two numbers associated with it, the x and the y coordinate.  A single point is a pixel.  The phone screen is 480 pixels wide and 320 pixels high.
  • The rectangle is initially set by the upper left corner.  The example uses (0, 0).
  • The width and height of the rectangle are measured in pixels, 64 pixels wide and 64 pixels tall.

Bonus concepts:
  • Graphics such as a cartoon girl are loaded with image.load("filename");
  • The graphic is displayed on the phone screen with blit;
  • The position of the graphic on the screen is established with a rectangle.


  1. This comment has been removed by a blog administrator.

  2. Amazing looks like technology has no ends, its growing growing and still growing rapidly. Applications are important part for all these mobiles.

    iphone programming