Copy link to clipboard
Copied
How would one go about setting up nodes to calculate the inverse of sin, cos, tan? I need to draw triangles where I will only know two sides and their shared angle, and I'm using the Law of Sines to calculate the third side.
Hello,
Function graphs offer the acos (arccos) and asin (arcsin) inverse trigonometric functions as instance nodes. atan (arctan) is not implemented natively.
Arc Tangent 2 (atan2 or arctan2) is also available as an atomic node. Note that it is not necessary to switch the X and Y component of the input vector as in the usual atan2 function.
That said, to compute the length of the opposite side BC of an ABC triangle where and angle 'a' and its two adjacent sides AB and AC are known, you
...Copy link to clipboard
Copied
Hello,
Function graphs offer the acos (arccos) and asin (arcsin) inverse trigonometric functions as instance nodes. atan (arctan) is not implemented natively.
Arc Tangent 2 (atan2 or arctan2) is also available as an atomic node. Note that it is not necessary to switch the X and Y component of the input vector as in the usual atan2 function.
That said, to compute the length of the opposite side BC of an ABC triangle where and angle 'a' and its two adjacent sides AB and AC are known, you may consider splitting that triangle into two right triangles: ABD and BCD.
Then:
AD = AB*cos(a)
BD = AB*sin(a)
CD = AC - AD
=> BC = sqrt(BD^2 + CD^2)
I hope this makes sense! Here is a simple implementation and its result:
(the graph outputs -1 if any of the input values is 0 or lower)
Best regards.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now