Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


How to understand vector projection


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Jeason   Members   -  Reputation: 96

Like
0Likes
Like

Posted 22 February 2012 - 09:01 AM

I find the following sentences in DXSDK.

However, if the normal points away from the light, the vertex is extruded to infinity. This is done by making the vertex's world coordinates the same as the light-to-vertex vector with a W value of 0. The effect of this operation is that all faces facing away from the light get projected to infinity along the light direction.

I know the result of the red line, but I don't know the math about it. Can you tell me the math in it?

Sponsor:

#2 Álvaro   Crossbones+   -  Reputation: 13934

Like
2Likes
Like

Posted 22 February 2012 - 11:00 AM

We are using homogeneous coordinates, where we represent points in three-dimensional space with four numbers, but where we consider that proportional coordinates (e.g. [1:2:0:1] and [2:4:0:2]) represent the same point. The resulting space is called projective space. If one considers the points that have non-zero last coordinate, they all have representatives of the form [x:y:z:1], and they look pretty much like conventional three-dimensional affine space. The remaining points have 0 last coordinate, and they correspond to "points at infinity". If you take parallel lines in affine space and look at the corresponding lines in projective space, they actually have an intersection, and the intersection point is one of these "points at infinity".

Hopefully that helps to frame the issue a bit.

#3 Jeason   Members   -  Reputation: 96

Like
0Likes
Like

Posted 22 February 2012 - 07:42 PM

Thank you very much, alvaro.

So if the point is ( 1, 2, 0, 0 ), we can consider the point is moved along ( 1, 2, 0) vector to infinity?

Am i right?

#4 Álvaro   Crossbones+   -  Reputation: 13934

Like
1Likes
Like

Posted 23 February 2012 - 11:17 AM

So if the point is ( 1, 2, 0, 0 ), we can consider the point is moved along ( 1, 2, 0) vector to infinity?

Am i right?


Yes. I prefer to word it as this: (1,2,0,0) is the point at infinity where all parallel lines along (1,2,0) meet. Notice the direction (1,2,0) is the same as (2,4,0) and (-3,-6,0), because they are all proportional.

#5 Jeason   Members   -  Reputation: 96

Like
0Likes
Like

Posted 07 March 2012 - 05:42 AM

Thank you, alvaro.

You help me alot.Posted Image




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS