Lesson goal: Looking for rectangles
Previous:
Looking for right triangles |
Home | Next:
Guess your own trendline
Continuing to work with the set of $(x,y)$ points from
this lesson, and in the spirit of
this lesson let's look for a rectangle amongst the points.
A rectangle needs four points and four lines, with pairs of connecting lines being perpendicular.
Take a look at the goal below.
Now you try. Run the goal and see if Prolog finds a rectangle in the points.
Type your code here:
Oh no! The goal fails! (Prolog returns a false
.) Is there no rectangle amongst our points? (See the hint.)