Build parent triangle out of its medians

On the right side of the screen you can slide the colored rings to fix the size of the three line segments that could be medians of a triangle. Having chosen three line segments, your challenge is to build a triangle that has the three segments you have chosen as its medians. You can do so by moving the colored vertices of the gray triangle on the left side of the screen. How can you tell when you have the correct triangle? Why does this work? Under what circumstances does this work or not work?