Re: [rp-ml] Increasing the density of triangles in an STL file

From: steve (sjbaker1@airmail.net)
Date: Mon Dec 05 2005 - 03:12:24 EET


Adrian Bowyer wrote:

> If you wish to retain exactly the same geometric form, but to increase the
> number of triangles by a factor of 4 (i.e. to double the linear resolution),
> simply write a C++/Java/Python o.w.e. program that reads in an STL file and
> decomposes each triangle into 4 by splitting the three edges in half and
> joining those points to form an inverted triangle in the middle and three in
> the corners, then write all 4 new triangles out to the new STL file.

Well, yes - but what would be the point of that? We presume that
whatever it is that reads the STL file would be perfectly capable of
linearly interpolating across a triangle of any size.

The more useful thing to do is to DISPLACE those new points you've
just generated in some way.

> That's the decomposition that was used by all those old 1980's programs that
> generated fractal landscapes.

Indeed. Those programs used variations on the theme of random
displacement to make synthetically rough surfaces.

However, to make a better looking object you need to use the
displacement to do something like making a dodecahedron look
more like a sphere (or whatever your goal is).

To make a program do that, the program has to somehow guess what it is
that you wanted in the first place. You havn't given it the information
to do that - so the best it can do is some kind of global filtering to
get rid of sharp edges or something. That tends to be a rather blunt
instrument though - it'll make 12-sided prisms look more like cylinders
but it'll also round off the corners of an intentionally facetted
object.

It's important to know the limitations and to be very clear as to what
your objectives are.



This archive was generated by hypermail 2.1.7 : Mon Jan 02 2006 - 08:09:24 EET