• No results found

Midterm exam Graphics

N/A
N/A
Protected

Academic year: 2021

Share "Midterm exam Graphics"

Copied!
4
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Midterm exam Graphics

Thu, Oct 5 2006, 15:15–17:15

• Do not open this exam until instructed to do so. Read the instructions on this page first.

• You may write your answers in English, Dutch, or German.

• You may not use books, notes, or any electronic equipment.

• Please write down your name and student ID on all your solution sheets.

• If you finish early, you may hand in your work and leave, except for the first half hour of the exam.

• If you hand in your work, write down your name and student ID on any of the lists in the front of the examination hall.

• This test consists of 2 problems with 10 subproblems in total. The maximum number of points you can score is 9.

• Your grade for the text will be 10 · min(1,π·ep), where p is your score,πis the area of a circle with radius 1, and e is the base of the natural logarithm.

1

Dit tentamen is in elektronische vorm beschikbaar gemaakt door de TBC van A–Eskwadraat.

A–Eskwadraat kan niet aansprakelijk worden gesteld voor de gevolgen van eventuele fouten in dit tentamen.

1

(2)

1 Circles, ellipses, and lines

1 2

3 4 5 6

1

2 3 4 5 6

0 -1 -2

-1

-2

E

C

2

2

(3)

When we project a sphere onto a plane using perspective projection, we get an ellipse. In fact, an ellipse is a circle that has been scaled with different scaling factors for the two scaling directions. In the figure on the previous page, we see an ellipse with horizontal and vertical main axes. The ellipse E passes through the points (1, 4), (3, 3), (5, 4) and (3, 5).

Furthermore, we consider the line ` given by the following implicit equation: ` : 2x − 3y + 6 = 0. This line is not shown in the figure, but it may be convenient to draw it.

The line ` intersects the ellipse E in two intersection points s1en s2. We’d like to determine the coordinates of these intersection points. This may seem difficult, but in fact this can be done using techniques that we have seen in the Graphics lectures. It is important to realize that the ellipse in the figure is a scaled and translated version of the unit circle C (also shown in the figure).

(a) [0 pt] Give the parametric equation of the circle C with center (0, 0) and radius 1.

(b) [1 pt] Give the matrix M that transforms our circle C into ellipse E.

(c) [1 pt] Give the parametric equation of the ellipse E (use your answers to problems (a) and (b)).

Determining the intersection points of ` and E may seem difficult at first. But: suppose that we’d have the inverse matrix M−1of M at our disposal. Then we could transform ` into the line `0= M−1`. We already know that M−1E = C. So now we can determine the intersection points s01and s02of `0 and C. One nice property of affine transformations is that intersections are retained. In other words: the intersections of `0 and C transform into the intersections of ` and E when we apply the matrix M. That’s what we’ll use, (d) [1 pt] Determine the inverse M−1of the matrix M that you derived in problem (b). Inverting matrices is generally a lot of work, but in this case the amount of work is only moderate. Gaussian elimination will give M−1in only a few steps (but there are other means to compute M−1too). Tip: how can you check whether you computed the inverse matrix correctly?

(e) [1 pt] We cannot apply M−1to the implicit equation of `; for this, we need a parametric equation. So:

compute a parametric equation of `.

(f) [1 pt] Using your solutions to problems (d) and (e), determine a parametric equation of `0.

(g) [1 pt] Compute the intersections s01and s02of `0and C. One possible approach is to equate an implicit equation of `0to C. This results in a quadratic equation with two solutions.

(h) [1 pt] Finally, determine the intersection points s1and s2of the ellipse E and the original line `.

3

2

(4)

2 Triangles, rays, and matrices

Suppose we are given an extremely simple 3D model consisting of a single triangle with vertices (1, 0, 1), (−2, 2, 0), and (2, 3, 5). The viewing point of our camera is at (7, 11, 15). We’ll do ray tracing, and shoot a ray from the viewing point through the point (5, 8, 11). We’d like to know whether this ray intersects the triangle, and if so, in what point. We can solve this in several ways. One way is to put up a system of linear equations in three unknowns, derived from the parametric equations of the ray, and of the plane in which the triangle lies.

(a) [1 pt] Give the system of equations, and write it down in matrix notation (i.e., in the form Ax = b, where A is a 3 × 3 matrix, and x and b are vectors). You don’t have to solve the system of equations.

(b) [1 pt] Explain how we could use the inverse A−1 of the matrix A above to determine whether the ray intersects the triangle.

4

2

Referenties

GERELATEERDE DOCUMENTEN

During the period from October 11-20, 2009, the African portion of the Intertropical Front (ITF) was located near 14.0N degrees, while the normal for this time of year is

Moreover, as will be seen in Kalebwe masks, even the crest in examples 69 and 70 is low and comparable in prominence to the peaked types (ills.. On the basis of

In other words, it seems that he wanted to build an African empire modelled on Western society with its same socio-cultural codes – same politics, same kind of leaders, same

The holder of the licence referred to in Article 27h(1) guarantees fair gaming standards of the games of chance organised within the gaming casino4. For this purpose, the

The licence holder who, after the assessment referred to in the second paragraph, should reasonably suspect that the player may cause damage to himself or to others due to excessive

As the Betting and Gaming Act does not provide for the possibility to obtain a licence to offer remote games of chance, Dutch players depend on the way illegal providers curb

[1]; (inset) simulated pigment aggregates made of primary particles based on the scattering results indicating an increase in the number of primary particles per aggregate (z 2(1)

From the Earth Goddess to the rural woman holding a pot, the female figure embodies the local—the land—up against the cosmopolitan transcendent, itself embodied by the Buddha or