Wikipedia:Reference desk/Archives/Mathematics/2007 February 10

= February 10 =

how do you add a topic?
How do you add a topic00:39, 10 February 2007 (UTC)Swanback


 * If by that, you mean how do you create a new article, see: Your first article. In futurem questions regarding how to use wikipedia should be asked on the help desk. - Akamad 14:31, 10 February 2007 (UTC)

Calculation of chances of spherical spawn
I have a problem.

Envision a gate in space, through which spaceships come. The gate is a sphere 2,5km in radius. At the end of this radius, distance is measured (so that two entities on opposite sides of the gate are both 0km from the gate, but 5km from each other). Now, a spaceship coming through the gate will spawn 12km away from the gatesphere, completely randomly across the 'surface' of this spawn-sphere. I have an X number of ships, for this sake let us say 10 ships, and these can fire up to 10km away, spherically of course. My question really, is how do I place these ships to have the BEST statistical coverage, with the most chance of trapping the enemy spaceship which spawns on the spawnsphere?

I can make them orbit the gatesphere at a distance of 10 or 15km. While this penalizes them - their own attack-sphere not being used to its full potential - it is not that alone, which makes me not want to solve my problem through this alternative. It is much rather that by placing my ships statically and according to formulas, I should be able to cover much more, whereas a random, uncoordinated orbit of all my ships will.. well, their attack-spheres will meet each other, overlap, and thus greatly penalize me.

Thank you for all help! 81.93.102.185 16:26, 10 February 2007 (UTC)


 * There's not really a rigorous way for spacing points evenly on a sphere, unless you've got a number of points that matches a particular platonic solid. Fairly good solutions can be approximated in various ways, such as starting with random points and incrementally repelling them from each other. I've heard also of starting with a spiral that wraps around a sphere and placing points evenly along that, or you could use spherical coordinates and divide things up by angle while accomodating for the smaller radius near the poles. - Rainwarrior 18:16, 10 February 2007 (UTC)


 * Yes, a spiral can do a reasonable job; one placement algorithm is
 * $$\begin{align}

z_0 &{}= \tfrac{1}{2 N} - 1 ; & \omega &{}= \pi \left( 3-\sqrt{5} \right) \\ k &{}= 0 \ldots N-1 \\ &&z &{}= z_0 + \tfrac{k}{N} \\ &&r &{}= \sqrt{1-z^2} \\ &&\phi &{}= \omega k \\ &&p_{k} &{}= (r \cos \phi, r \sin \phi, z) \end{align}$$
 * Saff &amp; Kuijlaars present another variation. An extended discussion of the topic kept by Dave Rusin covers a multitude of definitions and algorithms. --KSmrqT 22:38, 10 February 2007 (UTC)

Question..
 * Can you qualify a bit about the spawnsphere - is it the surface of a sphere 12km in radius or is it a volume that is represented by a sphere 14.5km in radius minus a 9.5 radius sphere in the middle? or something different?87.102.9.117 23:29, 10 February 2007 (UTC)
 * First of all, thank you for the help. Platonic solids seem to be a great way to cook up some points, since I really can't make much out of that placement algorithm! :) As for the QUESTION... By spawnsphere I mean the surface of the sphere which is 14.5km in radius - just to clear that up. 81.93.102.185 13:11, 11 February 2007 (UTC)
 * Platonic solids are pretty to look at, but have problems in this context. We only have five: tetrahedron (4 points), octahedron (6 points), cube (8 points), icosahedron (12 points), dodecahedron (20 points). Their geometric regularity does not imply maximum spacing: twist the top of a cube 45° and move the top and bottom points towards the equator to get more separation. Splitting faces to increase the number of points disrupts regularity.
 * Using a computer program, we can distribute points on a sphere and nudge them with repelling forces until they stabilize. This is painfully slow for large numbers of points.
 * If we study the results for inspiration, we see that — apart from an inevitable randomness — we may be able to approximate the pattern with a systematic spiral. Start near the South Pole. Place a point, then rise and turn a little. The rise is chosen to assure we place all the points, stopping near the North Pole. With a good choice of turn, we get a satisfactory pattern for large numbers of points. Each point is near its predecessor and successor, but also near points above and below it. The angle in the example code is based on the golden ratio, which is known to have nice properties for breaking up a circle. Try it for a few thousand points. --KSmrqT 22:49, 11 February 2007 (UTC)