POV-Ray : Newsgroups : povray.programming : Programmng a Sparse Data Structure : Re: Programmng a Sparse Data Structure Server Time
28 Jul 2024 12:24:43 EDT (-0400)
  Re: Programmng a Sparse Data Structure  
From: Geoff Wedig
Date: 20 Jul 2001 08:35:58
Message: <3b5825ae@news.povray.org>
Scott Hill <sco### [at] innocentcom> wrote:

> "Geoff Wedig" <wed### [at] darwinepbicwruedu> wrote in message
> news:3b5453ba@news.povray.org...
>>
>> I'm working on a patch for POV, and I'd like to keep it in c, but I've
> come
>> up with a problem, namely, I don't really want to program a complex data
>> structure in c, but I need to.
>>

>     Hmm, I think there should be a way to simplify what your doing, to make
> it easier to code in c, but I can't get my head around what you're trying to
> achieve...

>     What do you mean by "edge counts from vertex to vertex" ?
>     What are you trying to achieve ?

Ok, a mesh is a set of vertices, and triangles connectting triples of those
vertices.  Each triangle can be seen as a set of three edges, or pairs of
vertices connected by the edge of the triangle, making the system a basic
undirected graph.  Now, since triangles share edges, some vertex pairs share
multiple edges.  I am testing to see if the mesh can be regarded as a sheet,
that there is a universal up and down that can be defined so that we can
calculate the normal at each point based upon the triangles at that point. 
Meshes where a pair share more than two edges (a pinwheel sort of thing
perhaps), and/or meshes where a universal sidedness can't be defined (mobius
strips) make for difficulties in automatically generating normals without
splitting single points into multiple ones.

Geoff


Post a reply to this message

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