TurboCAD Forums

The Ultimate Resource for TurboCAD Knowledge

Register
 
Remember to do a search before you ask a question!!!

tan(-1) Formula; Version-20ProPlatinum
Read 1062 times
* December 29, 2017, 01:04:45 PM
Hello All,  This is my first time messing with Formulas in the Variables Palette.  I know next to nothing about trig.

Scenario (determining a roof pitch, in degrees, based on Rise & Run entries):

VariableValueFormula
Run12______
Rise6______
Pitch______=tan(-1)*(Rise/Run)

The result should be 26.5650511771°.  But I'm not getting that in the Variable Palette.  I'm getting some very small values, including negatives.

Am I doing this correctly?
In the first image below, the Value is what is there just after inserting the Constrained Angle Dimension.
In the second image below, it's the result of entering in a formula.

This is just brain exercise, really.  I have a few more days off for the Holidays.  -Alvin

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 02:09:23 PM
#1
Hi Alvin

Try to write "( atan(rise/run))", that should give you the correct degree.
If not you will need to change the answer from radian's to degree's i believe

Torfinn

Logged
V18, V19, V20, V21, 2015/ 16/ 17 Pro. Platinum
Deluxe V20, V21, 2015/ 16/ 17
RedSDK enabled
Windows 10 Home Premium 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB


* December 29, 2017, 02:31:29 PM
#2
Hi Alvin

Try to write "( atan(rise/run))", that should give you the correct degree.
If not you will need to change the answer from radian's to degree's i believe

Torfinn

Hi Torfinn.  That didn't work.  Formula atan(Rise/Run) [and (atan(Rise/Run))] resulted in a value of .463648.

If I substitute .5 for the operation* Rise/Run, I get the same results, using it in your formula or any formula.  So that part must be working correctly (in fact, if I make a new Variable, with a Formula Rise/Run, the resultant value is the correct .5)

*(not "operation"; what's the correct term?...  anybody...?)
« Last Edit: December 29, 2017, 02:33:15 PM by Alvin Gregorio »

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 03:02:07 PM
#3
Try this, Alvin

Logged
"What do I know, I'm still learning"..
Windows 7 64 bit HP > on a stock HP laptop with 4gb-2.4 GHz.Turbocad 2018-2017, TurboCad Platinum 21.Using Lightworks and Redsdk, Anilab lab 5. ATI Mobility Radeon HD 4500/5100


* December 29, 2017, 03:13:36 PM
#4
Hi Alvin

If i use "(atan(6/12))", answer is 26.5651 in metric system, so i guess you will need to re-calculate it to radians
"(atan(6/12))*180/PI"
0.463648*180/PI = 26,5651

Torfinn

Logged
V18, V19, V20, V21, 2015/ 16/ 17 Pro. Platinum
Deluxe V20, V21, 2015/ 16/ 17
RedSDK enabled
Windows 10 Home Premium 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB


* December 29, 2017, 03:14:14 PM
#5
The Variables palette works in radians, not degrees. The correct formula is pitch=atan(rise/run)*180/pi

Henry H

Logged


* December 29, 2017, 03:20:22 PM
#6
Try this, Alvin

Yep, that works.

Using that, ((atan(Rise/Run))/3.14159)*180 in the Pitch Formula-- instead of having the other two rows-- works as well.  To accuracy up to the ten-thousandth decimal place.  Must be the pi round-off.

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 03:25:44 PM
#7
The Variables palette works in radians, not degrees. The correct formula is pitch=atan(rise/run)*180/pi

Henry H

Yep, that works.
I hate it when I don't know why.  Just how...

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 03:29:16 PM
#8
This is the PI used in TC,   3.1415926535897932384626433832795  ;)

Torfinn

Logged
V18, V19, V20, V21, 2015/ 16/ 17 Pro. Platinum
Deluxe V20, V21, 2015/ 16/ 17
RedSDK enabled
Windows 10 Home Premium 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB


* December 29, 2017, 03:33:57 PM
#9
This is the PI used in TC,   3.1415926535897932384626433832795  ;)

Torfinn

I used 3.1415926535897932384626433832795 in my Forumla, and the pitch still was rounded off after the one-hundred-thousandth decimal place.
26.5650510000 instead of 26.5650511771°.  Angle Units set to 10 precision.
Ought to be good enough to build a house.  Probably not to land a mission accurately on Mars.

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 03:36:58 PM
#10
All I know about Trigonometry is what I learned quickly today, visiting a website designed for schoolchildren.

SOHCAHTOA    In this scenario I described, it seems we should use Tangent-- the inverse of Tangent.  Why-- in TurboCAD Variables palette, atan works but not tan(-1)?

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 03:47:07 PM
#11
Its just a "funny way" of writing atan i believe :)
I am used to tan' = atan

And TC only show you 6 desimals if it have something to do with cirkle's, but i guess it use the full pack when calculate.

Torfinn

Logged
V18, V19, V20, V21, 2015/ 16/ 17 Pro. Platinum
Deluxe V20, V21, 2015/ 16/ 17
RedSDK enabled
Windows 10 Home Premium 64 bit, 32 GB
NVIDIA Geforce GTX 780m, 1 GB


* December 29, 2017, 05:08:56 PM
#12
In TurboCAD Variables Palette, deg(atan(Rise/Run)) works as well.
At the bottom of the list of Functions, there is a Units Conversion functions list.  deg(a) is the function "Convert radians to degrees".
deg(atan2(Rise, Run)) works also.

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)


* December 29, 2017, 05:59:41 PM
#13
In TurboCAD Variables Palette, deg(atan(Rise/Run)) works as well.
At the bottom of the list of Functions, there is a Units Conversion functions list.  deg(a) is the function "Convert radians to degrees".
deg(atan2(Rise, Run)) works also.

Thanks, Alvin. I never noticed that function.

Henry H

Logged


* December 29, 2017, 11:39:01 PM
#14
Alvin that is all I know about trigonometry as well. I found this cheat sheet on an autodesk forum and being a visual person I find it useful.

Logged
Nikki
TC20 platinum
TC 2015 platinum
TC 2017 with lightworks


* December 30, 2017, 04:53:28 AM
#15
Alvin that is all I know about trigonometry as well. I found this cheat sheet on an autodesk forum and being a visual person I find it useful.

Those are clean and easy to decipher.  Thanks Nikki

When I was a framing-contractor, including cutting/building my own sometimes complex roofs, I always told my crew members that were interested that-- using the Construction Master calculator, which internally is based on trig-- as long as you can find the right-angle, you can figure anything out.
The diagrams you provided take that even further-- such as determining the radius of an arc when height and chord length are given (previous Construction Master versions didn't include that function).

Logged
Alvin Gregorio
(mostly Residential Architectural 2D; no formal CAD Training; intermittent TurboCAD user since yr. 2000 [ver6.5])
---TurboCAD: V20.2PP(57.0)[as of 3/12/15]; V19DL(54.2); V11.2Pro; Windows-7-Pro/64-bit; Intel-Core-i3 CPU; 2.27ghz; 4GB RAM; Intel HD Graphics (CPU based)