(lines, p1, p2)
| 70 | |
| 71 | stats = {'maxx': 0, 'maxy': 0, 'minx': 0, 'miny': 0} |
| 72 | def append_p(lines, p1, p2): |
| 73 | lines.append(p1[0]) |
| 74 | lines.append(p1[1]) |
| 75 | lines.append(0) |
| 76 | lines.append(p2[0]) |
| 77 | lines.append(p2[1]) |
| 78 | lines.append(0) |
| 79 | stats['maxy'] = max(p1[1], p2[1], stats['maxy']) |
| 80 | stats['miny'] = min(p1[1], p2[1], stats['miny']) |
| 81 | stats['maxx'] = max(p1[0], p2[0], stats['maxx']) |
| 82 | stats['minx'] = min(p1[0], p2[0], stats['minx']) |
| 83 | |
| 84 | def marching_squares(height_map, sq_threshold): |
| 85 | lines = array("d") |
no test coverage detected