Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
trying to push
  • Loading branch information
jrb10014 committed Dec 9, 2015
1 parent d73800f commit 65e21f2
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions main/Face.pde
Expand Up @@ -9,11 +9,32 @@ public class Face {
innerComponents = CompGeo.findFriends(outerComponent, points);
}


public void daColoring(int r, int g, int b, PointList pl, float x, float y) {
Point p = null;
stroke(r,g,b);
for (int i = 0; i < (int)x; i++) {
for (int j = 0; j < (int)y; j++) {
float minX = 0;
float maxX = x;
float minY = 0;
float maxY = y;
if (outerComponent != null) {
Point p;
minX = outerComponent.getOrigin().getX();
maxX = outerComponent.getOrigin().getX();
minY = outerComponent.getOrigin().getY();
maxY = outerComponent.getOrigin().getY();
HalfEdge temp = outerComponent.getnext();
while (temp != outerComponent) {
p = temp.getOrigin();
if (p.getX() < minX) { minX = p.getX(); }
if (p.getX() > maxX) { maxX = p.getX(); }
if (p.getY() < minY) { minY = p.getY(); }
if (p.getY() > maxY) { maxY = p.getY(); }
temp = temp.getnext();
}
}
for (int i = minX; i < (int)maxX; i++) {
for (int j = minY; j < (int)maxY; j++) {
p = new Point(i, j);
if (inSpecificFace(p, pl)) {
point(i,j);
Expand Down

0 comments on commit 65e21f2

Please sign in to comment.