Author Topic: Math help?  (Read 955 times)

Currently programming a line of site detection and I got mostly finished however I forgot to write one bit when I was working on it last night and have since lost my thing telling me what to base the code off of.
Does anyone by chance know the formula for the intersection of a ray against a half-plane?

I know that if F = the vector and I am looking for F(t), t = the normal vector of the half plane dot (a point on the half-plane minus the initial position of the ray) over the normal vector dot something else, but I forgot what the something else was.



edit, also have been scouring google for 30 minutes and found nothing
« Last Edit: January 06, 2011, 07:37:53 PM by ladios »


I feel like you've just stabbed part of my brain with a fork...

I tried looking at Google just to try to understand how to help, but I don't know if what I find is helpful or not :c

I am thinking it is the direction of the ray, but I dunno. I am testing this out now I suppose.

Meh I don't think that was it.
« Last Edit: January 06, 2011, 08:04:12 PM by ladios »

Are you asking how to find the point of intersection of a vector and a plane or asking how to calculate the projection of a vector onto a plane space, or if neither then what?


Are you asking how to find the point of intersection of a vector and a plane or asking how to calculate the projection of a vector onto a plane space, or if neither then what?
:S

The first.
I figured it was

t = normal of plane dot (point on plane - origin of vector)
          normal of plane dot vector

But I think I am doing something wrong :/

Hey guys, We get that most of us can't make hardly any sense out of this. So why don't we stop filling this topic with un-helpful posts.

The first.
I figured it was

t = normal of plane dot (point on plane - origin of vector)
          normal of plane dot vector

But I think I am doing something wrong :/
Maybe I'm just misunderstanding the application, but doesn't a plane have an infinite number of associated normal vectors?

Well I am testing for intersection against four half planes to make a rectangle. n would be the surface normal of a half-plane (it loops through to check each side and then tests the intersection point to see  if it lies within the box.

This is all 2d btw, I don't even wanna know how complex 3d is lol

In the sense of finding points, you just add another plane, Z, for 3D.
But I'm sure there's a lot more to all the coding.

Sounds like you are talking about a coordinate plane. Or possibly a 3D coordinate "plane."

It turns out the thing I was trying to find was the direction of the ray.

Sounds like you are talking about a coordinate plane. Or possibly a 3D coordinate "plane."
Do you even know what you are talking about
« Last Edit: January 06, 2011, 08:25:01 PM by ladios »