Valid
	XHTML 1.1! Valid CSS!
Created 2003-01-04   Modified 2009-04-11
Chelton Evans

proj tri home

Intro
Source
Convexity and Polygon Representation in Algebra
Snapshots
TODO
Triangle and Tetrahedron Generalization

Intro

Is a point within a triangle? While a straight forward question, I was surprised with the issues it raised.

img01.png

Source

Files

Makefile
main.cpp
partitionstest.cpp
partitionstest.h
tetrahedrondraw.h
tetrahedronpartition.h
trianglepartition.h

msg.txt
projcompile.txt
unittestsreport.txt

Doxygen

main.cpp
Makefile
partitionstest
tetrahedrondraw
tetrahedronpartition
trianglepartition

Partitioning a plane is a generalization. A line is one instance of this generalization. A triangle is another. This concept also appears as a fundamental cornerstone in the mathematics of shapes.

Convexity and Shape Representation in Algebra

Shapes can be constructed as an AND and OR expression. General containers d2and and d2or do the job.

Snapshots

img07.png

Points inside a tetrahedron
$ ./main prog=6

img02.png

Circle subtracted from square
$ ./main prog=5

img06.png

$ ./main prog=4

img05.png

$ ./main prog=3

img04.png

$ ./main prog=2

img03.png

$ ./main prog=1

TODO

Partitioning the half-space

In 2D a line cuts the plane in half. In 3D the plane cuts space in half.

The testing for which side of the partition is on using vector algebra is exactly the same for 2D and 3D. Shift the cutter and point to the origin, dot product this with the cutters tangent.

Triangle and Tetrahedron Generalization

The tetrahedron is exactly the same as the triangle in the next higher dimension. They could both be viewed as generalized triangles.

For example the operation(partition) of inside a triangle corresponds with inside a tetrahedron.

The representations can be made similar. Let the edge have the same index as the point opposite it. In 3D this becomes let the face have the same index as the point opposite it.

In 1D the greater than operator partitions a line using a 0D point. In 2D the greater than operator generalizes to above a line and partitions a plane using a 1D line. In 3D the greater than operator generalizes above a plane and partitions the volume using a 2D plane. The cutter is one dimension less than the space it cuts in two.