POV-Ray : Newsgroups : povray.off-topic : Numerical approximation of the gravity of a torus : Re: Numerical approximation of the gravity of a torus Server Time
3 Sep 2024 11:22:42 EDT (-0400)
  Re: Numerical approximation of the gravity of a torus  
From: Warp
Date: 3 Mar 2011 21:25:13
Message: <4d704d88@news.povray.org>
Kevin Wampler <wam### [at] uwashingtonedu> wrote:
> 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.

  There's a minor problem with that approach which might skew the result
in some cases. Basically, you are dividing the torus into small cubes and
putting the points at the center of each cube. However, some of the cubes
are not cubes because they are cut by the surface of the torus. In these
cases the point masses do not correspond to the volumes of the clipped
cubes.

  (There's also the problem that some of the points will get too close
to the surface that way. If the location we are measuring the gravity
from happens to be too close to such a point, the result will be way too
high. In practice you have a small black hole near the surface of the
torus, and the test location is too close to it, skewing the result.)

> >    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?

  I think it's just easier to scale the point masses according to a simple
quadratic function. It's just the exact function I'm looking for.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.