View Full Version : Exam Practice Questions

baconbeastnz

10-08-2008, 11:33 PM

Hey guys, these forums have been so helpful to me, thanks to everyone who lends me a hand! :D

I have a few questions from some past exams that I want to understand, can't find the answers on the net.

Do homogeneous coordinates reduce the number of arithmetic operations requires to apply an affine transformation?

Do either the 'depth buffer algorithm' or the 'heedless painter's algorithm' operate at image precision?

Which of the following is not a possible number of intersections of a ray with a plane? 0, 1, 2, or +infinity.

1) don' know

2) what do you mean with image precision?

3) 2 intersections are not possible, everything else is

dletozeun

10-09-2008, 05:51 AM

Do homogeneous coordinates reduce the number of arithmetic operations requires to apply an affine transformation?

AFAIK, homogeneous coordinates is a representation that allow to compute any kind of 3D geometric transformation with only one 4x4 matrix. With classic 3x3 matrices, you can't represent some transformations like translation and projection and finally it would be painful and less efficient to store a chain of transformation that could have different nature (different representation).

So I want to say, yes it is true.

ZbuffeR

10-09-2008, 06:20 AM

2) (I think he meant pixel precision) depth buffer is per pixel, painter's algo is per polygon.

A. Masserann

10-09-2008, 01:17 PM

It seems that you wanted explanations ... so for the 3rd question, a line can either be parallel to a plane or not.

If it is not parallel, it has to intersect the plane in one and only point.

If it is, there are 2 possibilities : the line can be parallel to the plane without touching it at any point, or the line can be inside the plane.

So the answers 0, 1 and +infinity are valid. I mean, in standard linear space, assuming Euclid's 5 axioms ( btw, the fifth is precisely the point of your question )

You can think of it as he intersection of 2 lines, one beeing the projection ( _any_ projection ) of the other on the plane. If you understand that 2 lines can't intersect at only 2 points, well, it's basically the same.

baconbeastnz

10-09-2008, 04:44 PM

OK i get the 3rd question. thanks A.Masserann.

The second question was actually phrased "image precision" which is a bit weird, I'm also thinking the teacher means pixel precision as well.

, which would has Zbuffer said, be the depth buffer algorithm.

And question one, is phrased exactly as:

why do computer graphicists use homogenous coordinates?

(a) they allowe affine transformations to be implemented as ingle matrix multiply

(b) they reduce the number of arithmetic operations requires to apply an affine transformation?

(c) both (a) and (b)

(d) neither

dletozeun

10-09-2008, 05:32 PM

1) As I said, (a) and (b)

S.Seegel

10-10-2008, 04:56 AM

I disagree on this one.

The question is about affine transformations. That is, a sequence of rotation, scaling, shearing and translation.

Therefore the fourth row of a 4x4 matrix representing an affine transformation will always be 0 0 0 1, which causes unnecessary arithmetic operations when applied as 4x4 matrix multiply with a 4 component vector.

Instead you can do a matrix multiply with a 3x3 matrix (the upper left submatrix), followed by a vector addition (last column without the fourth component).

Using homogeneous coordinates allows for translations to be represented as a matrix multiply and doing perspective projection. So when using homogeneous coordinates you can chain all transforms to be applied (not only model and view, which should be affine, but also projection) in one single matrix.

So my answer would be (a).

dletozeun

10-10-2008, 05:02 AM

That is correct. Actually what I meant is that not using homogeneous coordinates imply to me a big cost about storing and maintaining a chain of transformations that are precisely heterogeneous. That would imply many complicated operations and add IMO extra operation comparing to homegeneous coordinates.

But may be, I am wrong on this point.

S.Seegel

10-10-2008, 05:33 AM

The same way you can store and maintain an arbitrary chain of transformations as a 4x4 matrix, you can store an maintain your transformations as a 3x3 matrix and a translation vector.

I've implement a custom transformation class, which builds on said concept to save on computations while constructing the transform, but stores a 4x4 matrix internally nevertheless, so it can be fed to gl[Load|Mult]Matix().

baconbeastnz

10-10-2008, 04:19 PM

Actually, I think

'Do either the 'depth buffer algorithm' or the 'heedless painter's algorithm' operate at image precision?'

The answer is probably neither... I mean lets take image precision to mean perfect precision (I.E real life). Depth buffer has better precision at at the near plane, therefore at the least, its precision away from the near plane is going to be less than image precision.

Zengar

10-10-2008, 05:27 PM

To 1... I think that the question is formulated poorly. If you treat matrix multiplication as one operation then the answer is yes. If you treat matrix multiplication as series of multiplications and additions then, a 3x3 matrix multiplication (for rotation/scaling) and an additional translation results in less single operations then the 4x4 matrix multiplication. So, this is basically implementation dependent :)

Powered by vBulletin® Version 4.2.3 Copyright © 2018 vBulletin Solutions, Inc. All rights reserved.