DirectX versus Doing It Yourself

text only
 
progress indicator progress indicator progress indicator progress indicator

Derivatives of Trigonometric Functions

Most of the curves and surfaces in this book are based on polynomial functions, but trigonometric functions are also very interesting because of their periodicity. You can also find the slope of a trigonometric function with a derivative. Understanding exactly how the derivative works is a little bit more involved, so I encourage you to start out by plotting a sine wave and then plotting out the slopes at points along that wave. Your graph should look something like Figure A.9.


Figure A.9: Approximating the derivative of a sine wave.

At this point, you might notice that this looks a lot like a cosine wave. If you repeat the exercise with a cosine, you should see something like Figure A.10.


Figure A.10: Approximating the derivative of a cosine wave.

This looks a lot like a negative sine wave. Now, you might say that you have "proven by inspection" that the derivatives of sine and cosine are what you see in Equation A.9.

(A.9) The derivatives of trigonometric functions. 

The derivatives shown in Equation A.9 are true, but they lack any sort of mathematical rigor. In a math class, you'd need to be able to show why this is true. Recall that one way of approximating sine and cosine is with a Taylor series as shown in Equation A.10.

(A.10) Taylor series approximations for sine and cosine. 

Wait a second! You know how to compute derivatives of polynomials and a Taylor series is just a big polynomial. You can compute the derivatives of sine and cosine by finding the derivatives of their Taylor series as shown in Equation A.11.

(A.11) The derivatives of sine and cosine via the Taylor series. 

So, the graphs in Figures A.9 and A.10 were correct. But then again, you knew that.

I am only covering sine and cosine here because I only really use those two functions in the book. Remember that there are derivatives for tangent, secant , and even the dreaded hyperbolic cosecant. Most calculus textbooks include a table of derivatives of common functions. A textbook is the best place to learn more about how these derivatives are computed.

progress indicator progress indicator progress indicator progress indicator


Focus on Curves and Surfaces
Focus On Curves and Surfaces (Focus on Game Development)
ISBN: 159200007X
EAN: 2147483647
Year: 2003
Pages: 104
Authors: Kelly Dempski

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net