POV-Ray : Newsgroups : povray.general : Generating a mesh from points...? : Re: Generating a mesh from points...? Server Time
5 Aug 2024 14:18:36 EDT (-0400)
  Re: Generating a mesh from points...?  
From: John VanSickle
Date: 1 Sep 2002 15:36:03
Message: <3D726BFD.9C126391@hotmail.com>
Tim Nikias wrote:
> 
> I've implemented an electrostatic repulsion algorithm
> in order to distribute points on a sphere.
> Now I'd like to know how can easily convert the
> points into a mesh which has only triangles on the
> outside surface.
> I'd like it to work by selecting three closest points, make
> triangle, and then move on, creating triangles as need,
> until the entire area is covered.
> I could go about and simply connect all combinations of
> three points, but this is insane for point-amounts well
> above 200 (at the moment 500).

Brute force is an O(n^3) problem, so I can see how you'd want to
avoid that...

You could build three sets of indices, each of which sorts the points
according to the x, y, and z coordinates; then match only those that are
within a certain range along all three indices.

Regards,
John


Post a reply to this message

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