General Discussion Undecided where to post - do it here. |
Reply to Thread New Thread |
![]() |
#1 |
|
I'm currently writing an OpenGL app and I'm wondering if I can simplify this bit of trig I use to manipulate the camera:
D = Y*tan(atan(M/Y) + A) - M I haven't done any proper maths in a while so I'm a bit rusty ![]() |
![]() |
![]() |
#2 |
|
I'm currently writing an OpenGL app and I'm wondering if I can simplify this bit of trig I use to manipulate the camera: |
![]() |
![]() |
#3 |
|
There are some trig idenities that you can use to simplify it. I know tan = sin/cos. And arctan is equal to something, just can't rememer, but you could probably simplify it that way.
These might be of help http://library.thinkquest.org/17119/...ize/basic.html http://en.wikipedia.org/wiki/Arctangent |
![]() |
![]() |
#4 |
|
I was thinking along the lines of getting rid of that atan within tan business, closest thing I've found is the formula:
tan(A+B)=(tan(A)+tan(B))/(1-tan(A)tan(B)) While it does get rid of the atan, it also makes the whole thing a lot bigger [no] edit: Well I'll be going home in a couple of days anyway so I guess I can just ask my TI-89 Ti ![]() |
![]() |
![]() |
#5 |
|
I was thinking along the lines of getting rid of that atan within tan business, closest thing I've found is the formula: It might be more efficient to perform that manipulation and not have an arctan calculation? I know that languages I've used in the past run much more quickly using sin and cos functions. |
![]() |
Reply to Thread New Thread |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|