The only "simple" trig you need to know is the names of relationships on a right triangle (sine, cosine, tangent, cotangent, secant, cosecant, and their inverses) (just the names), the two equations I wrote (which are for non-right triangles), and how to convert Cartesian to polar coordinates. There is no simple or complicated trig. That is the entirety of it.

You need to know an angle of abd. C is the side opposite angle c. Let c be that angle and C be the side opposite it (72, 100, or bd). A and B are the other two sides. You have one unknown, so that is the only equation you need to solve.

If you know only two sides and none of the angles, the third side of the triangle could be any length greater than 72 + 100, so it is impossible to solve for the unknown side length.

All I see are triangles. I do not know what direction/distance each line is supposed to go. Speaking of which, vectors are a means of encoding direction and distance into the same number for any number of dimensions and there are even fewer operations to learn than in trig. (Dot product, cross product, addition, scalar multiplication, normalization, and matrix multiplication.)

I should mention, I just hacked this out from the wikipedia solution, and have no idea if it is the most practical or efficient for your situation.

Thank you, but this is the same code as i have above.The problem is that corner a does not rotate the upper arm like it should.

The only usable angle in this rectangle is B, because this represents the rotation of the lower arm to the upper arm.I need to find the angle beteen the arm in default position (line AD) and the arm in current position (line AB), so i can rotate it accordingly.

Do you have the [x, y] of two of the three points A, B, C? Otherwise, it seems the top triangle could be rotated to almost any angle, so there would be no way to know the angle at which AB veers off of the vertical.

Also, angle B (internal to ABC) has no bearing on angle A or B (internal to (ABD). If both angle A (internal to ABD) and line BD are unknown, there are an infinite number of solutions, as changing one will change the other. More info needs to be provided.

Apologies for my bad explanations.The line AD should indeed be vertical (so i have a refrence point to rotate from).

The following image shows what im trying:

Point c is known (position of the hand).Point a is also known (torso base position)Line AB = 72Line BC = 53I want to rotate line AB and CD so the hand will be placed at the position of c.

I figured i should make 2 rectangles and calculate the needed angles, but this seems to be kinda hard.How can i find out at what angle i should rotate these lines so the hand will be placed at point c?

You know the length of three sides. That is enough to find all angles of abc using the law of sines. The position b can be found if you know a and c if you simply find the direction of ac, add a, and extend 72 units in that direction.

The problem is that angle a and c are useless for this problem.i need to find out how i should rotate a, to point line AB it to b.Thats why i made an external rectangle abd with a refrence point of 0 degrees.

With no refrence point i am not able to rotate the arm properly.Think what happens when i rotate the upper arm the same as angle a, it will not be in the position AB, what im really trying to.

The rotation needed for AB, you are describing the angle that is formed by DA and AB. Yes?

One way to get that angle is to subtract the inner angle A (AB to AC) from the angle formed by DA and AC. This IS possible because you can get the three lengths and then the inner angle A. AND you have the angle DA to AC because you know the location of A and C.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org