Squeak Class Documentation category index | class index  
 
Subdivision
  category: Graphics-Tools-Triangulation
  superclass: Object
  subclasses: PoohSubdivision

I perform (constraint) delauney triangulations on a set of points. See my class side for examples.

instance methods
  accessing
  edges
faces
outlineThreshold
outlineThreshold:
points:
startingEdge

  constraints
  assureEdgeFrom:to:lastEdge:
constraintOutline:
insertEdgeFrom:to:lastEdge:
insertSpine
markExteriorEdges

  initialize-release
  p1:p2:p3:
withSize:

  private
  debugDraw
edgesDo:
innerTriangleEdgesDo:
innerTriangleVerticesDo:
innerTriangles
quadEdgeClass
trianglesDo:

  triangulation
  insertPoint:
insideCircle:with:with:with:
locatePoint:
splice:with:
triArea:with:with:

class methods
  examples
  example1
example2
example3
example4
exampleDraw:points:

  instance creation
  constraintOutline:
points:
withSize:

instance methods
  accessing top  
 

edges

Return the triangulation edges


 

faces

Construct and return triangles


 

outlineThreshold

Return the current outline threshold.
The outline threshold determines when to stop recursive
subdivision of outline edges in the case of non-simple
(that is self-intersecting) polygons.


 

outlineThreshold:

Set the current outline threshold.
The outline threshold determines when to stop recursive
subdivision of outline edges in the case of non-simple
(that is self-intersecting) polygons.


 

points:


 

startingEdge


  constraints top  
 

assureEdgeFrom:to:lastEdge:

Find and return the edge connecting nextPt and lastPt.
lastEdge starts at lastPt so we can simply run around all
the edges at lastPt and find one that ends in nextPt.
If none is found, subdivide between lastPt and nextPt.


 

constraintOutline:

Make sure all line segments in the given closed outline appear in the triangulation.


 

insertEdgeFrom:to:lastEdge:


 

insertSpine


 

markExteriorEdges

Recursively flag all edges that are known to be exterior edges.
If the outline shape is not simple this may result in marking all edges.


  initialize-release top  
 

p1:p2:p3:


 

withSize:


  private top  
 

debugDraw


 

edgesDo:


 

innerTriangleEdgesDo:


 

innerTriangleVerticesDo:


 

innerTriangles


 

quadEdgeClass


 

trianglesDo:

Return the full triangulation of the receiver


  triangulation top  
 

insertPoint:

Inserts a new point into a subdivision representing a Delaunay
triangulation, and fixes the affected edges so that the result
is still a Delaunay triangulation. This is based on the
pseudocode from Guibas and Stolfi (1985) p.120, with slight
modifications and a bug fix.


 

insideCircle:with:with:with:

Returns TRUE if the point d is inside the circle defined by the
points a, b, c. See Guibas and Stolfi (1985) p.107.


 

locatePoint:

Returns an edge e, s.t. either x is on e, or e is an edge of
a triangle containing x. The search starts from startingEdge
and proceeds in the general direction of x. Based on the
pseudocode in Guibas and Stolfi (1985) p.121.


 

splice:with:


 

triArea:with:with:

Returns twice the area of the oriented triangle (a, b, c), i.e., the
area is positive if the triangle is oriented counterclockwise.


class methods
  examples top  
 

example1

Subdivision example1


 

example2

Subdivision example2


 

example3

Subdivision example3


 

example4

Subdivision example4


 

exampleDraw:points:


  instance creation top  
 

constraintOutline:


 

points:


 

withSize: