0% found this document useful (0 votes)
6 views

Tutorial1 g

This tutorial focuses on trigonometry concepts essential for computer graphics, including the sine and cosine rules, the Pythagorean Theorem, and vector operations such as the scalar and cross products. It provides definitions, proofs, and geometrical interpretations of these mathematical principles. The tutorial aims to ensure familiarity with these results, which are foundational for further study in the course.

Uploaded by

boommaniac123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Tutorial1 g

This tutorial focuses on trigonometry concepts essential for computer graphics, including the sine and cosine rules, the Pythagorean Theorem, and vector operations such as the scalar and cross products. It provides definitions, proofs, and geometrical interpretations of these mathematical principles. The tutorial aims to ensure familiarity with these results, which are foundational for further study in the course.

Uploaded by

boommaniac123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

COMP3811: Computer Graphics

Tutorial 1
Trigonometry Recap
Marc de Kamps
September 24, 2020

Objective
In this module you will use a considerable amount of trigonometry. It may have been a while
since you’ve seen trigonometry, and in secondary school some results will not have been proven
rigorously. In this tutorial, we will review the basic trig functions and prove the sine rule, the cosine
rule, the Pythagorean Theorem. We will derive an important relationship between the scalar product
of two vectors and the angle between them, and introduce the cross product of two vectors.
It is not the intention to insult anyone’s intelligence and attendance for this tutorial will not
be monitored, but you will need to make sure you are completely familiar with these results: in
particular I will expect that you can prove each result.

Definitions
Just for reference, here are the definitions of the three most important trig functions: Given a right-

(hypotenuse)
(opposite)
h
a

A C
b
(adjacent)

Figure 1: Definition of triangle sides.

angled triangle (Fig. 1) the sine of angle α is defined as the ratio of the opposite over the hypotenuse,

1
and the cosine as the ratio of the adjacent over the hypotenuse:
a
sin α = (1)
h
b
cos α =
h

The Pythagorean Theorem


• Show that for any triangle surfaces area equals half times base times height

Consider Fig. 2.

Figure 2: Set up for a geometrical proof of the Pythagorean Theorem.

• Find an algebraic expression for the area of the large square.

• Find an algebraic expression for the area of one of the triangles.


• Use both expressions to find an algebraic expression for the area of the small square.
• Observe that you have now a proof of the Pythagorean Theorem. Explain this carefully.

Cosine and Sine Rule


The cosine rule can be considered to be a generalization of the Pythagorean Theorem. Using the

Figure 3: Triangle with notations

notations from Fig. 3 the rule is:


a2 = b2 + c2 − 2bc cos α

2
• Use a symmetry argument to find two other expressions of this rule.
• Prove the cosine rule. Hint: split the triangle into two right-angled ones; use the Pythagorean
Theorem.

While you’re at it, the sine rule is:

sin α/a = sin β/b = sin γ/c

• Prove the sine rule.

The Scalar Product


We will speak about vectors in great an gory detail later, but I will assume you are familiar with
the basics: a vector ~a in two dimensions represents a displacement and can be represented by two
numbers: !
1
~a =
3
This can be loosely interpreted as ”move one to the right and three upwards”. Vectors can be used
to represent sides from triangles in this way: starting from the origin two vectors ~a and ~b each can
represent the side of a triangle. The length of the side represented by ~a is then given by:
q
| ~a |= a2x + a2y

where !
ax
~a =
ay
So a x is the so-called x-component off ~a.
The scalar (or dot) product is now defined as:

~a · ~b ≡ a x b x + ay by

• Prove the following relationship using the cosine rule:

~a · ~b =| ~a || ~b | cos θ,
where θ is the angle between vectors ~a and ~b.
The dot product can be extended to an arbitrary number of dimensions:
N
~a · ~b ≡
X
a jb j
J=1

• The relationship between dot product and cosine also holds in three and more dimensions.
Argue that this suggests that the dot product is invariant under rotations (this is in fact true).
The dot product is very remarkable: it relates two bags of numbers: (the components of the two vec-
tors; numbers that can be stored, read from file etc.) via a simple algebraic formula to a geometrical
concept: the projection from one vector onto another (Fig. 4).

• Find an algebraic expression that relates the components of two vectors that are perpendicular.

3
Figure 4: Projection of one vector onto another via the scalar product

The Cross Product


The cross product can be defined in two dimensions, but it makes more sense in three dimensions or
higher: let:  
 a1 
~a =  a2 
 
a3
 

and  
 b1 
~b =  b2 
 
b3
The cross product is another vector defined by:
 
 a2 b3 − a3 b2 
~a × ~b ≡  a3 b1 − a1 b3
 

a1 b2 − a2 b1

It also has a remarkable geometrical interpretation. Consider two vectors ~a and ~b that lie in the x − y
plane. So  
 a1 
~a =  a2 
 
0
 

and  
 b1 
~b =  b2 

 
0
so that the cross product is :  
 0 
~a × ~b ≡  0
 

a1 b2 − a2 b1

• Show that the surface of the parallelogram spanned by ~a and ~b is | a || b | sin θ.


• Show that a1 b2 − a2 b1 =| a || b | sin θ. This is a slightly harder question; if you get stuck, move
on

4
Again we find a relationship between the geometrical properties of two vectors and an algebraic
expression of its components! Moreover, one that generalises again (in a way we will explore later)
to higher dimensions.
Another interesting property:

• Calculate ~a · (~a × ~b).


• Are the brackets necessary?
• What do you conclude from the answer?
Three dimensional coordinate systems have an orientation: they can be left- or right-handed. We
will work mostly in Right-handed coordinate systems, but there are transformations that change the
handedness of a 3D structure.

• State a transformation that changes handedness

There is a visual way for establishing whether a coordinate system is left- or right-handed:

Figure 5: Taken from Hughes et al. (Fig. 7.8)

Place your little finger (pinky) in the direction of the positive u-axis, and curl it in the direction
of the positive v-axis, closing your fist. If your thumb points in the direction of the positive w-axis,
your coordinate system is right-handed, otherwise it is left-handed.
Finally the cross product can be used to establish handedness: Consider
 
 1 
e~x =  0 
 
0
 

and  
 0 
e~y =  1 
 
0
 

5
• Calculate e~x × e~y .
• Calculate e~y × e~x .
• Explain the outcome of the last question in terms of the outcome of the penultimate one.

• What does the cross product express about handedness?

You might also like