[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference rusure::math

Title:Mathematics at DEC
Moderator:RUSURE::EDP
Created:Mon Feb 03 1986
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:2083
Total number of notes:14613

1910.0. "Tangent to polar equation" by EVMS::HALLYB (Fish have no concept of fire) Sun Nov 20 1994 02:10

    I'm drawing a logarithmic spiral as defined in polar coordinates by the
    equation:
    
    	r = a * exp(t)
    
    Where a is a constant, and r is the radius, t the angle. This is a
    convenient parametric form and I can readily compute (x,y) coordinates
    via the standard substitutions (x,y) = (r cos(t),r sin(t)).
    
    Trouble is I also want to occasionally draw a tangent to the spiral
    for a few (random) values of t. But since the equation is in polar form
    (and not really even a function!) I don't remember how to go about
    calculating the derivative.
    
    Anybody happen to remember enough calculus to help out here?
    
      John
T.RTitleUserPersonal
Name
DateLines
1910.1SWAGAUSSIE::GARSONachtentachtig kacheltjesMon Nov 21 1994 00:1314
    re .0
    
    I think you can *informally* deal with this using the following.
    
    dy   dy   dx
    -- = -- / --
    dx   dt   dt
    
    Substituting everything in should eventually give you dy/dx as a
    function of t.
    
    For your particular function I get dy/dx = (sin t + cos t)/(cos t - sin t)
    and I think that probably simplifies but I can't remember my trig formulae.
    dy/dx = tan(t+pi/4) ?
1910.2WRKSYS::ROTHGeometry is the real life!Mon Nov 21 1994 18:4419
   You could just take the velocity vector and normalize it to a unit
   vector to get the tangent

	P(t) = (a exp(t) cos(t), a exp(t) sin(t))

	V(t) = (a exp(t) (cos(t) - sin(t)), a exp(t) (sin(t) + cos(t)))

    V(t) doesn't vanish away from the origin so the x and y components can
    be normalized.

    You could even do something sleazy like make a small change up and
    down in t and use central differences to approximate the derivative
    to second order accuracy if you don't want to figure it out :-)

    This example is trivial, but I've often had complicated functions
    and have compared the numerical estimate with the analytic derivative
    to check on mistakes in the latter.

    - Jim
1910.3AUSSIE::GARSONachtentachtig kacheltjesMon Nov 21 1994 19:215
    additional to .1
    
    .2 reminds me to observe that the velocity vector makes a constant
    angle with the position vector (in this case pi/4) which I believe is
    characteristic of a logarithmic spiral.