Ray - Plane Intersection Detection

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
cndr
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 65
Joined: Sat Apr 24, 2010 7:03 am
Programming Language of Choice: etc.

Ray - Plane Intersection Detection

Post by cndr »

I've been trying to follow the nehe tutorial on this http://nehe.gamedev.net/data/lessons/le ... ?lesson=30. I don't understand the formula they are using
Xn dot X = d
Xn, X are vectors and d is a floating point value.
Xn is its normal.
X is a point on its surface.
d is a float representing the distance of the plane along the normal, from the center of the coordinate system.
What I don't understand here is dot, I've done some googling and am assuming he's talking about a dot product.
Essentially a plane represents a half space. So all that we need to define a plane is a 3D point and a normal from that point which is perpendicular to that plane. These two vectors form a plane, ie. if we take for the 3D point the vector (0,0,0) and for the normal (0,1,0) we essentially define a plane across x,z axes. Therefore defining a point and a normal is enough to compute the Vector representation of a plane.
What I think is happening is the plane is spread across the x and y axis with the y always 0, so to make it perpendicular they add 1 to the y axis, would that be correct?
Long Live The Queen!
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
Posts: 4709
Joined: Tue Apr 29, 2008 3:24 pm
Current Project: https://github.com/dbechrd/RicoTech
Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
Programming Language of Choice: C
Location: San Francisco
Contact:

Re: Ray - Plane Intersection Detection

Post by dandymcgee »

Let me know if this doesn't help you at all: http://www.tar.hu/gamealgorithms/ch22lev1sec2.html

I tried to find a decent explanation with examples directly related to programming.

Edit: http://www.tar.hu/gamealgorithms/ This whole site is pretty badass IMO.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
cndr
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 65
Joined: Sat Apr 24, 2010 7:03 am
Programming Language of Choice: etc.

Re: Ray - Plane Intersection Detection

Post by cndr »

Great site, reading the tutorial now. Thanks for the help.
Long Live The Queen!
Post Reply