Road Signs, Hard

From Progzoo
Jump to navigation Jump to search

Each of these road signs is worth 20 points.


  • Based on work by ASHLEY HAZLE

Ashley's original version includes a 16 point polygon painted 6 times. This variation paints half that polygon 12 times.


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


  • Solution based on Kevin Smith's solution.

You can calculate the width of the text using the stringWidth method of the FontMetrics class. You can use this figure to calculate where to place text that should be in the centre.


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

Diversion Northtown

Notice how the black border is curved inside and out.


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

Swing Bridge

Making a wavy line is hard work. The cosine function can be used to set up the coordinate array. The drawPolyline function only works with integers which will result in a "lumpy" wave usless you "scale up" as we do here with sf.


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

Turpin's Crossing

This model answer was provided by Stuart Blows

You are not asked to do this because it is easy.

You are asked to do it because it is hard.


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