Given the area and perimeter of a triangle, find its coordinates How can I find the coordinates of a triangle, given its area and perimeter? (I can find any triangle that satisfies the given area and perimeter.)
I tried to find the lengths of the sides of the triangle in the following way:
Consider the sides as $x, y, z$, altitudes as $p, q, r$, area as $A$ and half the perimeter as $s$.
Then, $px = qy = rz = 2A$ and $A=\sqrt{(s)(s-x)(s-y)(s-z)}$.
I will be computing this answer on my PC and for this method, the best time complexity I could think of is $O(n^{2}.log(n))$, where $n$ is the length of side.
How can I further reduce the problem further and also improve my solution for this problem?
 A: As André Nicolas and Ross Millikan have said there are usually an infinite number of solutions (unless you have an equilateral triangle or there are no solutions).  
For example, among triangles with perimeter $98$ and area $420$ are those with sides $24,37,37$ and $25,34,39$ and $29,29,40$.  The following picture comes from my page called Triangles with the same area and perimeter

If you want to find a solution, note that there are usually two isosceles triangles with given perimeter and area , which are easily found.
Another related article worth reading is  Angles, Area, and Perimeter Caught in a Cubic by George Baloglou and Michel Helfgott, published in Forum Geometricorum, Volume 8 (2008) 13–25
A: You can't. You don't even have enough data to find the sides, as you have two equations in three unknowns.  After that, you can translate and rotate the triangle without changing the area or perimeter, so you have (in 2D) three more unknown parameters.
A: One more data should be input because there are two inputs and three equations to be solved.
E.g., if Area A=8 and Perimeter P= 18 only are given, particular (symmetrical  two ) triangles CEB,CFB could be sketched but only after assuming base as 8 units in this example. The construction uses triangle area formula and a property of an ellipse.

Only after making a valid and  different independent input assumption can you at all get a solution.
A: Given area $A$ and perimeter $P$, consider the triangle with coordinates $(0,0),(b,0),(x,2A/b)$ for some $b>0$. This triangle has area $A$ and perimeter given by
$f(x)=b+\sqrt{x^2+(2A/b)^2}+\sqrt{(x-b)^2+(2A/b)^2}$
Solving $f(x)=P$ yields two values of $x$:
$x=\frac{b^2P^2-2b^3P\pm\sqrt{(b - P)^2 (2 b - P) P (16 A^2 + b^2 (2 b - P) P)}}{2bP^2-4b^2P}$
Note that we must be able to choose $b$ such that $P\geq f(b/2)=b+\sqrt{\frac{16A^2}{b^2}+b^2}$ since $f(b/2)$ is the minimum perimeter for this triangle. So then we must also have $b\leq P/2$ for $x$ to be real. But, a suitable $b$ can be chosen.
