TactivergeLite

Lite / Building Machines That Respond / Week 29

sin, cos and tan are just ratios

A 10 cm robot link tilted at 30° lifts its tip 5 cm. Make the link twice as long at the same angle. How high does the tip go?

About 35 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

Every robot arm, crane, ramp and camera tilt involves a length at an angle. Trigonometry is the tool that turns 'this long, at this angle' into 'this far across and this far up', and every robot controller does it thousands of times a second.

Predict

A 10 cm link at 30° lifts its tip 5 cm. A 20 cm link at the same 30° lifts its tip…

  1. 5 cm, the angle is the same
  2. 10 cm
  3. 20 cm
  4. It depends on the motor
Guess first, then reveal

10 cm. The two links make similar triangles, so every side doubles. The ratio height ÷ length stays 5 ÷ 10 = 0.5 for any link at 30°. That fixed ratio has a name: sin 30° = 0.5.

Discover

Fix the angle at 30° and slide the link length from 5 to 30 cm: the sides change, the three ratios don't. Then try the shelf challenges: predict the angle with sin θ = height ÷ length before you slide.

What the interactive shows (text version)

The diagram draws a robot link from a shoulder joint at an angle you set, with a dashed horizontal line (adjacent side) and a dashed vertical line (opposite side) making a right-angled triangle. Sliders set the link length and the angle. A table shows sin θ = opposite ÷ hypotenuse, cos θ = adjacent ÷ hypotenuse and tan θ = opposite ÷ adjacent with the current numbers; changing the length changes the sides but not the ratios.

You can also open the interactive on the full site when you have a faster connection.

Watch (optional)

Watch for: Watch for the key move: every right triangle with the same angle is similar, so its side ratios are the same, so they deserve names.

Explains why sin, cos and tan are well-defined: every right triangle with the same angle has the same side ratios.

“Similarity to define sine, cosine, and tangent | Basic trigonometry | Trigonometry | Khan Academy” by Khan Academy (opens YouTube; streaming video uses a lot of data)

The video is optional. Everything you need is in this lesson's text.

Understand

Label the sides first

Mark the angle θ you care about. The hypotenuse is the longest side, opposite the right angle (for a robot link, the link itself). The opposite side is across from θ. The adjacent side is next to θ but isn't the hypotenuse. Mislabelled sides cause most trig mistakes.

Three ratios, one angle

sin θ = opposite ÷ hypotenuse, cos θ = adjacent ÷ hypotenuse and tan θ = opposite ÷ adjacent. Because the hypotenuse is the longest side, sin and cos are never bigger than 1. Some to remember: sin 30° = 0.5, cos 60° = 0.5, tan 45° = 1, sin 90° = 1.

From ratios to robot parts

Rearrange: a link of length L at angle θ reaches L · cos θ across and L · sin θ up. A 12 cm link at 30° lifts its tip 12 × 0.5 = 6 cm. Your calculator must be in degrees for these; next lesson you will meet radians, which most code uses.

Explain it another way

Intuitive

Lean a ladder against a wall. The steeper the angle, the higher it reaches and the closer its foot is to the wall. sin and cos tell you exactly what fraction of the ladder's length goes 'up' and 'across'.

Technical

For a right triangle with hypotenuse h, sin θ = o/h, cos θ = a/h, tan θ = o/a = sin θ / cos θ, and sin²θ + cos²θ = 1 (Pythagoras divided by h²).

Mathematical

A 20 cm link at 35°: up = 20 sin 35° ≈ 20 × 0.574 = 11.5 cm, across = 20 cos 35° ≈ 20 × 0.819 = 16.4 cm. Check: 11.5² + 16.4² ≈ 400 = 20².

Applied

Robot arms report joint angles from encoders; the controller multiplies link lengths by sin and cos to work out where the hand is before every move.

Derivation: Why each angle has its own ratios
  1. Take any right-angled triangle with an angle θ. Its three angles are θ, 90° and 90° − θ.

  2. Any other right-angled triangle with the same θ has the same three angles, so the two triangles are similar.

  3. In similar triangles every side is scaled by the same k, so a ratio like opposite ÷ hypotenuse cancels k out: (k·o) ÷ (k·h) = o ÷ h.

  4. So the ratio depends only on θ. We name them: sin θ = opposite ÷ hypotenuse, cos θ = adjacent ÷ hypotenuse, tan θ = opposite ÷ adjacent (SOH CAH TOA).

  5. Rearranged for a link of length L: vertical part = L · sin θ, horizontal part = L · cos θ.

Worked example 1

A 15 cm link points 60° above horizontal. How high is its tip above the joint?

Up = L sin θ = 15 × sin 60° ≈ 15 × 0.866 ≈ 13.0 cm.

Worked example 2

A ramp rises 1 m over 4 m across. What is tan of its angle?

tan θ = opposite ÷ adjacent = 1 ÷ 4 = 0.25. (The angle itself is about 14°: you'll find it with tan⁻¹ next lesson.)

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. A robot link is tilted at angle θ above the horizontal. Relative to θ, which side is the vertical drop from the tip down to the horizontal line?

cm

cm

Practice 5. A classmate's calculation gives sin θ = 1.3 for a robot link. What does that tell you?

Apply it

In the trig ratio diagram, find the angle that puts a 20 cm link's tip on the 18 cm shelf. Predict it first with sin θ = 18 ÷ 20, then check by sliding. Explain why a 15 cm link can never reach that shelf.

Reflect

Write SOH CAH TOA in your own words, without the letters.

Write your answer on paper or in your own notes. Lite never stores what you write.

← How heavy is that bracket? Area, volume and massAngles in, positions out (and back again) →