Week 6 Solution

Question 1

(a) Pretty open-ended question … lots of possible answers just my idea on some parts:

car 
 +-- body
          +---- front 
          +---- side left
                      +--- front door
                                +-- door handle 
                      +--- back door
          +---- side right
                      +--- front door (links to side left front door)
                      +--- back door (links to side left back door)
          +---- back
                       +---- lights 
                       +---- spoiler
 +-- engine
          ...
 +-- front right wheel
          +--- hub
          +--- bolts
          +--- tire
  +-- front left wheel (link to front right)
Note that as far as links go, this means that they have the same model data, but recall from lectures that associated with each edge in the scene graph, there is a corresponding transform, so that the model will be the same, but the local to world transform may be different.

(b) Let’s say you wanted to change the wheel hubs, but nothing else. With the scene graph, you can easily just remove the old hub model an put in the new one and the other parts of the model remain unchanged.

(c) Let’s say you wanted to animate the wheels to make them turn. This could be done relatively easily; all that needs to be done is modify the transform matrix for the wheels in a time-ordered manner, and they would spin, without breaking the rest of the model. Similarly for the seat tilting back. Similarly, say for, the airconditioning knobs, they could be modelling by translations, and even inflations of airbags could be modelled by scales :-) .

(d) Because it’s a scene graph, it can have references to other parts of the image. For example, you only need to store one model of the wheel; but you’d use it four times. Similarly with the doors; you only need to store probably one front and one back door, and you could just copy them. If you were to duplicate the bolts on the wheels, then you would only need one copy which you would use 16 times … hence a big saving in memory footprint!

(e) Body surface could be modelled by patches, e.g. Bezier patches, or NURBS. Muffler system (lots of bendy pipes and stuff) could be modelled by extrusions. Tires could be modelled as extrusions. Lots of left-over bits could be modelled as polygon meshes.

Question 2

Equation of line:

x(t) = 100 + 400t
y(t) = 300 + 300t

Left side:
x(t) > 200
100 + 400t > 200
t > 1/4

Right side:
x(t) < 600
100 + 400t < 600
t < 5/4

Top side:
y(t) > 200
300 + 300t > 200
t > -1/3

Bottom side:
y(t) < 500
300 + 300t < 500
t < 2/3

Combining the inequalities
t < min(1, 5/4, 2/3) = 2/3
t > max(0, -1/3, 1/4) = 1/4

Substituting back into equation of line:
Endpoints of clipped line are:
(100 + 400(1/4), 300 + 300(1/4)) = (200,375)
and
(100 + 400(2/3), 300 + 300(2/3)) = (367,500)

Question 3

Matrix is

[1 0  0  0]
[0 1  0  0]
[0 0  0  0]
[0 0 1/4 1]

Projection looks like this

+-------+
|      /|
+-----/ |
|     | |
|     | |
+-----+-+

Leave a Reply

You must be logged in to post a comment.


Bad Behavior has blocked 50 access attempts in the last 7 days.