Plumb Bob

The plumb bob always hangs straight down from the center of the PlumbView. Since we can’t tilt the emulators, I took this screenshot on on my Azpen A727 tablet (a pathetic 800 × 480 pixels).

In Trigonometry, angles start at 3 o’clock and go counterclockwise. Thus
3 o’clock is 0° (to the right)
2 o’clock is 30°
1 o’clock is 60°
12 o’clock is 90° (straight up)
etc.
tan 60° = √3 ≈ 8.580819/4.903325
In other words,
arctan 60° ≈ 8.580819/4.903325
The plumb bob hangs in exactly the opposite direction, 7 o’clock.

Source code in Plumb.zip

  1. MainActivity.java.
  2. PlumbView.java.
  3. activity_main.xml: unused and ignored.
  4. strings.xml.
  5. AndroidManifest.xml.
  6. build.gradle (Module: app).

Things to try

  1. Draw a protractor circle around the center of the PlumbView marked off at 15° intervals.