1
$\begingroup$

I encountered a problem in determining the gradient in cartesian coordinates (x,y) of a logarithmic spiral (or equi-angular spiral) profile. The log-spiral definintion is as shown below (similar to a previous question of mine):

enter image description here

I have also generated several points in accordance to the profile using the equation `r=a*e^(θtan m):

Point x y

0 9.9999997 2.700000258

1 9.805274245 2.030963458

2 9.452271678 1.338905277

3 8.921115486 0.654692774

4 8.196483978 0.016283107

5 7.269524783 -0.531552828

6 6.139893897 -0.937932945

7 4.817842108 -1.147059284

8 3.326250384 -1.099962912

9 1.702494595 -0.736840057

10 0 0

with (xc,yc) = (7.699656589, 4.680792423); a = 2.013727242; and m = 30 degrees

The plot of the points:

enter image description here

Using cartesian equation from the book.

The cartesian equation of a log spiral is (excerpt of the book):

enter image description here

What I then did next was to bring the term y/x to the left hand side of the equation so that the cartesian equation equates to zero.

To find the gradient at any point of the log spiral profile, I used the following code in Mathematica:

D[ enter image description here , x]

The output is (note that s = tan (m) ):

enter image description here

However, when I evaluate the gradient based on the equation above, it yielded only positive values at those points I generated. This does not make sense as I expect that the gradient at point no. 8 (for example) to be negative.

Anyone knows what I'm doing wrong?

Thank you.

Regards Corse

$\endgroup$
3
$\begingroup$

I may have misunderstood the intent but post this in case it is helpful.

Note:

  • I have tried to mimic the spiral, clockwise rotation with displaced centre of spiral
  • I have displayed tangent to curve, the slope and angle.

Parametrization seems the most useful approach:

sp[t_, m_, a_, v_] := 
 v + a {Exp[Tan[m] t] Cos[t], -Exp[Tan[m] t] Sin[t]}
der[t_, m_, a_, v_] := D[sp[u, m, a, v], u] /. u -> t
arrow[t_, m_, a_, v_] := 
 With[{b = sp[t, m, a, v], ar = 5 Normalize@der[t, m, a, v]}, {Red, 
   PointSize[0.02], Point[b], Black, Arrow[{b, b - ar}]}]

where sp is parametrization of logarithmic spiral, der is tangent, arrow is just for visualization purposes.

Visualizing:

Manipulate[
 ParametricPlot[
  sp[t, 30 Degree, 2.013727242, {7.699656589, 4.680792423}], {t, 0, 
   Pi}, Epilog -> 
   arrow[angle, 30 Degree, 2.013727242, {7.699656589, 4.680792423}], 
  Frame -> True, PlotRange -> {{-10, 20}, {-10, 10}}, 
  PlotLabel -> 
   Row[{"slope of tangent: ", 
     slope = Divide @@ 
       Reverse[N@
         der[angle, 30 Degree, 
          2.013727242, {7.699656589, 4.680792423}]], " (", 
     180 ArcTan[slope]/Pi, , Degree, ")"}]], {angle, Pi, 0}]

enter image description here

Post script: I have not aimed to correct angle but hope this promotes your own solution.

$\endgroup$
  • $\begingroup$ thanks for the advice, is there a way to obtain the equation of gradient based on the parameterization? $\endgroup$ – Corse Apr 17 '15 at 7:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.