[plt-scheme] Question about drawing to a dc<%> and intersection of shapes

From: Grant Rettke (grettke at acm.org)
Date: Mon Jan 26 00:26:29 EST 2009

Hi folks,

I've got a question about drawing to a dc<%>:

Suppose I've got a dc% that represents at 10x10 rectangle, and that I
want to draw a 3x3 ellipse at a random point, but only if the ellipse
doesn't intersect with any of the edges of the rectangle.

Is there an existing function to detect intersection of shapes? In
this case I guess it would be checking with 4 lines, one for each
edge, with the ellipse?

Best wishes,


Posted on the users mailing list.