Results 1 to 3 of 3

Math Help - finding the min distance between two vectors

  1. #1
    Newbie
    Joined
    Apr 2008
    Posts
    3

    finding the min distance between two vectors

    Hi there,
    Im trying to find the minimum distance(sum of their radii) between two circles.
    The circles have position vectors a radius and a velocity vector.

    i can find the minimum(s) distance using Pythagoras and a loop. but this is costly i would much prefer to use some sort of differentiation.

    a=sum of radii
    b=(x1+Vx1*t)-(x2+Vx2*t)
    c=(y1+Vy1*t)-(y2+Vy2*t)

    Best regards,
    Mark
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Apr 2008
    Posts
    3

    think iv done it in one plane at least

    a=x1
    b=vx1
    c=x2
    d=vx2
    e= sum of radii
    t= time

    e = (a+bt)-(c+dt)
    e = (a+bt)-(c+dt)* (a+bt)-(c+dt)

    Multiply out

    -2abt + 2ac + 2adt -a2 + 2bct + 2bdt2 -b2t2 -2cdt -c2 -d2t2 + e = 0

    Rearrange

    2bdt^2 - b2t^2 - d2t^2

    -2abt + 2adt + 2bct – 2cdt

    -a2 - c2 + 2ac+ e

    = 0

    Factorise

    (2ab- b - d)t

    -2t(ab + ad + bc - cd)

    -a - c + 2ac + e



    This looks like a quadratic since if we remove all known variables we get

    t - 2t +c

    Therefore we can solve using the x = (-b +- root(b -4ac))/2a


    Let x=t
    Let a=A (a, b, d) = (2ab- b - d)
    Let b=B (a, b, c, d) = (2(ab + ad + bc – cd))
    Let c=C (a, c, e) = -a - c + 2ac + e

    solve this for each plane we need to consider and find the closest positive time to zero.
    Last edited by mgazza; April 14th 2008 at 04:26 AM. Reason: formatting
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie
    Joined
    Apr 2008
    Posts
    3

    done

    iv done it!!

    generalising the above forumula with 3d vectors

    gives me the desired result

    best regards
    mark
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Distance between point and line (vectors)
    Posted in the Geometry Forum
    Replies: 2
    Last Post: September 12th 2010, 07:49 AM
  2. vectors distance
    Posted in the Pre-Calculus Forum
    Replies: 1
    Last Post: January 17th 2010, 05:42 AM
  3. vectors distance and velocity - FP3
    Posted in the Algebra Forum
    Replies: 1
    Last Post: August 30th 2009, 01:19 AM
  4. Distance between vectors and absolute sum
    Posted in the Advanced Algebra Forum
    Replies: 0
    Last Post: April 5th 2008, 09:59 PM
  5. Vectors-finding distance
    Posted in the Geometry Forum
    Replies: 2
    Last Post: July 15th 2006, 06:58 PM

Search Tags


/mathhelpforum @mathhelpforum