1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Ray-Sphere Intersection

  1. Aug 3, 2008 #1
    I'm trying to work through an explanation of how a ray-sphere intersection can be solved algebraically from here:

    My problem is at this step:

    I don't understand how they've expanded the formula.

    I thought you just multiplied each term in the left bracket by each term in the right bracket...which gave me...

    (o.o) + (c.c) - 2(c.o) - 2(d.c) + 2t(d.o) + t^2 (d.d) = r^2

    Have I made a mistake or is there some trick I'm missing?
    Last edited by a moderator: Apr 23, 2017
  2. jcsd
  3. Aug 3, 2008 #2
    You're expanding it out too far. The idea is to get it in a quadratic form. You treated it as three terms being squared and they treated it as two terms. Treat (o-c) as one term in the initial brackets and td as the other term. Then expand keeping (o-c) together as one term.
  4. Aug 3, 2008 #3


    User Avatar
    Homework Helper

    There isn't any trick. Just apply the distributive and commutative property of dot product to the vectors.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook