Search Unity

Get intersection positions between two ellipses

Discussion in 'Scripting' started by Utopien, Mar 26, 2019.

  1. Utopien

    Utopien

    Joined:
    Feb 15, 2016
    Posts:
    46
    hello community i am looking for way to get intersection positions between two ellipses in 3d Space if possible hopfully with a formulla because i tried distances of the point of linerenderer and is not very efficient









    thanks for any help
     
    Last edited: Mar 26, 2019
  2. Stevens-R-Miller

    Stevens-R-Miller

    Joined:
    Oct 20, 2017
    Posts:
    677
    Could you say a bit more about what you are trying to do? An ellipse is a two-dimensional curve. Are you working with ellipsoids?
     
  3. Utopien

    Utopien

    Joined:
    Feb 15, 2016
    Posts:
    46


    it is for space game my ship is orbiting earth and moon also


    i make a new orbit for my ship to reach the moon orbit so i have two Ellipses Ellipses A new ship orbit and Ellipse B the moon orbit


    so i ecrase my ellipse ship orbit lenght or (semimajor) until it intersect so my ship orbit can reach moon orbit

    the intersection points between two ellipse can fom 1 point to 4 point of intesction


    what i am trying to get is the num of intersectiong point and there Vector3.Position


    so i can show them in my minimap to visualize if it s possible to make the orbital transfer and also use it to calculate time left of orbital obect before it arrve a that position but this is another problem.

    i hope that make sense ....