|
-
Feb 7th, 2002, 11:30 AM
#1
Thread Starter
Junior Member
Someone has got to know this....
Postin means I'm desperate!
-
Feb 7th, 2002, 01:51 PM
#2
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
Code:
A
------
\ |
\ |
\ |
\ |
\ |
\ |
\|
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.
once you've grasped this, its a small step to increment this distance by a little bit every time, forming a spiral shape.
-
Feb 7th, 2002, 02:11 PM
#3
Thread Starter
Junior Member
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.
Postin means I'm desperate!
-
Feb 7th, 2002, 02:20 PM
#4
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.
-
Feb 7th, 2002, 03:42 PM
#5
Thread Starter
Junior Member
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.
Postin means I'm desperate!
-
Feb 7th, 2002, 03:51 PM
#6
Good Ol' Platypus
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.
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 7th, 2002, 03:53 PM
#7
Good Ol' Platypus
So... the end result you're after is something like this, or completely different............
All contents of the above post that aren't somebody elses are mine, not the property of some media corporation. 
(Just a heads-up)
-
Feb 7th, 2002, 04:23 PM
#8
Thread Starter
Junior Member
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.
Postin means I'm desperate!
-
Feb 7th, 2002, 05:16 PM
#9
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|