0

I'm not a math proficient :) Therefore, I would like to ask for help.

I XY axis 180x180 (1 point has 6px) and I would need a function which is able to generate a broad spiral 2 points. Something in the way of the Milky Way. It could be a number of spirals apart, but only if it will not be unnecessarily complicated.

Thank you for your help. I tried to write some function alone but I just do not know how to calculate the cube ring.

PHP Generating of spiral position on X Y Axis

Pater SVK
  • 69
  • 6
  • It's quite unclear what you ask... What is the expected input and output? – Willem Van Onsem Dec 27 '14 at 14:59
  • 2
    With 1 minute of googeling I found out that this is called "Logarithmic spiral". I also found many code examples. So where exactly is the problem? – bitWorking Dec 27 '14 at 15:01
  • Create it is not a problem, but check all the points adjacent to the X axis Y. I have only positive axis. I do not know this spiral adjust my line. I would need to function genrerovanie when I enter (X) (Y), the start and end width of that generated in the spiral axis. Sorry for my English. – Pater SVK Dec 27 '14 at 15:36
  • @PaterSVK 1. draw an image of what your desired spiral should look like 2. add the source code 3. clarify the constraints. btw what do you mean by cube ring? or what line do you write about (your last comment does not make sense to me). If you have trouble translating from Slovak then comment me with SVK text and I will try to translate it but do not forget to add `@Spektre` to the start of comment so I will be notified ps `genrerovanie` should be `generovanie` :) good to see I am not the only one with typos – Spektre Jan 02 '15 at 10:40

1 Answers1

0

For a spiral search you can find this question interesting:Optimizing search through large list of lat/long coords to find match. You can change the sequence a bit to fit it.

Community
  • 1
  • 1
Micromega
  • 12,486
  • 7
  • 35
  • 72