Jump to content

View more

Image of the Day

The night is still, but the invasion brings chaos. #screenshotsaturday #hanako #indiegame #gameart #ue4 #samurai https://t.co/cgILXuokoS
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Collision of plane and sphere

4: Adsense

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 Demx   Members   

389
Like
0Likes
Like

Posted 02 September 2013 - 03:57 AM

hi, I'm reading the book Mathematics for 3d game programming and computer graphics, and got a doubt in the mentioned section ( page 362 ). It says the distance between a point P ( center of sphere ) and L ( defined as < N, D > ) can be defined as

L*P = r.

Then the book says the relationship can also be written as

N*P + D = r.

Is this correct? Shouldn't it really be N*P - D = r? Thanks


Edited by Demx, 02 September 2013 - 04:00 AM.


#2 Mussi   GDNet+   

4312
Like
0Likes
Like

Posted 02 September 2013 - 08:36 AM

Not sure what L*P is supposed to mean. I suppose with N*P you mean the dot product between normal N and point P. Depending on how you define your plane, you should either add or subtract D. In the case of Ax + Bx + Cz = D, you should subtract D. And in the case of Ax + Bx + Cz + D = 0, you should add D. Also note that N needs to be normalized for this. If it's not, you should use the following (N.P +- D) / |N| = r.



#3 Cosmic314   Members   

1972
Like
1Likes
Like

Posted 02 September 2013 - 08:38 AM

Wolfram to the rescue:  http://mathworld.wolfram.com/Point-PlaneDistance.html

 

See the subtopic / link to Hessian normal form:  http://mathworld.wolfram.com/HessianNormalForm.html

 

Basically, the book is correct.  If 'r' is positive then your point is on the side of the plane to where the normal points.  If 'r' is negative, it's on the opposite side.



#4 Eric Lengyel   Members   

3413
Like
2Likes
Like

Posted 02 September 2013 - 03:18 PM

Not sure what L*P is supposed to mean.

 

It means the dot product between the four-dimensional plane L = (Nx, Ny, Nz, D) and the homogeneous point P = (Px, Py, Pz, 1). The plus sign in the book is correct. If you're familiar with my more recent talks on Grassmann Algebra, then this is more accurately stated as the wedge product between the antivector (Nx, Ny, Nz, D) and the vector (Px, Py, Pz, 1).



#5 Mussi   GDNet+   

4312
Like
0Likes
Like

Posted 03 September 2013 - 09:32 AM

 

Not sure what L*P is supposed to mean.

 

It means the dot product between the four-dimensional plane L = (Nx, Ny, Nz, D) and the homogeneous point P = (Px, Py, Pz, 1). The plus sign in the book is correct. If you're familiar with my more recent talks on Grassmann Algebra, then this is more accurately stated as the wedge product between the antivector (Nx, Ny, Nz, D) and the vector (Px, Py, Pz, 1).

 

Aha yes, I remember the wedge product from a distant geometric algebra course. I'm assuming the OP cited the notation wrongly(should be L^P right?). Thank you for the link, seems very extensive!






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.