ray sphere intersection

This topic is 4584 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

I've found a nice resource of how to find where a ray and sphere intersect. http://www.csee.umbc.edu/~olano/435f02/ray-sphere.html However, I just want to clear up some stuff. How would I go about multiplying two points together? How do I multiply a vector and a point together? Does all of it just use the same math as a dot product? Thanks.

Share on other sites
Quote:
 Original post by tendifoI've found a nice resource of how to find where a ray and sphere intersect.http://www.csee.umbc.edu/~olano/435f02/ray-sphere.htmlHowever, I just want to clear up some stuff.How would I go about multiplying two points together? How do I multiply a vector and a point together?Does all of it just use the same math as a dot product?
The vector products in the example you linked to are all inner (dot) products.

Share on other sites
They gave this as the final set up:

a = d * d
b = 2d * (p0 - pc)
c = (p0 - pc) * (p0 - pc) * r * r

So... let's say p0 - pc = m.

m * m being a point times a point = mx * mx + my * my + mz * mz

That correct?

Share on other sites
Quote:
 Original post by tendifom * m being a point times a point = mx * mx + my * my + mz * mzThat correct?
It's actually a vector times a vector, but otherwise yes, that's correct.

• What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 9
• 31
• 16
• 11
• 10
• Forum Statistics

• Total Topics
634122
• Total Posts
3015622
×