math and galaxys

I'm working on a project where I am interested in generating a spiral galaxy in two dimensions, but making very slow progress so far. Basically, I need to develop a method of taking information such as:

How many stars

How many arms

Minimum distance stars can be apart

Maximum distance stars can be apart

Density (related to the previous two)

and turning it into an array of (x, y) values that, if graphically represented, take the shape of a classical spiral galaxy. The number of stars would be anywhere from 1,000 to 10,000 or so -- plenty for realistic results, I'd say. Has anyone seen anything like this out on the web? I have some ideas on how to get started, but my math (this sort of math, anyway) is pretty rusty and I'd hate to spend a lot of time re-solving this problem.

[835 byte] By [markuskidd] at [2007-9-27 13:59:53]
# 1

You might want to look into perlin noise and their applications in generated geometry. Basicly the idea is to use a predefined spiral image and then modulate the points ( stars ) based on a 2d or higher perlin noise function. Since perlin noise is a pseudo noise that "flows" you could use a 3d perlin nose function and your galaxy could "flow" through time ( ie the start move in a resonable manner ).

Cheers.

ericew at 2007-7-5 21:49:28 > top of Java-index,Other Topics,Java Game Development...