Questions tagged [spiral]

A spiral is a two- or three-dimensional shape composed of lines which continuously wrap around a center point. The spiral model is an iterative software development methodology, in which each iteration builds upon previous work.

202 questions
3
votes
0 answers

How to get co-ordinate from spiral

Lets say I have a spiral like so 8 1-2 | | | 7 0 3 | | 6-5-4 Which continues to go on to infinity round and round. In terms of co-ords: 0 at (0, 0), 1 at (0, 1), 2 at (1, 1), 3 at (1, 0), 4 at (1, -1), 5 at (0, -1), 6 at (-1, -1), 7 at (-1, 0), 8…
dangee1705
  • 3,445
  • 1
  • 21
  • 40
3
votes
2 answers

Simulating a logarithmic spiral galaxy in python

I am simulating a logarithmic spiral galaxy using python. Using the parametric equations, x= a*exp(b*theta)*cos(theta) and y= a*exp(b*theta)*sin(theta) I used numpy.random for getting the random distribution of stars. The sample code is given…
Athul R T
  • 130
  • 2
  • 11
3
votes
1 answer

Curve fitting with y points on repeated x positions (Galaxy Spiral arms)

I currently have a MATLAB program which takes RGB images of traced spiral arms from galaxies and selects the biggest arm component and plots only that. I have tried using matlab's built in curve fitting tool with smoothing spline to fit it and I…
Kyaw Swar
  • 33
  • 4
2
votes
5 answers

Creating outward spiral

I've been thinking about this and I just can't think of a way to fill in a matrix with an outward spiral, so that I can do the following: Turn this: 1 2 3 4 5 ... n To 21 22 23 24 25 26 20 07 08 09 10 27 19 06 01 02 11 28 18 05 04 03 12 29 17 16 15…
David Gomes
  • 5,644
  • 16
  • 60
  • 103
2
votes
1 answer

Image Spiral Pixel Search

I'm trying to figure out how to do a pixel (color) search from the center and out, in a spiral shape.. Not like the normal "left to right pixel search". So far i've made some simple x-y searches. Using standard PIL. But it was to slow. as the result…
b0bz
  • 2,140
  • 1
  • 27
  • 27
2
votes
2 answers

Replicating matrices outwards from a central point

I'm quite new to programming so am looking for some experts to nudge me in the right direction as I complete this exercise. I have used horzcat and vertcat to manually do this but I'm asking if anyone knows a simpler way. Matrix 1 is 18x18 and…
Tetra
  • 747
  • 2
  • 9
  • 15
2
votes
3 answers

Using spiral rule in command line argument

what is the difference between the below declarations? char *argv[]; and char *(argv[]); I think it is same according to spiral rule.
Rajesh
  • 336
  • 3
  • 13
2
votes
3 answers

Very interesting program of building pyramid

I have came across this very interesting program of printing numbers in pyramid. If n = 1 then print the following, 1 2 4 3 if n = 2 then print the following, 1 2 3 8 9 4 7 6 5 if n = 3 then print the following, 1 2 3 4 12 13 14 …
Umesh K
  • 13,436
  • 25
  • 87
  • 129
2
votes
2 answers

Filling the area between Archimedes spyrals with interpolated colours - Matplotlib

I want to plot various spirals like the ones shown in the Figure (one spiral inner the others). Let's say I have three spirals (S1, S2 and S3) and I want to fill the area between consecutive spirals, i.e. the area between S1 and S2, S2 and S3 and…
2
votes
1 answer

Generate particles for spiral galaxy in THREE.js

I would like to create a simple spiral galaxy using THREE.Points in THEE.js. I cannot figure out how to generate spiral arms. Is there any (not too difficult) way to do this? Here I created this fiddle. There is a flattened sphere but without…
Michal
  • 1,755
  • 3
  • 21
  • 53
2
votes
3 answers

Nested loops for creating a spiral shape pattern in c

I need to make a spiral pattern made of stars '*' using nested for loops. I managed to make outter lines, now I don't know how to repeat smaller swirls in the same place. What I should have: ********* * ******* * * * * * *** * * * * *…
dinis4
  • 29
  • 1
  • 4
2
votes
2 answers

Drawing a logarithmic spiral in three axes in Python

I try to draw a logarithmic spiral in the form of a spring in three axes. Using the parametric equations: x=a*exp(b*th)*cos(th) y=a*exp(b*th)*sin(th) Using the code: import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D import numpy as…
Tomasz Przemski
  • 1,127
  • 9
  • 29
2
votes
1 answer

Non square spiral matrix not printing correctly

I am having issues with this assignment I have. I am to print a spiral matrix which cannot be square, in other words the user should input the number of rows and columns. Console.Write("Enter n: "); int n =…
2
votes
2 answers

How am I incorrectly implementing this algorithms to sort a list of points in a spiral?

I'm trying to sort a list of points in a consistent spiral. The algorithms here are simply beyond me; see this jsbin for an example of what I'm doing. The graph you'll see should be as close to a spiral as possible, and currently isn't, even as…
Carlos Vergara
  • 657
  • 6
  • 19
2
votes
2 answers

How does one achieve a square spiral like the the Ulam spiral in Netlogo?

I spent the morning trying to find an easy function (x,y) -> n that would number the patches like this I was not successful. Do any of Y'all have any experience or suggestions?
King-Ink
  • 2,096
  • 12
  • 18
1 2
3
13 14