- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Alright folks, i am just confused at the moment.
I am doing some calculations using trig functions in iLogic, and saving all the values back to parameters just to check that things are working as intended.
So i started my calculation with a parameter named Angle, which is set to 65 degrees.
so i have another parameter named TRIG_THETA which is set to radians.
and in iLogic i said
TRIG_THETA = (Angle* Math.PI) / 180
which should convert Angle into its Radian equivalent, and save that value to TRIG_THETA. This is NOT what it does. it takes the degree value, converts it to the radian value...the converts it AGAIN, ie 65 degrees becomes 1.17...becomes something very tiny.
So i went back and just said
TRIG_THETA = Angle
and TRIG_THETA displays as the correct radian value, so i continued and extrapolated the rest of my variables out from there...but noticed a few of my tangent functions are calculating as if i put degree values into them instead of radian values, despite the values being in radians. So i am just confused, and am doing something wrong here.
------------------------------------------------
This is my ilogic (attached is a screenshot of my parameters, the redmarks denote the lines that are not calculating as i expected them too)
TRIG_THETA = Angle TRIG_RHO = 180 deg - TRIG_THETA TRIG_ALPHA = TRIG_RHO / 2 TRIG_BETA = TRIG_RHO - (90 deg) TRIG_X = Width_Front TRIG_Y = Stone_Thickness + Substrate_Thickness TRIG_Z = Substrate_Thickness TRIG_B = TRIG_Y / Tan(TRIG_ALPHA) TRIG_A = TRIG_X - TRIG_B - TRIG_Z TRIG_D = TRIG_Z * Tan(TRIG_BETA) TRIG_C = TRIG_A + TRIG_D TRIG_F = Depth TRIG_G = Wall_B_Thickness TRIG_E = TRIG_F - TRIG_G - (2 * TRIG_Z) TRIG_H = (2 * TRIG_Z) + Stone_Thickness TRIG_K = TRIG_E - TRIG_H TRIG_J = TRIG_K * Tan(TRIG_BETA) TRIG_L = TRIG_C + TRIG_J TRIG_M = TRIG_L + TRIG_D TRIG_Q = TRIG_F * Tan(TRIG_BETA) TRIG_N = TRIG_Q / Sin(TRIG_BETA) TRIG_P = Stone_Thickness / Cos(TRIG_BETA) TRIG_R = TRIG_Z * Tan(TRIG_THETA) TRIG_T = TRIG_N - (2* TRIG_P) + TRIG_R
Solved! Go to Solution.