Results 1 to 2 of 2

Thread: Projected Triangle

  1. #1
    Junior Member Newbie
    Join Date
    Aug 2002
    Posts
    24

    Projected Triangle

    Hi, i have some doubts about pretty easy stuff like transformations. So, here is my questions.:

    I have one light vector (0.5, 0.0, -1.0) in world space and i have one object that is placed at (0.5, 0.0, -3.0). To transform the light vector(world space) to objec space i'm doing this:

    (Tx, Ty, Tz) = (0.5, 0.0, -3.0) - (0.0, 0.0, 0.0) resulting in (0.5, 0.0, -3.0) which is the object coordinates. Now i build a matrix like this:
    Tx = 0.5;
    Ty = 0.0;
    Tz = -3.0;

    1 0 0 Tx
    0 1 0 Ty
    0 0 1 Tz
    0 0 0 1

    and then i mutiply the light vector(in world space) with that matrix.

    The new(transformed) light vector should be one "line" from object space to ligth coordinates, if so than the new(transformed) light vector should be (0.0, 0.0, 2.0) and doing that transformation with the matrix this isn't the result.

    Anyone to get me clear with this please ?

    Thanks

  2. #2
    Junior Member Newbie
    Join Date
    Aug 2002
    Posts
    24

    Re: Projected Triangle

    Ups...i forgot to tell you that this is to project a triangle against a surface, something like this:

    I have a surface positioned with a high z value, i have one light the pointview and a trinagle in the middle and the triangle should be projected in the surface behind it, like a shadow...

    Thanks

Similar Threads

  1. An alternative to triangle strips and triangle fans
    By vincoof in forum OpenGL: General
    Replies: 8
    Last Post: 10-26-2012, 04:04 AM
  2. Replies: 3
    Last Post: 10-09-2012, 09:39 PM
  3. triangle strip with a LINE triangle display error
    By Samme in forum OpenGL: Windows
    Replies: 22
    Last Post: 11-20-2008, 07:50 PM
  4. projected shadows
    By Bruno in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 04-05-2003, 04:16 PM
  5. OT: fastest ray-triangle line -triangle intersection algo
    By V-man in forum OpenGL: Advanced Coding
    Replies: 23
    Last Post: 08-28-2002, 02:18 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