hopbin9 Posted May 12, 2011 Share Posted May 12, 2011 Hi, I can't find a global constant or function that returns the value of PI in HScript. Don't tell me the most procedural 3D application on the planet doesn't have PI defined somewhere. Quote Link to comment Share on other sites More sharing options...
crunch Posted May 12, 2011 Share Posted May 12, 2011 Hi, I can't find a global constant or function that returns the value of PI in HScript. Don't tell me the most procedural 3D application on the planet doesn't have PI defined somewhere. -> echo $PI -> echo `sin(deg($PI*.25))` Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted May 12, 2011 Author Share Posted May 12, 2011 Thanks, don't know why I didn't just try $PI Still a noob Quote Link to comment Share on other sites More sharing options...
old school Posted May 12, 2011 Share Posted May 12, 2011 Then that begs the question why you were so quick to blame Houdini when it's a trivial RTFM? To see all the global set variables in Houdini in a GUI, just go to the Houdini main menu EDIT > Aliases and Variables... and in the Variables tab, have a look-see for yourself. Another way to see all the global variables in Houdini is to use the textport commands "set" or "setenv". See the help usage on those two commands to set more if you need to. Btw you can add hundreds more global variables here. PI is also clearly defined in all VEX contexts and is accessed with the variable PI. You can see all the defined variables in $HFS/houdini/vex/math.h #define M_PI 3.1415926 #define M_PI_2 1.5707963 #define M_PI_4 0.7853981 .... .... #define PI M_PI #define PI_2 M_PI_2 #define PI_4 M_PI_4 And defined in Python... And obviously defined in HDK... And finally! Everyone should know PI to the first five digits at least. Jeepers this is grade 9 math. I'm depressed... 3.1415 Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted May 12, 2011 Author Share Posted May 12, 2011 And finally! Everyone should know PI to the first five digits at least. Jeepers this is grade 9 math. I'm depressed... 3.1415 lol, thanks. I think I was just compared to a grade 9 student. A long with basic trigonometry, and everything else they told me I'd need later in life. Well, damn them! They were right. Quote Link to comment Share on other sites More sharing options...
LEO-oo- Posted May 12, 2011 Share Posted May 12, 2011 @Old School "I'm depressed" - close! "God I'm so depressed" Quote Link to comment Share on other sites More sharing options...
old school Posted May 12, 2011 Share Posted May 12, 2011 LOL! Sorry guys. But gosh darn it's PI. None of the young'ins know of it any more... Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted May 12, 2011 Share Posted May 12, 2011 355/113 is kind of like pi. Just in case you use a software that doesn't actually have a constant for pi. 1 Quote Link to comment Share on other sites More sharing options...
edward Posted May 13, 2011 Share Posted May 13, 2011 355/113 is kind of like pi. Just in case you use a software that doesn't actually have a constant for pi. I voted for your post because of its historical significance. From Wikipedia: Around 480, the Chinese mathematician Zu Chongzhi demonstrated that π ≈ 355/113 (≈ 3.1415929 ), and showed that 3.1415926 < π < 3.1415927[44] using Liu Hui's algorithm applied to a 12288-gon. This value would remain the most accurate approximation of π available for the next 900 years. Quote Link to comment Share on other sites More sharing options...
hopbin9 Posted May 13, 2011 Author Share Posted May 13, 2011 900 years. I sometimes forget my own phone number. Quote Link to comment Share on other sites More sharing options...
gaurav Posted May 14, 2011 Share Posted May 14, 2011 900 years. I sometimes forget my own phone number. LOL!! i just noticed your auspicious joining date to the odforce. 3-14-10 http://en.wikipedia.org/wiki/Pi_Day it should help you to remember at least 4 digits. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.