Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Exam Practice Questions

  1. #1
    Member Contributor
    Join Date
    May 2008
    Posts
    67

    Exam Practice Questions

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

    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.

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Dec 2000
    Location
    Reutlingen, Germany
    Posts
    2,042

    Re: Exam Practice Questions

    1) don' know
    2) what do you mean with image precision?
    3) 2 intersections are not possible, everything else is
    GLIM - Immediate Mode Emulation for GL3

  3. #3
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Exam Practice Questions

    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.

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: Exam Practice Questions

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

  5. #5
    Junior Member Newbie
    Join Date
    Sep 2008
    Location
    france
    Posts
    26

    Re: Exam Practice Questions

    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.

  6. #6
    Member Contributor
    Join Date
    May 2008
    Posts
    67

    Re: Exam Practice Questions

    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

  7. #7
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Exam Practice Questions

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

  8. #8
    Member Newbie
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    38

    Re: Exam Practice Questions

    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).

  9. #9
    Senior Member OpenGL Pro dletozeun's Avatar
    Join Date
    Jan 2006
    Location
    FRANCE
    Posts
    1,367

    Re: Exam Practice Questions

    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.

  10. #10
    Member Newbie
    Join Date
    Apr 2008
    Location
    Germany
    Posts
    38

    Re: Exam Practice Questions

    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().

Page 1 of 2 12 LastLast

Similar Threads

  1. Best practice for vk rendering
    By Stevens in forum Vulkan
    Replies: 3
    Last Post: 07-04-2018, 02:50 AM
  2. urgent exam help pls!.what is the current matrix?
    By theju in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 05-25-2011, 07:39 AM
  3. Please help!!!Next Monday exam on OpenGL
    By orion in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-23-2005, 12:55 AM
  4. Please help!!!Next Monday exam on OpenGL
    By orion in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-22-2005, 02:01 PM
  5. Best Practice ? ...
    By Andrew Jameson in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 04-23-2003, 12:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean