Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You could use an Interval object. An interval is an arc of the circle between two of the original, immovable points.</p> <p>The following is just pseudo-code. Don't expect it to run anywhere.</p> <pre><code>class Interval { private length; private point_count; constructor(length) { this.length = length; this.point_count = 0; } public add_point() { this.point_count++; } public length() { return this.length; } // The current length of each sub-interval public sub_length() { return this.length / (this.point_count + 1); } // The sub-interval length if you were to add another point public next_sub_length() { return this.length / (this.point_count + 2); } public point_count() { return this.point_count; } } </code></pre> <p>Create a list of these objects corresponding to the intervals between points on your circle. Each time you add a point, select the interval with the largest next_sub_length(). When you're done, it won't be hard to reconstruct the new circle.</p> <p>This should give you the spacing with the the largest possible minimum interval. That is, if you score a solution by the length of its smallest interval, this will give you the highest score possible. I think that's what you've been shooting for.</p> <p><strong>Edit:</strong> Just realized that you specifically asked about this in Python. I'm quite a Python n00b, but you should be able to convert this to a Python object easily enough, though you won't need the getters, since everything in Python is public.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload