# The Golden Spiral - Calculating intersections with circles.

#### Jdo300

The "Golden Spiral" - Calculating intersections with circles.

Hello all, I am working on a program that graphs the Golden Spiral and then lays a set of circles on top of it. I was curious to know if there is a formula I can use to figure out the x, y coordinates where a circle of a given radius intersects the spiral. Two assumptions can be made here. The circle's center will always be on the origin of the graph as well as the spiral. I attached a picture of a template with the spiral on it so you can see what I mean. Here is the equation for the Golden spiral that I am using (I added sine and cosine so that I could draw it with rectangular coordinates).

X = Cos (T) * Phi ^ ((2 / Pi) * T)
Y = Sin (T) * Phi ^ ((2 / Pi) * T)

T represents the Time constant but also the angle of the spiral.

Phi is the golden ration which is (1 + Sqr(5)) / 2

And of course, Pi is just pie.

Using that set of formulas, I want to be able to figure out the X and Y coordinates of a point on a circle where it intersects the spiral. I thought I came up with an equation for it but it didn't work... any help would be much appreciated.

One note about the diagram, the black dots are the points I want my program to be able to calculate (I just drew them in the picture to illustrate my point)

Jason O

#### Attachments

• 37.6 KB Views: 441

#### matt grime

Homework Helper
The spiral hits the circle of radius r at the (unique) point on the spiral of distance r from the origin.

r^2= x^2+y^2 = phi^(T*4/pi)

so 2logr= (4T/pi)log(phi)

so you can find T in terms of r, and hence the x,y coordinates

#### Jdo300

Hello, thank you for the insight. I think I get the gist of what you are saying but I'm still not quite sure how to move the equations around to solve for the individual X Y coordinates (I'm just a student in pre-calc, and we haven't done logarithms yet). What do I do to solve for the point?

#### matt grime

Homework Helper
Don't worry too much about log just now, log(x) is the (unique) number such that e^(log(x)) = x

where e is what'll you learn about soon if not already. (I don't know what precalc means exactly. At the risk of getting flamed again, not all of us understand this terminology, and I've taught at a US university).

The point is that for a given, r you can use your calculator, or computer to find the T that corresponds to the point on the curve that is the intersection.

Try it for a few points to see.

Now you know what T is - (pi*logr)/(2logphi) - for a given number r this is just another number you can calculate, but not by hand. So you can put this in for the x-y coordinates.

Sorry, I don't see a way of doing it without logs, or more difficult concepts.

#### Jdo300

Hello Mat,

Thank you very much for your help! I finally got the program working correctly now. That formula you gave me to calculate T was exactly what I needed. Then I believe I was thinking too hard when I was trying to figure out how to translate the T value into X and Y coordinates. All I had to do was use the exact same formula I used when I was drawing the spiral graph but just put in the T value and it would spit out my coordinates. DERRR! Did you mention this before? If so, I think I just didn't pick up on it right away. Again, thank you much!

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving