# How to “shrink” a triangle

Given any triangle (vertices are known) and a distance X, how can I compute the triangle that is shrunk by X from the original? By shrink, I mean edges of the shrunk triangle are exactly X away from the original edges. So if X is large enough, the shrunk triangle doesn't exist.

EDIT: the resulting triangle needs to be inside the given triangle.

Attaching a picture for clarity.

-
Take the lines that join the vertices with the middle of the opposite sides; they will all intersect at a point $p$. inside the triangle. You want to "shift" the sides a distance $X$ along those lines. But how one describes this depends on how you are "given" the triangle. Are you able to translate it on the plane? Are you given the coordinates of the vertices, the equations of the lines? – Arturo Magidin Jan 15 '11 at 4:55
I have the 3 triangle vertices given, and I would like to output 3 vertices. By P do you mean the centroid? – Morrowless Jan 15 '11 at 5:04
What you want is not what I described. – Arturo Magidin Jan 15 '11 at 5:14