Thus spake "Robby" <robbykr...@gmail.com> on 2/13/16 2:29 PM:

>Hello all,
>
>a problem I'm trying to solve: what data structure to use to represent an
>origami crease pattern in code
>
>Graph - where I initially landed, but I can't seem to find a kind of graph
>that depends on the vertices having a location in space, and my graph
>class
>is quickly growing into a monstrous form since I'm calculating things like
>the angle between two adjacent edges on a vertex. Does this kind of graph
>have a name? Is there a formal approach to building what I'm trying to
>build?

You could do worse than adopt the model used in Oripa (with the side
benefit that it would be easy to make your project I/O compatible):

http://mitani.cs.tsukuba.ac.jp/oripa/

Oripa is a Java app. Since it's open source, you might even be able to
build your thingamajig on top of it and reuse code.

If you're into C++, you could use the model that TreeMaker uses for crease
patterns:

http://langorigami.com/article/treemaker

And if Mathematica is your thing, there's Tessellatica, which has TGraph
and TGraph3D objects for representing crease patterns and their folded
forms:

http://langorigami.com/article/tessellatica

More generally, a useful way to represent a CP is to have Vertices,
Creases, and Polygon objects, where:

-- a Vertex is an object with x and y coordinates and a list of pointers
to its incident creases;
-- a Crease is an object with pointers to its endpoint Vertices and
pointers to the 1 or 2 incident Polygons;
-- a Polygon is an object with points to its incident Creases (and it's
also useful to maintain the corresponding list of its incident Vertices).

Of course, it's helpful to add additional objects and methods to
interrogate the relationships between the objects, cache useful
information, etc.

And even more broadly, if you start a Google search for "computational
geometry library <your-language>", you'll find stuff useful for
representing and manipulating planar graphs (which is what CPs are, at
least, from Euclidean paper).

HTH,

Robert


Reply via email to