Chapter 05

Trigonometry

Trigonometry is the branch of mathematics that relates angles to lengths. It’s used every day in the workshop, even when you don’t call it by name: to find the height of a tilted plane, the angle of a ramp, the length of a drill bit, the coordinates of holes in a flange, or the distance between two holes in a circle. In this chapter, we’ll derive sine, cosine, and tangent starting from a circle, learn how to use them in right triangles and general triangles, and conclude with the polar coordinates used in CNC machines.

5.1 Angles: Degrees and Radians

An angle is the portion of a plane bounded by two rays that originate from the same point, the vertex. In Chapter 2, we learned about the two units used to measure angles: the degree (a full circle is 360°) and the radian (a full circle is 2π rad). Here we need one more thing: in trigonometry, angles have a direction. They are measured starting from the positive x-axis and are positive when measured counterclockwise and negative when measured clockwise. Thus, −90° and 270° point in the same direction, and an angle can even exceed a full circle: 400° is one full circle plus 40°.

It's the same convention used in numerical control: on the XY plane of a milling machine (G17), the 0° angle corresponds to the X+ direction, 90° corresponds to Y+, and the angles increase as you move from X+ toward Y+.

Degrees and radians
rad = degrees · π180 degrees = rad · 180π
π = 3.14159 × 1 rad = 57.296° × 1° = 0.017453 rad. Angles you should learn right away: 30° = π/6, 45° = π/4, 60° = π/3, 90° = π/2, 180° = π, 360° = 2π.
Example 5.1 · Conversions and a Classic Error
135° = 135 × 3.14159 / 180 = 2.3562 rad (i.e., 3π/4)
0.8 rad = 0.8 × 180 / 3.14159 = 45.837°

The calculator calculates up to 30°. In DEG mode, it displays 0.5. If the calculator is still in RAD mode, it reads “30 radians” and displays:

sin(30 rad) = −0.988
2.3562 rad · 45.837° · a negative sine for an angle of 30° means the method is incorrect

5.2 The goniometric circle

To define the sine and cosine of any angle—including obtuse or negative angles—we use a circle of radius 1 centered at the origin of the coordinate axes: the trigonometric circle. A ray is drawn from the origin, inclined by an angle α relative to the x-axis; the point where it intersects the circle is point P.

  • The cosine of α is the x-coordinate of P (how far P is to the right or left of the center);
  • The arc length of α is the ordinate of P (how far P is above or below the center);
  • The tangent to α is the y-coordinate of point T, where the extended ray intersects the vertical line x = 1.
xyαPTsin αcos αtan α11−11−1Radius 1, center at the origin.α is measured from the x-axis,positive in the counterclockwise direction.cos α = the x-coordinate of Psin α = the y-coordinate of Ptan α = the y-coordinate of T(T lies on the tangent line at x = 1)
Figure 5.1 · The trigonometric circle, drawn with α = 35°. The green segment represents the cosine, the light blue segment the sine, and the red segment the tangent.

Two things are immediately apparent from the figure. Since P lies on a circle of radius 1, the sine and cosine are always between −1 and +1. The tangent, on the other hand, can be as large as you like: as α approaches 90°, the ray becomes almost vertical and intersects the line x = 1 at an increasingly higher point; at exactly 90°, it no longer intersects the line, and the tangent does not exist.

5.3 Sine, Cosine, and Tangent in a Right Triangle

In the goniometric circle, the radius OP, its projection onto the x-axis, and the vertical segment form a right triangle with a hypotenuse of length 1. If the triangle is larger, all sides increase in the same proportion (the triangles are similar, Chapter 3), so the ratios between the sides remain the same. This leads to the definitions used in the workshop, which apply to the acute angles of any right triangle.

αβb · side adjacent to αa · the side adjacent to αc · hypotenusesin α = a / ccos α = b / ctan α = a / b
Figure 5.2 · The side opposite α is the one that does not touch the vertex of α; the adjacent side is the one that does touch it. The hypotenuse is always opposite the right angle.
Sine, cosine, and tangent of an acute angle
sin α = opposite leghypotenuse = ac since α = adjacent sidehypotenuse = bc
tan α = opposite legadjacent side = ab = sin αsince α α + β = 90°
a: the opposite side of α · b: the adjacent side of α · c: the hypotenuse, all in the same unit (mm) · α, β: acute angles in degrees. Sine, cosine, and tangent are pure numbers, without units. Since α and β are complementary, sin α = cos β and cos α = sin β.
Example 5.2 · A 30-40-50 triangle

A right-angled sheet metal triangle has legs measuring 30 mm and 40 mm and a hypotenuse of 50 mm. α is the angle opposite the 30 mm leg.

sin α = 30 / 50 = 0.6 · cos α = 40 / 50 = 0.8 · tan α = 30 / 40 = 0.75
Check: sin α / cos α = 0.6 / 0.8 = 0.75 ✓
α = arcsin 0.6 = 36.87° (the sin⁻¹ key, Section 5.8) → β = 90° − 36.87° = 53.13°
sin α = 0.6 · cos α = 0.8 · tan α = 0.75 · α = 36.87° · β = 53.13°

5.4 The Fundamental Relationship

On the unit circle, point P has coordinates (cos α; sin α) and is 1 unit away from the center. The Pythagorean theorem (Chapter 3), applied to the triangle formed by O, P, and the foot of the arc at P, yields the most important formula in trigonometry, which holds for any angle:

Key Report
sin² α + cos² α = 1
since α = ± √(1 − sin² α) sin α = ± √(1 − cos² α) tan α = sin αsince α
sin² α means (sin α)², the sine raised to the second power. The ± sign is chosen based on which quadrant the angle lies in (Section 5.6).
Example 5.3 · From Sine to Cosine

For an angle α, we know that sin α = 0.6 and that it is an obtuse angle (between 90° and 180°). Find cos α, tan α, and α.

cos² α = 1 − 0.6² = 1 − 0.36 = 0.64 → cos α = ± 0.8
In the second quadrant, the cosine is negative → cos α = −0.8
tan α = 0.6 / (−0.8) = −0.75
arcsin 0.6 = 36.87° is the acute angle with the same sine → α = 180° − 36.87° = 143.13°
since α = −0.8 · tan α = −0.75 · α = 143.13°

5.5 Notable Values

For some angles, sine and cosine can be determined without a calculator, using two triangles that every technician has on their workbench: the 45° set square is half a square, and the 30° and 60° set square is half an equilateral triangle. Using the Pythagorean theorem, you can find the missing sides, and the ratios give the exact values.

11√245°45°half of a square with a side length of 1√31230°60°half of an equilateral triangle with a side length of 2sin 30° = 1/2cos 30° = √3/2tan 30° = 1/√3sin 45° = 1/√2tan 45° = 1
Figure 5.3 · In a square with side length 1, the diagonal is √2. In an equilateral triangle with side length 2, the height divides the base into two equal parts of 1 and is √(4 − 1) = √3.
CornerRadiantsincostan
0°0010
30°π/61/2 = 0,5√3/2 = 0,8660√3/3 = 0,5774
45°π/4√2/2 = 0,7071√2/2 = 0,70711
60°π/3√3/2 = 0,86601/2 = 0,5√3 = 1,7321
90°π/210does not exist
💡
A mnemonic to help you remember them. The sine values for 0°, 30°, 45°, 60°, and 90° are √0/2, √1/2, √2/2, √3/2, and √4/2: just count 0, 1, 2, 3 under the square root, 4. The cosines are the same numbers read backward. They’re also great for checking your calculator: if sin 30 doesn’t equal 0.5, the mode is wrong.

5.6 The signs in the four quadrants and their associated angles

The axes divide the plane into four quadrants, numbered counterclockwise starting from the top right. Since the cosine is the x-coordinate of P and the sine is its y-coordinate, the signs can be determined directly from the position of P: to the left of the y-axis, the cosine is negative; below the x-axis, the sine is negative. The tangent, which is the ratio of the two, is positive when they have the same sign.

α180° − α180° + α360° − αIIIIIIIVII · from 90° to 180°sin + cos − tan −I · from 0° to 90°sin + cos + tan +III · from 180° to 270°sin − cos − tan +IV · from 270° to 360°sin − cos + tan −Same sine: α and 180° − α(points at the same height)Same cosine: α and 360° − α(points on the same vertical line)α and 180° + α: opposite points,sine and cosine change sign
Figure 5.4 · Signs in the four quadrants. The points at α = 30°, 150°, 210°, and 330° are symmetric: their sine and cosine values are equal, differing only in sign.

The symmetries of the figure allow any angle to be transformed into an acute angle—the one we are familiar with. These are called associated angles:

Related Angles
sin(180° − α) = sin α cos(180° − α) = −cos α tan(180° − α) = −tan α
sin(180° + α) = −sin α cos(180° + α) = −cos α tan(180° + α) = tan α
sin(360° − α) = −sin α cos(360° − α) = cos α tan(360° − α) = −tan α
360° − α is the same direction as −α, so sin(−α) = −sin α and cos(−α) = cos α. Adding or subtracting a full circle (360°) doesn't change anything: sin 400° = sin 40°.
Example 5.4 · Large Angles Reduced to Notable Angles
sin 150° = sin(180° − 30°) = sin 30° = 0.5
cos 210° = cos(180° + 30°) = −cos 30° = −0.8660
tan 300° = tan(360° − 60°) = −tan 60° = −1.7321
sin 225° = sin(180° + 45°) = −sin 45° = −0.7071
0.5 · −0.8660 · −1.7321 · −0.7071 (the calculator gives the same values)

5.7 The Sine and Cosine Graphs

If you rotate P around the goniometric circle and draw the sine (its height) as a function of the angle, you get a wave: the sine wave. The cosine yields the same wave shifted back by 90°. Both repeat identically with each rotation: they are periodic functions with a period of 360° (2π).

10−190°π/2180°π270°3π/2360°2πxy = sin xy = cos x
Figure 5.5 · Sine (red) and cosine (blue) from 0° to 360°. The two waves have the same shape: the cosine reaches its peak 90° before the sine.
  • The sine is 0 at 0°, 180°, and 360°; it is maximum (+1) at 90° and minimum (−1) at 270°;
  • The cosine is +1 at 0° and 360°, −1 at 180°, and zero at 90° and 270°;
  • The tangent function does not have a waveform like that: it ranges from −∞ to +∞ and repeats every 180°, with a jump at 90° and 270°, where it does not exist.

Sine waves aren’t just something you see in school drawings. The voltage of the electrical grid is a 50-Hz sine wave (Chapter 44); the position of a point on the edge of a rotating workpiece, viewed from the side, rises and falls in proportion to the sine of the angle; the signals from an incremental encoder (Chapter 47) are two sine waves phase-shifted by 90°, just like sine and cosine, and by comparing them, the controller determines the direction of rotation.

5.8 Inverse Functions and the Quadrant Problem

Often the problem is the other way around: you know the sides and are looking for the angle. You need the inverse functions, which on a calculator are the sin⁻¹, cos⁻¹, and tan⁻¹ keys (usually with SHIFT or 2nd). The ⁻¹ here doesn’t mean “one divided by”: it means “the angle with this sine value.”

Inverse Functions
α = arcsin x ⇔ sin α = x α = arccos x ⇔ cos α = x α = arctan x ⇔ tan α = x
arcsin and arccos exist only for x between −1 and +1 (otherwise, the calculator returns an error: this indicates that one side was used instead of the other). Calculator results: arcsin between −90° and +90°, arccos between 0° and 180°, arctan between −90° and +90°.

Those result ranges are the tricky part. An equation like sin α = 0.5 has two solutions in one rotation—30° and 150°—but the calculator gives only one. With the tangent function, the problem is more serious, and it arises when finding the angle of a point with coordinates (x; y): the angle is arctan(y/x), but the ratio y/x loses its sign. The points (−30; 40) and (30; −40) have the same ratio, and the calculator gives the same angle for both.

xyP (−30; 40)(30; −40)126.87°−53.13°−3040The two points have the samey/x ratio of −1.333.The tan⁻¹ key gives −53.13°for both: correct onlyfor the point (30; −40).For P, the true angle is−53.13° + 180° = 126.87°
Figure 5.6 · The quadrant problem: arctan(y/x) does not distinguish a point from its opposite. You must consider the sign of x.
Angle of a point (x; y), quadrant correction
if x > 0: θ = arctan yx if x < 0: θ = arctan yx + 180°
If x = 0: θ = 90° (positive y) or 270° (negative y); if θ is negative and you want it to be between 0° and 360°: +360°
In programming languages and spreadsheets, the atan2(y; x) function automatically performs this correction; it takes x and y as separate arguments and returns the corresponding angle between −180° and +180°. Many scientific calculators have a Pol( function (from Cartesian to polar coordinates) that does the same thing.
Example 5.5 · The Angle Between Two Points

Find the distance from the origin and the angle of the points P(−30, 40) and Q(−30, −40).

distance: √(30² + 40²) = √2500 = 50 for both
P: arctan(40 / −30) = arctan(−1.3333) = −53.13°; x < 0 → θ = −53.13° + 180° = 126.87°
Q: arctan(−40 / −30) = arctan(1.3333) = 53.13°; x < 0 → θ = 53.13° + 180° = 233.13°
Using atan2: atan2(40; −30) = 126.87° · atan2(−40; −30) = −126.87° = 233.13° − 360° ✓
P at 126.87° (second quadrant) · Q at 233.13° (third quadrant)
⚠️
Pay attention to the order in Excel. In almost all programming languages, you write atan2(y, x), with y first. In an Excel spreadsheet, however, the ARCTAN.2 function requires x first and y second, and returns radians: to get degrees, write =DEGREES(ARCTAN.2(x; y)). Switching the order gives the complementary angle—an error that goes unnoticed until the workpiece has holes drilled in it.

5.9 The Calculator: DEG, RAD, and GRAD

Scientific calculators have three angle modes, which are indicated in small print on the display:

  • DEG (or D): sexagesimal degrees; a full circle is 360°. This is the unit used for drawings and numerical controls;
  • RAD (or R): radians; one rad is 2π. It is used in physics formulas, for example with angular velocity ω (Chapter 9);
  • GRAD (or G): centesimal degrees (gon); one full rotation is 400 gon. It is used in surveying, but almost never in a workshop.
It is written as "sin 30" inThe calculator is designed toResult
DEG30°0,5 ✓
RAD30 rad = 1718.9°−0,988
GRAD30 gon = 27°0,454

Other rules to help you avoid errors:

  • An angle in degrees and minutes (for example, 29°30′) must first be converted to decimal degrees (29.5°), as described in Chapter 2, or entered using the appropriate key (° ′ ″);
  • On many calculators, sin² α is written as (sin(35))²: the parentheses around the sine are necessary; otherwise, it calculates the sine of 35²;
  • arcsin and arccos return a “Math ERROR” if the number is greater than 1: this usually means that you have divided the longer side by the shorter side;
  • Spreadsheets and almost all programming languages always use radians: in Excel, you would write =SEN(RADIANS(30)).

5.10 Solving Right Triangles

Solving a triangle means finding all its sides and angles based on the known ones. In a right triangle, one angle is already known (90°), so only two pieces of information are needed, at least one of which must be a side. There are four possible cases:

Known DataHow to Find Others
hypotenuse c and an angle αa = c · sin α · b = c · cos α · β = 90° − α
one leg and one angle (for example, b and α)a = b · tan α · c = b / cos α · β = 90° − α
the two legs, a and bc = √(a² + b²) · α = arctan(a / b) · β = 90° − α
hypotenuse c and a leg (for example, a)b = √(c² − a²) · α = arcsin(a / c) · β = 90° − α

A practical tip: At the end, always check your result using a calculation different from the ones you used—for example, the Pythagorean theorem if you worked with angles, or the sum of the angles if you worked with sides. And the longest side must be the hypotenuse.

αL (along the plane)b (horizontally)hh = L · sin αb = L · cos αtan α = h / bslope in %:h / b × 100
Figure 5.7 · Tilted plane: L is the length measured along the plane, h is the height difference, b is the horizontal projection, and α is the angle of inclination.
Example 5.6 · Height of a tilted plane (hypotenuse and angle)

A 2.5-meter-long loading ramp is inclined at a 12° angle to the floor. What is its maximum height, and how much floor space does it occupy?

h = L · sin α = 2500 · sin 12° = 2500 · 0.20791 = 519.8 mm
b = L · cos α = 2500 · cos 12° = 2500 · 0.97815 = 2445.4 mm
Verification: √(2445.4² + 519.8²) = √(5,979,981 + 270,192) = √6,250,173 = 2,500.0 ✓
It has a height of about 520 mm and a base width of 2.45 m
Example 5.7 · Angle of a ramp (two legs)

A ramp for carriages must rise 150 mm over a horizontal distance of 1,200 mm. What is its angle, its slope, and how long is the sheet metal?

tan α = h / b = 150 / 1200 = 0.125 → α = arctan 0.125 = 7.125°
slope = 0.125 × 100 = 12.5%
L = √(1200² + 150²) = √(1,440,000 + 22,500) = √1,462,500 = 1209.3 mm
α ≈ 7.13° · slope 12.5% · sheet metal length 1209.3 mm
📐
Slope and angle are not the same thing. Slope as a percentage is the tangent of the angle multiplied by 100. A 100% slope corresponds to an angle of 45°, not 90°; a 10% slope corresponds to an angle of 5.71°. For small angles, the two numbers increase almost in proportion; for large angles, they do not.

A typical example of a “cathetus and angle” is a drill bit. Tapered drill bits for steel have a point angle of 118°: viewed from the side, the cone of the bit is formed by two right triangles with a leg of D/2 and an angle of 59° toward the axis. The length of the cone must be added to the hole depth when planning a through hole (Chapter 28).

Dl59th118thD/2Right triangle:leg D/2, angle 59°l = (D/2) / tan 59°Ø10: l = 3.00 mm
Figure 5.8 · The drill bit: the 59° semi-angle and the radius D/2 form a right triangle; the missing leg is the length l of the cone.
Example 5.8 · Length of the leg (leg and angle)

A Ø10 drill bit with a 118° angle must pass through a 15-mm plate. How far must it extend beyond the bottom surface for the hole to be complete?

In the triangle: the opposite side of the 59° angle = D/2 = 5 mm, the adjacent side = l
tan 59° = 5 / l → l = 5 / tan 59° = 5 / 1.6643 = 3.004 mm
Depth to be programmed: 15 + 3.0 = 18.0 mm, plus 1 or 2 mm for safety
l = 3.0 mm: The drill bit must be lowered to Z−19 or Z−20 to penetrate the entire plate
Example 5.9 · The strut of a cantilever (hypotenuse and leg)

A wall-mounted shelf has a 300-mm-long diagonal brace (measured between the two holes), which is attached to the shelf 180 mm from the wall. At what height below the shelf should the hole be drilled in the wall, and at what angle should the brace be cut?

height = √(300² − 180²) = √(90,000 − 32,400) = √57,600 = 240 mm
angle with the shelf: cos α = 180 / 300 = 0.6 → α = arccos 0.6 = 53.13°
angle with the wall: β = 90° − 53.13° = 36.87° (check: sin β = 180 / 300 = 0.6 → β = 36.87° ✓)
holes 240 mm below the shelf · strut at 53.13° from the shelf and 36.87° from the wall

5.11 General Triangles: The Law of Sines

When a triangle does not have a right angle, the sine, cosine, and tangent can no longer be interpreted as ratios of the sides. We need two theorems that hold for all triangles. To write them, we use a standard notation: the vertices are labeled A, B, and C; the angles are labeled α, β, and γ; and the sides are labeled a, b, and c, where each side lies opposite the angle with the same letter.

αβγbachABCa / sin α = b / sin β = c / sin γc² = a² + b² − 2ab · cos γEach side isopposite itsangle
Figure 5.9 · Side a lies opposite α, side b lies opposite β, and side c lies opposite γ. The height h divides the triangle into two right triangles: this is the starting point for proving the two theorems.

The height h, as seen from the two right triangles in the figure, is given by h = b · sin α and also h = a · sin β. Setting these equal yields a / sin α = b / sin β, and the same reasoning applies to the other pair: this is the law of sines.

Law of Sines
asin α = bsin β = csin γ = 2R α + β + γ = 180°
a, b, c: sides in mm · α, β, γ: opposite angles · R: radius of the circle passing through the three vertices (circumscribed). This formula is used when two angles and one side are known, or when two sides and the angle opposite one of them are known.
Example 5.10 · Three Holes in a Plate

Three holes, A, B, and C, are drilled in a plate: the distance between B and C is 80 mm; the drawings show the angles α = 40° at A and β = 65° at B. Find the other two distances and the diameter of the circle that passes through the three holes.

γ = 180° − 40° − 65° = 75°
a / sin α = 80 / sin 40° = 80 / 0.64279 = 124.46 mm (= 2R)
b = AC = 124.46 · sin 65° = 124.46 · 0.90631 = 112.80 mm
c = AB = 124.46 × sin 75° = 124.46 × 0.96593 = 120.22 mm
AC = 112.80 mm · AB = 120.22 mm · the three holes lie on a circle with a diameter of 124.46

When two sides and the angle opposite one of them are given, the theorem yields the sine of an angle, and one sine corresponds to two possible angles, β and 180° − β (Section 5.6). If both sides give rise to a third angle, there are two possible triangles: this is an ambiguous case, and only the drawing indicates which one is correct.

Example 5.11 · The Ambiguous Case

For a triangle, we know that a = 70 mm, b = 90 mm, and α = 40°. Find β, γ, and c.

sin β = b · sin α / a = 90 · 0.64279 / 70 = 0.82644
β = arcsin 0.82644 = 55.73° or β = 180° − 55.73° = 124.27°
First solution: γ = 180° − 40° − 55.73° = 84.27° → c = 70 · sin 84.27° / sin 40° = 108.36 mm
Second solution: γ = 180° − 40° − 124.27° = 15.73° → c = 70 · sin 15.73° / sin 40° = 29.53 mm
Two different triangles satisfy the given values: c = 108.36 mm or c = 29.53 mm

5.12 Carnot's Theorem and the Area of a Triangle

The law of sines is not sufficient when two sides and the angle between them are known, or when all three sides are known: in those cases, no pair of sides and their opposite angles is known. We need Carnot’s theorem (also known as the cosine theorem), which is a “corrected” version of the Pythagorean theorem for non-right triangles.

Carnot's Theorem (Cosine Theorem)
c² = a² + b² − 2ab · cos γ
and similarly, a² = b² + c² − 2bc · cos α; b² = a² + c² − 2ac · cos β
On the contrary: since γ = a² + b² − c²2ab
Let a and b be two sides, and γ the angle between them; let c be the side opposite γ. If γ = 90°, the cosine is zero, and the Pythagorean theorem holds. If γ is obtuse, the cosine is negative, and c is longer than in the right-angle case. With arccos, the angle is always calculated correctly, even if it is obtuse: this is Carnot’s advantage over the law of sines.
Example 5.12 · The third side of a bracket

A triangular bracket has two sides measuring 120 mm and 90 mm, which form a 70° angle. How long is the third side?

c² = 120² + 90² − 2 · 120 · 90 · cos 70°
c² = 14 400 + 8100 − 21 600 · 0,34202 = 22 500 − 7387,6 = 15 112,4
c = √15 112.4 = 122.93 mm
c = 122.93 mm
70°12090c = ?CBATwo sides and the angle between them:Carnot → c = 122.93 mmarea = ½ · 120 · 90 · sin 70°= 5,074 mm²10-mm-thick steel sheet:approximately 0.40 kg (excluding holes)
Figure 5.10 · The bracket from Examples 5.12 and 5.14, to scale. The dimensions are the distances between the centers of the holes.
Example 5.13 · Angles on Three Sides

Another angle bracket has sides a = 120 mm, b = 90 mm, and c = 110 mm. What are its angles?

cos α = (b² + c² − a²) / (2bc) = (8,100 + 12,100 − 14,400) / (2 · 90 · 110) = 5,800 / 19,800 = 0.29293 → α = 72.97°
cos β = (a² + c² − b²) / (2ac) = (14,400 + 12,100 − 8,100) / (2 × 120 × 110) = 18,400 / 26,400 = 0.69697 → β = 45.82°
so γ = (a² + b² − c²) / (2ab) = (14,400 + 8,100 − 12,100) / 21,600 = 0.48148 → γ = 61.22°
Check: 72.97° + 45.82° + 61.22° = 180.01° (the extra hundredth comes from rounding) ✓
α = 72,97° · β = 45,82° · γ = 61,22°

The breast area

The area of a triangle is the base times the height divided by two (Chapter 3). If we take side a as the base, the height on its extension is b · sin γ, and we obtain a formula that does not require measuring the height: all we need are two sides and the angle between them.

Area of a triangle with two sides and the included angle
A = 12 · a · b · sin γ
A is the area in mm²; a and b are two sides in mm; γ is the angle between them. When three sides are known, first find one angle using Carnot’s theorem, or use Heron’s formula, A = √(p · (p − a) · (p − b) · (p − c)), where p is half the perimeter.
Example 5.14 · Area and Weight of the Bracket

The bracket shown in Example 5.12 (sides 120 and 90 mm, angle 70°) is cut from a 10-mm-thick steel sheet. How much does it weigh, not counting holes and radii?

A = ½ · 120 · 90 · sin 70° = 5400 · 0.93969 = 5074.3 mm²
V = 5074.3 × 10 = 50,743 mm³ = 0.050743 dm³
m = 7.85 × 0.050743 = 0.398 kg (density from Chapter 2)
Approx. 5,074 mm² · approx. 0.40 kg

5.13 Polar and Cartesian Coordinates

A point on a plane can be described in two ways. Cartesian coordinates (X; Y) specify how far to move along the two axes. Polar coordinates (R; A) specify the distance R from the origin (the pole) and the angle A, measured counterclockwise from the X-axis. The transition from one set of coordinates to the other is represented by a right triangle with hypotenuse R.

XYPARX = R · cos AY = R · sin AYCartesian: P = (X; Y)Polar coordinates: P = (R; A)Fanuc with G16 active:X = radius, Y = angleSiemens: polar with G111,RP = radius, AP = angle
Figure 5.11 · Point P is reached by moving a distance X and Y, or by rotating through an angle A and moving a distance R away from the pole.
From Polar to Cartesian and Back Again
X = R · cos A Y = R · sin A
R = √(X² + Y²) A = atan2(Y; X) (arctan(Y/X) corrected using the quadrant, paragraph 5.8)
R: distance from the pole in mm · A: angle in degrees from the X-axis, positive in the counterclockwise direction · X, Y: Cartesian coordinates in mm, relative to the same pole. If the pole is not at the origin but at (X0; Y0), add X0 and Y0 to the results.
Example 5.15 · Back and forth between the two systems
R = 45, A = 30°: X = 45 · cos 30° = 45 · 0.86603 = 38.971 · Y = 45 · sin 30° = 22.500
R = 60, A = 135°: X = 60 · (−0,70711) = −42,426 · Y = 60 · 0,70711 = 42,426

On the other hand, the point X = −25, Y = −40:

R = √(25² + 40²) = √(625 + 1600) = √2225 = 47,170
arctan(−40 / −25) = arctan 1.6 = 57.99°; x < 0 → A = 57.99° + 180° = 237.99°
(38,971; 22,5) · (−42,426; 42,426) · R = 47,17 e A = 237,99°

Polar coordinates on the numerical control panel

When a drawing is dimensioned with radii and angles, CNC controls allow you to program directly in polar coordinates, without having to do the calculations. On Fanuc controls for milling machines, the function is activated by G16 and ends with G15: In plane G17, while G16 is active, the X address becomes the radius and the address Y is thecorner in degrees. In absolute coordinates (G90), the pole is the work zero. On Siemens machines, the pole is set using G111 and the period is written as RP= (radius) and AP= (corner).

T01 M06 (PUNTA D10)
G90 G17 G54 G00 X0 Y0 S1000 M03 (ZERO PEZZO AL CENTRO DELLA FLANGIA)
G43 H01 Z50.
G16 (COORDINATE POLARI ATTIVE)
G81 X50. Y0 Z-15. R2. F120 (FORO 1: RAGGIO 50, ANGOLO 0)
Y60. (FORO 2)
Y120. (FORO 3)
Y180. (FORO 4)
Y240. (FORO 5)
Y300. (FORO 6)
G80 G15 (CICLO SPENTO, POLARI SPENTE)
G00 Z50.
M30

The program drills the 6 holes in the flange described in the next paragraph: the radius remains 50, and only the angle changes. The program automatically performs the sine and cosine calculations, which we’ll look at shortly. Knowing how to do these by hand remains essential—to check the program, for operations that don’t use polar coordinates, and to measure the finished part.

5.14 Circles of Holes

Flanges, covers, hubs, and discs often have identical holes arranged in a circle at a constant angular pitch. The drawing specifies the pitch diameter (or center diameter) D, the number of holes n, and the position of the first hole; unless polar coordinates are used, the program requires the X and Y coordinates of each center. This is the most common application of trigonometry in milling.

Coordinates of holes on a circle
θi = θ1 + (i − 1) · 360°n
Xi = Xc + D2 · cos θi Yi = Yc + D2 · sin θi
distance between two holes: s = D · sin Δθ2 nearby holes: s = D · sin 180°n
D: pitch diameter in mm · n: number of holes · θ1: angle of the first hole · θi: angle of the i-th hole · Xc, Yc: center of the circle (0 if the workpiece center is at the center) · Δθ: angle between the two holes · s: distance between the centers, in a straight line (the chord). The formula for the chord comes from the isosceles triangle with its vertex at the center: when cut in half, it yields two right triangles with hypotenuses of D/2 and angles of Δθ/2.
123456sØ100 primitive (line-point) · origin at centerholeangleXY10°50.0000.000260°25.00043,3013120°−25,00043,3014180°−50,0000.0005240°−25.000−43,3016300°25,000−43,301s = 100 · sin 30° = 50 mm
Figure 5.12 · Flange with 6 holes on a Ø100 circle, the first on the X+ axis. On the right are the center coordinates; the chord s between two adjacent holes is shown in red.
Example 5.16 · Six holes on a Ø100

Flange with 6 holes on a pitch diameter of 100 mm; the first hole is on the X+ axis, with the workpiece centered.

radius = 100 / 2 = 50 mm · angular increment = 360° / 6 = 60°
Hole 1 (0°): X = 50 · cos 0° = 50 · Y = 50 · sin 0° = 0
Hole 2 (60°): X = 50 × 0.5 = 25; Y = 50 × 0.86603 = 43.301
hole 3 (120°): X = 50 · (−0.5) = −25 · Y = 43.301
Holes 4, 5, 6 (180°, 240°, 300°): (−50; 0) · (−25; −43.301) · (25; −43.301)
Coordinates in the table in Figure 5.12: just two numbers are needed—25 and 43.301—with the correct signs
Example 5.17 · Eight holes on a Ø100 axis spanning the axes

Cover with 8 holes on a Ø100. To ensure that no hole aligns with the axes, the first hole is at a 22.5° angle.

step = 360° / 8 = 45° · angles: 22.5°, 67.5°, 112.5°, 157.5°, 202.5°, 247.5°, 292.5°, 337.5°
50 · cos 22.5° = 50 · 0.92388 = 46.194 · 50 · sin 22.5° = 50 · 0.38268 = 19.134
ForumCornerX (mm)Y (mm)
122,5°46,19419,134
267,5°19,13446,194
3112,5°−19,13446,194
4157,5°−46,19419,134
5202,5°−46,194−19,134
6247,5°−19,134−46,194
7292,5°19,134−46,194
8337,5°46,194−19,134
Here, too, there are just two numbers—46.194 and 19.134—that switch places and change signs
Example 5.18 · Distance Between Two Holes in a Circle

To check the flange with a caliper, measure the distance between the centers of the holes. What should the measurement be?

6 holes on a Ø100 circle, closely spaced holes: s = 100 · sin(180° / 6) = 100 · sin 30° = 50.000 mm
8 holes on a Ø100 circle, closely spaced holes: s = 100 · sin 22.5° = 100 · 0.38268 = 38.268 mm
8 holes, from hole 1 to hole 4: Δθ = 3 × 45° = 135° → s = 100 × sin 67.5° = 100 × 0.92388 = 92.388 mm
Check using the coordinates: holes 1 and 4 have the same Y value (19.134), so s = 46.194 + 46.194 = 92.388 ✓
50,000 mm · 38,268 mm · 92,388 mm
🖥️
Try it in CNC Code. Enter the program for the 6 holes twice in the milling machine simulator—once using the X and Y coordinates from the table and once using G16—and the holes should be drilled at exactly the same points. If they aren't, the error is usually in the sign of a coordinate or in the first angle.
📏
How many decimal places. Coordinates are calculated using all digits and rounded only at the end, to the thousandth for checks performed in micrometers. Rounding the sine to two decimal places (sin 60° = 0.87 instead of 0.86603) on a radius of 50 shifts the hole by nearly two-tenths of a millimeter.

5.15 The Formulas in This Chapter

WhatFormula
Degrees and radiansrad = degrees · π / 180 · degrees = rad · 180 / π
Right-angled trianglesin α = a / c · cos α = b / c · tan α = a / b
Bribetan α = sin α / cos α
Key Reportsin² α + cos² α = 1
Related Anglessin(180° − α) = sin α · cos(180° − α) = −cos α · sin(−α) = −sin α · cos(−α) = cos α
Angle of a pointθ = arctan(y / x), plus 180° if x < 0 · θ = atan2(y; x)
Sides of a right trianglea = c · sin α · b = c · cos α · a = b · tan α · c = √(a² + b²)
Slopeslope (%) = tan α × 100
Law of Sinesa / sin α = b / sin β = c / sin γ = 2R
Carnot's Theoremc² = a² + b² − 2ab · cos γ · cos γ = (a² + b² − c²) / (2ab)
Area of a triangleA = ½ · a · b · sin γ
From polar to CartesianX = R · cos A · Y = R · sin A
From Cartesian to PolarR = √(X² + Y²) · A = atan2(Y; X)
Circle of Holesθi = θ1 + (i − 1) · 360° / n · Xi = Xc + D/2 · cos θi · Yi = Yc + D/2 · sin θi
Distance between two holess = D · sin(Δθ / 2) · for adjacent holes: s = D · sin(180° / n)

5.16 Exercises

Try to solve them on your own, using the calculator in DEG mode, before looking at the solution. In Chapter 6, trigonometry returns to more complex practical problems.

Exercise 1. Convert 72° to radians and 1.2 rad to degrees.
Solution

72 · 3.14159 / 180 = 1.2566 rad (i.e., 2π/5); 1.2 · 180 / 3.14159 = 68.755°.

Exercise 2. A right triangle has legs measuring 24 mm and 70 mm. Find the hypotenuse and the two acute angles.
Solution

c = √(576 + 4900) = √5476 = 74 mm. The angle opposite the 24-unit side: arctan(24 / 70) = arctan 0.34286 = 18.92°; the other angle: 90° − 18.92° = 71.08°.

Exercise 3. For an obtuse angle α, we know that sin α = 0.28. Find cos α, tan α, and α.
Solution

cos² α = 1 − 0.0784 = 0.9216 → cos α = −0.96 (second quadrant); tan α = 0.28 / (−0.96) = −0.2917; arcsin 0.28 = 16.26° → α = 180° − 16.26° = 163.74°.

Exercise 4. Without a calculator, using the corresponding angles: sin 120°, cos 135°, tan 240°, cos 300°.
Solution

sin 120° = sin 60° = 0.8660; cos 135° = −cos 45° = −0.7071; tan 240° = tan 60° = 1.7321 (third quadrant, positive tangent); cos 300° = cos 60° = 0.5.

Exercise 5. A 3-meter-long ramp is inclined at an angle of 8°. What is its height, and how long is it when viewed from above?
Solution

h = 3000 · sin 8° = 3000 · 0.13917 = 417.5 mm; b = 3000 · cos 8° = 3000 · 0.99027 = 2970.8 mm.

Exercise 6. A ramp must overcome a 400-mm step with a maximum slope of 8%. How long must it be in plan view, what is its angle, and how long is the sheet metal?
Solution

b = 400 / 0.08 = 5,000 mm; α = arctan 0.08 = 4.574°; L = √(5,000² + 400²) = √25,160,000 = 5,016.0 mm.

Exercise 7. A Ø20 drill bit for alloy steels has a point angle of 140°. How long is its taper?
Solution

70° semi-angle: l = 10 / tan 70° = 10 / 2.7475 = 3.640 mm.

Exercise 8. In a triangle, c = 150 mm, α = 35°, and γ = 100°. Find β, a, and b.
Solution

β = 180° − 35° − 100° = 45°. c / sin γ = 150 / 0.98481 = 152.31; a = 152.31 · sin 35° = 152.31 · 0.57358 = 87.36 mm; b = 152.31 · sin 45° = 152.31 · 0.70711 = 107.70 mm.

Exercise 9. From a reference hole C, hole A is 80 mm away and hole B is 60 mm away; the two directions CA and CB form an angle of 50°. How far apart are A and B?
Solution

AB² = 80² + 60² − 2 · 80 · 60 · cos 50° = 6400 + 3600 − 9600 · 0.64279 = 10,000 − 6,170.8 = 3,829.2; AB = √3,829.2 = 61.88 mm.

Exercise 10. Find the area of a triangle with two sides measuring 70 mm and 85 mm that form an angle of 115°.
Solution

A = ½ · 70 · 85 · sin 115° = 2975 · 0.90631 = 2696.3 mm² (sin 115° = sin 65°).

Exercise 11. A disk has 5 holes with a diameter of 80, the first of which is on the Y+ axis (90°). Calculate the coordinates of the 5 centers, with the origin at the center of the disk.
Solution

Step 72°, radius 40. Hole 1 (90°): (0; 40). Hole 2 (162°): (−38.042; 12.361). Hole 3 (234°): (−23.511; −32.361). Hole 4 (306°): (23.511; −32.361). Hole 5 (378° = 18°): (38.042; 12.361).

Exercise 12. A flange has 12 holes with a diameter of 150. What is the distance between two adjacent holes? And what is the distance between hole 1 and hole 5?
Solution

Adjacent holes: s = 150 · sin(180° / 12) = 150 · sin 15° = 150 · 0.25882 = 38.82 mm. There are 4 steps from hole 1 to hole 5: Δθ = 120°, s = 150 · sin 60° = 129.90 mm.

Exercise 13. The center of a hole is at X = 35, Y = −20. Write its polar coordinates, with the angle between 0° and 360°.
Solution

R = √(1225 + 400) = √1625 = 40.31 mm. x > 0: arctan(−20 / 35) = arctan(−0.57143) = −29.74°, that is, 360° − 29.74° = 330.26° (fourth quadrant).

Exercise 14. A bracket has sides measuring 50, 70, and 90 mm. Find the largest angle and the area.
Solution

The largest angle is opposite the longest side: cos γ = (50² + 70² − 90²) / (2 · 50 · 70) = (2500 + 4900 − 8100) / 7000 = −0.1 → γ = 95.74° (obtuse, negative cosine). Area = ½ · 50 · 70 · sin 95.74° = 1750 · 0.99499 = 1741.2 mm² (the same result is obtained using Heron’s formula).