|
|
On 3/3/2011 12:36 PM, Warp wrote:
>
> There are two possibilities:
>
> 1) All the point masses have the same mass (ie. the total mass of the
> torus divided by the number of points) and are distributed evenly inside
> the torus. This is a bit problematic because coming up with an even
> distribution of points inside a torus is not easy. Basically it would
> mean that you would have to divide the torus into polyhedrons of the
> same volume, and put the point masses at their center. However, subdividing
> a torus into polyhedrons of the same volume is not trivial.
If the torus isn't too `skinny' you could just uniformly sample a bunch
of points from its bounding box and retain only those which lie inside
the torus. You could also run marching cubes on it and put a point mass
at the center of each cube, scaling the mass of the points in the `edge'
cubes by the volume of the polyhedron which is inside the torus.
> 2) Instead, we subdivide the torus into polyhedrons of arbitrary size
> and scale the mass of the points in relation to the volume of the polyhedron.
> (In other words, the masses are scaled according to the local point
> density.)
How about you sample uniformly from a circle (either randomly or in a
grid). For each such sample you then create n points in a ring around
the torus' axis, where the mass of the each point is set proportionally
to the circumference of the ring?
Post a reply to this message
|
|