If I know the area of a triangle and its internal angles, can I work out the length of its sides?

11-11-2010

Epy

Yes, though it'd kind of be a pain.

If you have all the angles, you can guess the length of one side and use the law of sines to obtain the remaining sides. Once you have all the sides, you can use Heron's formula to calculate the area. This obviously won't match your specified area, but since area scales according to length squared, you can multiply your guess by the square root of the ratios of the areas, i.e. Lreal = Lguess*sqrt(Areal/Aguess).

There's probably some way you can rearrange the stuff so that you're solving a system of equations as opposed to guessing, but I think guessing then scaling is pretty fast.

11-11-2010

Epy

Okay yeah, since sin(a)/A = constant and so on, you can replace the sides with A = sin(a)/constant, and then solve for the constant, but you'd be solving a 4th order polynomial.

11-11-2010

SMurf

Yeah, I did think about doing it iteratively, but I feel that I would end up doing a thousand calculations coming up with something quite simple.

How about then, if:-

Constant area, as before;
I had the ratio of the length of the opposite and adjacent sides (e.g. 16:9);
The triangle will always be right angled;
I don't need to solve the length of the hypotenuse (unless it helps solve the other sides).

Would it be easier to get the actual lengths then?
The ratio could be interpreted as angles, that explains my earlier question.

(This is about scaling a custom coordinate system relative to screen aspect ratio, if you're interested)

Yeah, I did think about doing it iteratively, but I feel that I would end up doing a thousand calculations coming up with something quite simple.

How about then, if:-

Constant area, as before;
I had the ratio of the length of the opposite and adjacent sides (e.g. 16:9);
The triangle will always be right angled;
I don't need to solve the length of the hypotenuse (unless it helps solve the other sides).

Would it be easier to get the actual lengths then?
The ratio could be interpreted as angles, that explains my earlier question.

(This is about scaling a custom coordinate system relative to screen aspect ratio, if you're interested)

It's not really iterative, you're guessing a side to find the ratio between area and side length for the given angles, then you just scale the side length according to the desired area.

11-13-2010

SMurf

I still think User Name:'s method involves less steps though.

To reduce it based on what I've written (right-angled triangle, so sinC is always 1):-

Code:

a = sqrt((2*sinA*K)/sinB)

Once you've found a, you can then switch to simpler terms:-

Code:

K = (a*b)/2
b = (K*2)/a

And that's a and b! :D

11-13-2010

User Name:

Quote:

Originally Posted by SMurf

Code:

K = (a*b)/2
b = (K*2)/a

And that's a and b! :D

I don't see how you derived those... When given sinC = 1, you can eliminate it from the multiplication in the equation, but you can't just throw out random stuff with it.

EDIT: Oh... Epy linked to Heron's formula like five posts ago. That's the name of the law/formula I used. Also, once you've got one side, you can do simple algebra with the law of sines and cosines to find the rest. Be careful with law of sines though, in special cases, it can give some weird output.

11-14-2010

Elysia

This shouldn't be impossible?
Using the cosine law (don't know if sine's low would work in this equation, though):

Elysia, the Law of Cosines requires 2 given sides, he has no sides. Heron's formula(the one I used) is required to find at least one side. Once you have one side, you can use Law of Sines, which, although much more efficient, can have weird results, or you can use all 3 I derived above, which will give correct results in all cases.

11-14-2010

Elysia

I am aware of that.
I am also aware that this is an equation system.

2abcos(v1...v3) are merely constants since v1...v3 are known.
That leaves 3 unknowns and 3 equations which is enough to exactly solve the system.

11-14-2010

cyberfish

The equations are not independent.

Just think about it logically. With just 3 angles, you can have infinitely many triangles.

11-14-2010

Elysia

*shrug*
Maybe you're right. I didn't get a chance to test it due to Wolfram and their bloody license nightmare.

11-14-2010

cyberfish

Of course I am right :). No need for CAS. This is simple logic.

If you scale all the sides equally, the 3 angles will be maintained.

That's because the 3 angles are also not independent. The third angle is redundant information (180 - a - b). That's why we need another constraint - length of one of the sides.