Anyone?
Printable View
Anyone?
Looks like people don't really know what you're asking.
The simplest response I can offer is to do a google search for trigonometry and try to work out the basics. Theres a good reason Sin, Cos etc are used - its the easiest way.
Basically, trigonometrical rules concern right-angled triangles. The hypotenuse (the longest side of the triangle) represents the straight line distance between points A and B
and since cirles are calculated based on the fact that every line between the circumference and the centre (every radius) is of equal length.Code:A
------
\ |
\ |
\ |
\ |
\ |
\ |
\|
B
once you've grasped this, its a small step to increment this distance by a little bit every time, forming a spiral shape.
Thanks Behemoth. Not sure I'm of the trig mind, but I'll try to figure it out.
But to word it a different way, suppose we just draw a horizontal line as a reference:
-------------------------------------------
At the beginning of this line is where the spiral will start. Call it (A).
A------------------------------------------
Each time the spiral loops around and crosses this line, is marked by the following letters:
A--------B---------------C------------------------D----
Note that the distance between the crossing of the spiral lines widen at each pass. The distance of B - C is 1.5 the distance of A - B. The distance of C - D is 1.5 the distance of B - C, and so-forth into the future.
I'd like to be able to provide the distance of A - B and the ratio, such as 1.5. The program would then draw the spiral with each line crossing this plane 1.5 times the prior distance.
:)
I'm not really a programmer, but from a logical point of view you're going to have problems. You need to tell the line where to go at every point, not just where it crosses a particular plane. Starting from 0, increase the line by dist(A - B)/360 for every degree it passes though - every "radius" if you like.
Yes, you are correct.
I've taken your advice and am currently studying Basic Trig at the moment, having found plenty of information on Trig on the web.
Until today, I had no idea what Cos and Sin really was, now I'm learning more than I care to just so I can get this working. :)
But it looks like I'm going to have to solve for 'P' (radius) at each point, and draw a LINE from degree to degree. Thus, my beginning radius would be the distance of A to B.
Thus, I'll start with A - B. Then I'll take the ratio of A - B (i.e 1.5) to solve for C. Then I'll divide the distance of B - C by 360 or 3600 (depending on how FINE I want the lines to be) and increment the radius by that quotient. Run it through a loop that increments the radius and extends the line...
Thanks Behemoth. It helps to discuss it with someone else to get a clear idea what needs to be done.
:)
I think I know what you'd need to do. First, you'd find out where you'd like it to touch when it makes its first semi-circle. Then you get a basic spiral going and then play around with the numbers until you can get it to hit every mark.
So... the end result you're after is something like this, or completely different............
Not exactly. It is a regular spiral I wish to draw where each revolution expands by the last distance times the ratio (i.e. 1.5).
Look at this graph.
Woohoo! I actually managed to help someone :DQuote:
Originally posted by Waat?
Yes, you are correct.
I've taken your advice and am currently studying Basic Trig at the moment, having found plenty of information on Trig on the web.
Until today, I had no idea what Cos and Sin really was, now I'm learning more than I care to just so I can get this working. :)
But it looks like I'm going to have to solve for 'P' (radius) at each point, and draw a LINE from degree to degree. Thus, my beginning radius would be the distance of A to B.
Thus, I'll start with A - B. Then I'll take the ratio of A - B (i.e 1.5) to solve for C. Then I'll divide the distance of B - C by 360 or 3600 (depending on how FINE I want the lines to be) and increment the radius by that quotient. Run it through a loop that increments the radius and extends the line...
Thanks Behemoth. It helps to discuss it with someone else to get a clear idea what needs to be done.
:)