Road Signs, Medium

From Progzoo
Revision as of 21:00, 1 October 2011 by Andr3w (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Each of these road signs is worth 14 points.

Countdown 3

Roadcountdown3.png
  • Solution from Andrew

Notice that the rectangles are drawn from the centre and that the same sequence is used countDown times.

You can use a combination of translate and rotate to put the rectangles in place.

Of course you can change the value of countDown to 1 or 2 or 3.

  • The blue rectangle is 130 by 230
  • The white rectangles are 116 by 20
  • The white rectangles are at an angle of 0.502 radians.
  • The white rectangles are 50 apart vertically.


[Font] [Default] [Show] [Resize] [History] [Profile]

Lane Closure

Roadlaneclosure.png

  • Solution by Andrew

Notice that we re-use the code for the arrow and the T by creating a method.

Try to avoid repeating code - you can use variables or methods to repeat a shape.


[Font] [Default] [Show] [Resize] [History] [Profile]

No Traffic Lights

Roadnotrafficlights.png

  • By Andrew

Notice that we pass as parameters the things that are different about the three disks. The disks are identical apart from the color and the position and so we pass color and x,y as parameters.

No traffic lights.


[Font] [Default] [Show] [Resize] [History] [Profile]

Level Crossing

Roadlevelcrossing.png


[Font] [Default] [Show] [Resize] [History] [Profile]

Level Crossing without Barrier

Define a hexagon and fill it twice - at different angles. Then fill two white rectangles on top.

Roadlevelcrossing3.png


[Font] [Default] [Show] [Resize] [History] [Profile]