So here it is. Its not that tough, its just that nobody seems to *know* how to do it. I will try to express this as clearly as I can.
I have a plane in 3D space, the plane can be facing any direction. I also have a *3D* point which I know lies on the plane, which I will call Point1. I also have another 3D point, which I will call Origin, along with two orthogonal 3D vectors which lie on the plane (XVector and YVector). The two orthogonal vectors and the 3D Origin point form a base in the plane's 2D space. The plane's normal is also known.
Basically, since the 3D point I talked about earlier lies on the plane, we have that:
Point1 = Origin + X * XVector + Y * YVector
This can be further simplified, since we know Point1 and Origin:
Point2 = Point1 - Origin
Point2 = X * XVector + Y * YVector
So, Point2 is a linear combination of the two *3D* vector. Basically, what I need to know, is the value of X and Y. This is sort of a projection of the original 3D point (Point1) in the plane's 2D space coordinate system... A linear algebra problem.
Can anyone help?
Looking for a serious game project?
www.xgameproject.com
[edited by - Max_Payne on February 22, 2004 1:42:04 AM]
Tough math problem, can someone help?
Testing what Fruny suggested....
If my forward raytracer manages to generate a correct image, then it should be fine
Looking for a serious game project?
www.xgameproject.com
If my forward raytracer manages to generate a correct image, then it should be fine
Looking for a serious game project?
www.xgameproject.com
Doesn''t seem to work... So if anybody else has a suggestion.
Tommorow I will take the time to see if the error is in my code.
Looking for a serious game project?
www.xgameproject.com
Tommorow I will take the time to see if the error is in my code.
Looking for a serious game project?
www.xgameproject.com
Well, if I understand you correctly.. you have and equation in 3 dimensions with 2 unknowns... as long as the two vectors are linearly independant (which we assume they are) then taking any 2 of these dimensions, gives you enough information to some for the two variables... ie 2 linear equations in 2 unknowns. Should be easy enough? Exactly the same method would be applicable to your original equation too. The chances are (if you absolutely need the formula in more general vector notation) the result will become clear after obtaining the solution in this way.
quote:Original post by Fruny
X = ((P1-O).XVector) / ||XVector||
Y = ((P1-O).YVector) / ||YVector||
No ?
Fruny was close to the answer... It was:
X = ((P1-O).XVector) / ||XVector||^2
Y = ((P1-O).YVector) / ||YVector||^2
quote:Well, if I understand you correctly.. you have and equation in 3 dimensions with 2 unknowns... as long as the two vectors are linearly independant (which we assume they are) then taking any 2 of these dimensions, gives you enough information to some for the two variables... ie 2 linear equations in 2 unknowns. Should be easy enough? Exactly the same method would be applicable to your original equation too. The chances are (if you absolutely need the formula in more general vector notation) the result will become clear after obtaining the solution in this way.
Thats mathematically incorrect. Just doesn''t work. All 3 dimensions need to be taken into account.
Looking for a serious game project?
www.xgameproject.com
quote:Original post by Max_Payne
Fruny was close to the answer... It was:
X = ((P1-O).XVector) / ||XVector||^2
Y = ((P1-O).YVector) / ||YVector||^2
Oh, yeah, duh. Silly me.
quote:Original post by Frunyquote:Original post by Max_Payne
Fruny was close to the answer... It was:
X = ((P1-O).XVector) / ||XVector||^2
Y = ((P1-O).YVector) / ||YVector||^2
Oh, yeah, duh. Silly me.
Well you did put me on the right track, thanks
Looking for a serious game project?
www.xgameproject.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement