steps to an ecology of lollipops

This commit is contained in:
Paul Davis 2023-01-10 21:41:47 -07:00
parent 52f10ad2a8
commit 4bafadc419
9 changed files with 248 additions and 7 deletions

View file

@ -120,6 +120,32 @@ Lollipop::set_x (Coord x)
}
}
void
Lollipop::set_length (Coord len)
{
if (_points[1].y != _points[0].y - len) {
begin_change ();
_points[1].y = _points[0].y - len;
end_change ();
}
}
void
Lollipop::set (Duple const & d, Coord l, Coord r)
{
begin_change ();
_points[0].x = d.x;
_points[1].x = d.x;
_points[0].y = d.y;
_points[1].y = _points[0].y - l;
_radius = r;
end_change ();
}
bool
Lollipop::covers (Duple const & point) const
{