TheTome /
MathQuestionYou are on the archive wiki. The new wiki is here. Ok guys considering CLAW has some rather intellegent people that know WAY more about maths then I do I am in need of some help. This question is mathemtical in nature and as most of my friends know I struggle slightly in that depratment (but I did manage to pass MAM201H? last year therefore no more maths for me .. *does a litte dance*) Anyway back to the question. I have a range of numbers (lets say 0 to 34323) the range will almost always start at 0 and will differ where i ends (although it isn't infinte). So lets work with 0 to 10000. I need a way with which I can project that number range onto a surface of a sphere, but not only do that but distribute it with equal density across the surface (therefore the density will increase as the range becomes bigger). Now I just need to figure out a fairly fast way where I can just plug in a number from the range and it will return the co-ordinate of the point on the sphere ... be it in x,y,z or in any other way (two angles + distance from 0,0,0 etc). Please feel free to post a solution, make fun of my mathemtical ignorance or just correct what I have said. The first thing to realise is that it's important to define what you mean by evenly distributed. The only completely even distributions, in the sense that all points are equivalent and not confined to a single plane, are the five platonic solids. The best geometric definition of evenly distributed I've come up with is a follows: Consider any distribution of points on the sphere. Take the convex hull of the points (that is the convex polyhedron with the smallest volume which contains all the points). An even distribution of points is one which maximises the volume of this convex hull. Equivalently, you could maximise the surface are of the convex hull. What this definition effectively does is find the distribution of points whose convex hull best approximates the sphere. Now, you could write a program to implement the above definition - but it won't be fast. You'll be doing a non-linear maximisation problem where calculating the value of the function you have to maximise (i.e. the volume of the convex hull) is relatively computationally expensive. If you don't need the points to be evenly distributed in such a strict sense it's probably best to use a simple approximation which gives a roughly even distribution. The best I've come across is to position the points on evenly spaced parallel rings. I can code this for you if it's what you need. I might code it anyway because there are still some interesting things to work out (how far apart to put the rings and how many points to put on each ring). SynKronos also suggested placing the points evenly along a spiral which runs around the sphere from one pole to the other. There are a lot potholes lying waiting in this method. Choosing the wrong spiral (and there are a lot of wrong spirals) can give decidely non-even distributions. I also have a feeling (although I still need to check this) that no matter what spiral you choose, the points will always end up lying on a spiral which wraps around the sphere exactly once.
Ofcourse it will only wrap around once, but if you extend it (and bend it a bit) then it will wrap around as many times as you want. - InfernalRabbi_ :-) Yay, someone actually answered ... well I'm very grateful and have come to a similar conclusion as you ElfBoy that rings would be the way to go. The next question is how to work out how many points per ring as well as how many rings ... made any progress in that regard?. I need a rough approximation verse an exact one so the rings once again seem to make sense, if you work on it at all and get anything just post in here (as far as code goes C, C++, Java, Ruby, Python, PHP, ASP, VB or Pascal ... hell even Basis will do, whatever rocks your boat). |