Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Calculating inverse trigonometry functions

Explorer ,
May 14, 2024 May 14, 2024

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.

TOPICS
General , Scripting
236
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , May 16, 2024 May 16, 2024

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.

 

Screenshot 2024-05-16 at 19.19.05.png

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

...
Translate
Adobe Employee ,
May 16, 2024 May 16, 2024
LATEST

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.

 

Screenshot 2024-05-16 at 19.19.05.png

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)

 

Screenshot 2024-05-16 at 19.13.40.png

 

Screenshot 2024-05-16 at 19.14.09.png

Best regards.

Luca Giarrizzo | Quality Engineer, 3D & Immersive | Adobe
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines