POV-Ray : Newsgroups : povray.general : Mesh polygon reduction? : Re: Mesh polygon reduction? Server Time
7 Aug 2024 13:19:29 EDT (-0400)
  Re: Mesh polygon reduction?  
From: jarbee
Date: 2 Oct 2001 17:59:53
Message: <3bba38d9@news.povray.org>

news:3BB97204.8225FB8F@atosorigin.com...
> jarbee wrote:
> >

> > news:3BB18755.31FE7049@atosorigin.com...
> > > jarbee wrote:
> > > >
> > > > Meshes could also be interpolated from point density data using
(almost)
> > the
> > > > same algorithm.
> > >
> > > Please explain, I really have no clue what you are writing about.
> >
> > Well, OK - I'm writing about doing a hundred things with th one program.
Say
> > you had a 3d mesh made of 1000 polygons.
>
> That's not a lot (1000)...
>
> > Couldn't you use either the vertex
> > points, or the point at the centre of each polygon as input to a SOM,
>
> Please avoid using abbreviation when explaining things to poor brain like
> mine. I do not know what SOM is. Surface Of M... ???

SOM - Self Organising Map. Works by mapping n-dimensional input vectors to
an arbitary m-dimensional feature set.
Lets say I had a set of 3d points in space as the input vectors. Lets say I
had a 2-dimensional array of 3d vectors. Choose on input vector, find the
closest match to it in the array (in terms of euclidian distance). Move the
'winner' a bit towards the input vectors value, and move all vectors in the
neighborhood of the winner a bit closer too. Then pick another input vector,
and repeat the above steps. After a couple of thousand iterations, the
values in the 2-d array will now be a 'best fit' solution of the input
vectors. If you watch during the mapping process, it's like a flat sheet of
paper being slowly pulled up and around the 3d input points.

My idea isn't to create a professional quality polygon reduction technique,
or anything of the sort. The above algorithm is fairly simple to program. I
was basically looking for an easy way to reduce the number of triangles in a
mesh, with an expected loss of quality, so I could make paper models of some
of my simple meshes.

But the more I thought about this, the more I realised other things could be
done with it. Like anchoring certain points so they can't move. You could
add points to the input set, which aren't in the mesh, but act as 'control'
points by modifying the end result. You could wrap a sheet around 2 or more
mesh models thus creating a 'union' between them. Choose whether to map the
vertex points, or the centre points of the triangles. Map triangles to
n-sided polygons. Reduce/increase polygon count. Add randomness. Restrict
the minimum or maximum size of each triangle used.

There are algorithms specifically designed to do the above things. However,
I don't understand them all too well yet. But a Kohonen network is very easy
for me to program, and I like the thought of probability playing a role
:-)

The analogy I was thinking of is that of color quantization - which I have
used Kohonen networks for. It gives a smooth blended palette of colors which
works quite well. Quantizing a 24 bit image to 256 colors works very good,
but I'm also getting good results mapping to 16 or so colors. There is stuff
on the net about this but I can't remember the link. I was actually using
mine to map image colors to wool colors, to create cross-stitch patterns of
photos.

This is just an idea at the moment. Am I being too ambitious, or
thoughtless? Is there an obvious, easier way to accomplish this?

Dave.


Post a reply to this message

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