Algorithm to randomly generate 'spiral galaxy'

Posted on 2008-11-19
Last Modified: 2012-05-05
I'm trying to come up with an algorithm to randomly generate a spiral galaxy of stars.  Each star will be on a flat 2D plane of x,y coordinates.  This will be used in a computer game I'm making.

What would be my best route to generate this? Is there a type of fractal algorithm I could use somehow? Any thoughts?

Question by:Chumad
    LVL 84

    Accepted Solution

    LVL 73

    Expert Comment

    try using a few fractal ferns in rotation  If that ends up too full, or too symmetric you can tweak the algorithm to drop points randomly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Suggested Solutions

    Before You Read The Article Please make sure you understand these two concepts: Variable Scope ( and Property Visibility (  And to …
    Introduction Many of the most common information processing tasks require sorting data sets.  For example, you may want to find the largest or smallest value in a collection.  Or you may want to order the data set in numeric or alphabetical order. …
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now