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):
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:
Using cartesian equation from the book.
The cartesian equation of a log spiral is (excerpt of the book):
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[ , x]
The output is (note that s = tan (m) ):
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?