
Math General Math Forum  For general math related discussion and news 
 LinkBack  Thread Tools  Display Modes 
May 15th, 2017, 03:43 AM  #1 
Newbie Joined: May 2017 From: London Posts: 2 Thanks: 0  Compounding angles in 3D
Hi folks, I'm trying to get my head round this little problem. Hopefully very simple but I can't seem to picture it. Here's the short back story: I'm a VFX artist, like video compositing. I have a system called Flame and in this we have a 3D environment with surfaces, objects and cameras and stuff. So, imagine a camera looking a shape. The shape has coords 0,0,0 and the Camera is say 0,0,1000 and looking at the shape. Both start with zero rotation on all axis and the object is facing the camera directly. Basically what I'd like to know is: If the object rotates by theta degrees on its x axis and then alpha degrees on its y axis, what angle would its z axis form with a line drawn from camera to the object? The reason I ask, if you're interested, is: I want to write an expression (like a function that goes instead of a variable) that will turn the shape transparent when turned away from the camera. I wrongly assumed that I could treat x and y separately. So I looked at the object's y rotation first. It's facing the camera with 0 degrees rotation so if it was simply: if 90 < y rotation <90 then transparency = 0 otherwise transparency =100 (completely transparent on my system.) I used a cos function to get this to work for all angles. Pretty straight forward. Then I added looked at moving the object sideways in x. If it was off to the left it wouldn't need to rotate as far as 90 degrees before it should become transparent so I incorporated the angle from where it was straight on to where it moved to. This seemed to work. I did the same from moving in y and x rotation. I thought these to would simply compound like +ve and ve numbers. ie cos (y rotation)*cos(x rotation) ve means you can't see the object, +ve means you can. This also worked well until you rotate both. Once you rotate on x say the object's y axis also rotates. So I think what I need is the angle from the line from camera to object and the line perpendicular to the face of the object. So I think I need to compound the angles. It's tricky to get my head round though as I can't seem to draw it or picture it. If this makes any kind of sense and you have any insight your input would be greatly appreciated. Cheers Last edited by skipjack; August 7th, 2017 at 11:34 PM. 
August 7th, 2017, 11:35 PM  #2 
Global Moderator Joined: Dec 2006 Posts: 18,250 Thanks: 1439 
Do you still need help with this?


Tags 
angles, compounding 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Power of Compounding  Jaider  Applied Math  2  March 11th, 2015 07:04 AM 
Power of compounding  Jaider  Applied Math  1  February 24th, 2015 06:05 PM 
Finance & Compounding Interest  FlintheartGlomgold  Calculus  3  April 4th, 2014 12:31 AM 
Compounding Formula Needed?  RUXXIAN  Algebra  10  October 12th, 2012 08:59 AM 
Continuous compounding?  jamw90  Algebra  3  July 31st, 2010 08:24 PM 