Thread: Help with making an algorithm

  1. #1
    Registered User
    Join Date
    Dec 2012
    Posts
    17

    Help with making an algorithm

    Hello I need help with making algorithm with the following:

    Let's say a 2d domain of space with xmax, xmin, ymin, ymax, with 'n~10,000' of points in the space.

    1. Go through lists of points positions.

    2. When there is maximum no,of points (lets say 10) in the box, the box split into 4 equal smaller boxes.

    3. Then check again if the each of the smaller box has more than maximum no. of points. it will split again into 4 equal smaller boxes.... until the box has less than the maximum no.of points per box.

    Any suggestions how I can make this algorithm? Please?

    Cheers!

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Go through a simplified example of it by hand, with paper and pen. Repeat a few times. Note the pattern you see. That's the same pattern your algorithm can use.

    It may seem rather silly, or even a ghastly waste of time, but you will benefit from it, if you do it SLOWLY, and note exactly what you're doing, step by step.

    Try that, and see what your muse will send your way.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Algorithm help
    By Sfel in forum C++ Programming
    Replies: 14
    Last Post: 12-10-2006, 05:27 AM
  2. search algorithm - making statistical decisions
    By Mario F. in forum C++ Programming
    Replies: 3
    Last Post: 11-18-2006, 10:03 AM
  3. Making an Algorithm repeat itself
    By mvd1212 in forum C Programming
    Replies: 13
    Last Post: 12-02-2005, 07:10 PM
  4. Replies: 2
    Last Post: 01-13-2003, 01:28 PM
  5. my grandfather's chess algorithm can beat your grandfather's chess algorithm...
    By doubleanti in forum A Brief History of Cprogramming.com
    Replies: 22
    Last Post: 08-17-2001, 06:52 PM

Tags for this Thread