Re: VRML, STL and other animals

From: Anthony Martin (amartin@engr.csulb.edu)
Date: Thu Jan 11 1996 - 20:04:11 EET


On Thu, 11 Jan 1996, Joe DeGuglielmo wrote:
> >>Tony writes:
> >>> The surface normal at a vertex can be used to approximate a curved
> >>> surface using a planar facet. This is used for Phong and Gourad shading
> >>> to create a smooth-looking shaded model using a model with a relatively
> >>> small number of facets.
>
> >What I don't understand here is that this seems to be used to make your
> part look smooth on your screen, but what will each layer cross section look
> like? Are we not still working with the same facet that has been colored
> differently?

We aren't dealing with colors for rapid prototyping, but the same
techniques can be used to improve STL models. When a cross section is
taken from an STL file, normally only one line is created for each
facet. The line that is created is perpendicular to the normal of the
facet (projected onto the 2D plane). If you have the normal at each
vertex of the facet, you can get 2 normals for the cross section of the
facet. Given 2 normals and the endpoints, you can generate a curve from
that facet, rather than just a line. Of course, as Brock Rooney points
out, the curve that is generated isn't likely to be the exact curve that
the part originally had, but that information was lost when the mesh was
created. But by including the normals at the vertices when the mesh is
generated preserves some of the curvature information of the model, and
the regenerated curve will definitely be closer to the actual model than
a purely faceted surface.

This technique is how these programs that can "smooth" a mesh work. These
programs look at the surrounding facets and average the normals of these
facets to basically create a normal for each vertex (or edge). Then they
fit a curve (or surface) to the facet, then tesselate the surface to
produce additional facets. The problem with doing this is that if you
were trying to build for example, a cube, you would end up with a rounded
thing, maybe even a sphere depending on the surface that was fitted. To
solve this problem, a maximum angle between facets is specified by the
user. If the angle between 2 facets is greater than this, then it assumes
that there should be a sharp edge there. In the case of the cube, the
angle between facets is 90 degrees which would certainly exceed the
maximum allowable angle, so it wouldn't be smoothed.

The problem with doing this is that the result is only based on a
heuristic approach, rather than actual data. If vertex normal data is
include with the mesh when it is generated, you can do this smoothing and
be quite confident that the resulting model will very closely match the
actual model.

Tony.



This archive was generated by hypermail 2.1.2 : Tue Jun 05 2001 - 22:37:06 EEST