Skip to main content
gamedev.net
🔒 Locked

Quadratic intersections

Started by Crispy Jun 3, 2004 at 11:37 AM 0 replies 350+ views
Original Post
Crispy
Crispy
I should probably put this in my sig - I''m not a math whiz so my question may seem awkwardly stupid for the less challenged ones in algebra. My question is this: after following this procedure... 1) intersect ray A with sphere S, getting two real intersection points In and If (n and f stand for near and far) 2) intersect ray B with S, the end point being In, getting another pair real intersection points Jn and Jf ... how do I determine whether In == Jn or In == Jf? Since I''m not a complete monkeyape, I tried the obvious: I compared VecDistance(B, Jn) to VecDistance(B, In), but the results were not what I expected (it would seem I''m a monkeyape after all). Anyway - when I intersect ray B from point P1 to In, which is a point on the sphere, am I supposed to get one intersection point or two? I tried it either way and the result is never what I would expect. Can someone point out what I''m doing wrong here? I guess the question is a bit vague, but it''s probably best if someone smarter asked the questions and I tried to explain what I''m doing...
"Literally, it means that Bob is everything you can think of, but not dead; i.e., Bob is a purple-spotted, yellow-striped bumblebee/dragon/pterodactyl hybrid with a voracious addiction to Twix candy bars, but not dead."- kSquared

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.