Home /  Sketchbook /  p5.js - Nautical Flags - Part 2
  • Info

Overview

This is a p5.js sketch that allows you to type a message using the International Maritime Signal Flag and share the URL to the message with a friend.

Controls

  • Keyboard:
    • [ Will save the canvas as a PNG to your computer.
    • A - Z By themselves will show the flag for that letter.
    • 0 - 9 By themselves will show the flag for that number.
    • SHIFT + 0-9 Will show the NATO variant of the number.
    • CTRL + 1-4 Will show the Substitute flags, 1 -4, when you don’t have enough flags of one letter.
    • . Will show the CODE flag, also known as the ‘Answering Pennant’, used to start a response to request or as a decimal point.
    • CTRL + Two-Char code for special flags.
      • FL For Flotilla.
      • SQ For Squadron.
      • DI For Division.
      • SU For Subdivision.
      • PR For Preparative.
      • IN For Interrogative.
      • NE For Negative.
      • SC For Screen.
      • FO For Formation.
      • CO For Corpen (Course Pennant)
      • TU For Turn.
      • SB For Starboard.
      • PO For Port.
      • SP For Speed.
      • ST For Station.
      • EM For Emergency.
      • DE For Designation.

References

Multiple sources were used in determining proportions of the flags.

  • Flag Shapes and Meanings:
    • Wikipedia: International maritime signal flags
    • mainharbors.com (circular dots on Pennants 1 and 2)
    • US Navy Signal Flags (elliptical dots on Pennants 1 and 2)
  • Other:
    • Wikipedia: Int’l Code of Signals - Shows how combinations of flags can have specific meanings.
    • Wikipedia: Racing Rules - How these flags may be used in the context of Sailing races.
    • Semaphore Flag Signaling - How other signal flags are used with a signaler holding two of the same flags in their two arms in different patterns to convey the alphabet and other signals.
    • Special NATO flags - Includes details of secondary flags used by NATO in regards to maneuvering.
    • International Flags - Another visual reference.

Links:

  • Live View
  • Source on Github

Screenshots:

Example Message:

screenshot screenshot

All Flags

screenshot screenshot