Data update

This commit is contained in:
Ingy dot Net 2024-04-19 16:56:29 -07:00
parent 0df55f9f24
commit aec8ed51b6
1045 changed files with 18889 additions and 2777 deletions

View file

@ -9,8 +9,7 @@ void main() {
final lvlPolygons = basis0.map((pp) {
final (a, b) = pp;
final v = Point((b - a).y, (a - b).x);
final (c, d) = (a + v, b + v);
final e = (c + d + v) * 0.5;
final [c, d, e] = [a, b, (a + b + v) * 0.5].map((p) => p + v).toList();
basis.addAll([(c, e), (e, d)]);
return '<polygon points="${[a, c, e, d, c, d, b].expand((p) => [p.x, p.y]).join(' ')}"/>';
}).join('\n');

View file

@ -21,8 +21,7 @@ class TreePainter extends CustomPainter {
basis = [];
for (var (a, b) in basis0) {
final v = Offset((b - a).dy, (a - b).dx);
final (c, d) = (a + v, b + v);
final e = (c + d + v) / 2;
final [c, d, e] = [a, b, (a + b + v) / 2].map((p) => p + v).toList();
basis.addAll([(c, e), (e, d)]);
path.addPolygon([a, c, e, d, c, d, b], true);
}