added nazca heron model

This commit is contained in:
zzzzrrr 2009-08-11 12:53:50 -04:00
parent c4d577ec06
commit 2296bcc767
2 changed files with 1043 additions and 4 deletions

1037
data/nazca_heron.dat Normal file

File diff suppressed because it is too large Load Diff

View File

@ -169,6 +169,8 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
val pts = Array(point, node.point, node.next.point) val pts = Array(point, node.point, node.next.point)
val triangle = new Triangle(pts) val triangle = new Triangle(pts)
println(Util.orient2d(point, node.point, node.next.point))
mesh.map += triangle mesh.map += triangle
// Legalize // Legalize
@ -354,9 +356,9 @@ class CDT(val points: List[Point], val segments: List[Segment], iTriangle: Trian
} }
if(!P.isEmpty) { if(!P.isEmpty) {
val left = Util.orient2d(a, b, P(i)) > 0 val ccw = Util.orient2d(a, b, P(i)) > 0
val pB = if(left) P(i) else b val pB = if(ccw) P(i) else b
val pC = if(left) b else P(i) val pC = if(ccw) b else P(i)
val points = Array(a, pB, pC) val points = Array(a, pB, pC)
T += new Triangle(points) T += new Triangle(points)
mesh.map += T.last mesh.map += T.last