I am trying to figure out your exact question, so to clarify:
On Wed, 1 Aug 2001, Jason Taylor wrote:
> There is a cube with 100*100*100 points in it.
I am trying to understand what exactly your domain is. Do you have
1,000,000 points randomly ditributed in 3-space? What is the cube exactly?
Just a bounding box for your points?
> There is a sphere with a radius of 15 points.
15 units, right?
> There is a list of x y z coord where the sphere has been.
> I want the volume of the sphere to have covered every point in the
> cube.
You have a set of 1,000,000 points, P. You want a set of points, S, such
that the distance between an element of S and at least one other element
of S is less than 12 (the maximum distance the sphere can move,) and the
distance between an element of P and at least one element of S is less
than 15 (the radius of the sphere.) Right?
Is your goal to minimize the size of S?
Elements of S do not necessarily have to be elements of P, right?
I am thinking that you could sort out the elements of P and likely save
yourself alot of computation. It would take a little more info about the
problem to suggest what would be the best way.
> int Sphere[S]{sx,sy,sz}
> int Cube[100][100][100]
>
> for x = 1 to 100
> for y = 1 to 100
> for z = 1 to 100
> for s = 1 to Sphere.length
> if (dist(x,y,z,sx,sy,sz)<=15) Cube[x][y][z]++
Looking at this to doesn't seem as though your points are randomly
distributed. I don't see why you would need to compute this at all.
Finding a minimum S is just stacking oranges in a box with a little
overlap to fill the spaces. You just do a line of sphere's the length of
the cube and then another next to it to cover the bottom. Offet the next
row by 3/4 ish the height of the sphere and 1/2 the width. Repeat until
you fill the box.
Even if that pattern doesn't fill the box (because the offsets would be
greater than 12) I am almost certain there will be a regualr pattern such
that it minimizes S.
Will
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".