# HG changeset patch # User Sascha L. Teichmann # Date 1538029463 -7200 # Node ID d43e61044ad88bb40436a03eb0e6195c804d6d3c # Parent 9f3a4a60dc04640f63ad310fa5971621c28ac153 Fill in last remaining corner cases in vertical triangle interpolation. diff -r 9f3a4a60dc04 -r d43e61044ad8 pkg/octree/vertex.go --- a/pkg/octree/vertex.go Thu Sep 27 08:15:28 2018 +0200 +++ b/pkg/octree/vertex.go Thu Sep 27 08:24:23 2018 +0200 @@ -498,9 +498,27 @@ out = append(out, t[i], t[j]) return out case !r1: - // TODO + if t1 < 0 { + // below first -> clip by first + lin := linear(t[i], t[j]) + out = append(out, t[i], lin(t2)) + } else { + // above second -> clip by second + lin := linear(t[i], t[j]) + out = append(out, lin(t2), t[j]) + } + return out case !r2: - // TODO + if t2 < 0 { + // below first -> clip by first + lin := linear(t[i], t[j]) + out = append(out, t[i], lin(t1)) + } else { + // above second -> clip by second + lin := linear(t[i], t[j]) + out = append(out, lin(t1), t[j]) + } + return out } case o1: