[plt-scheme] Re: stars in image teachpack

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu Feb 28 12:47:50 EST 2008

On Thu, Feb 28, 2008 at 11:03 AM, David Van Horn
<dvanhorn at cs.brandeis.edu> wrote:
> Robby Findler wrote:
>  > But a 3 pointed star is just a triangle (unless the sizes are the
>  > same, in which case it is a hexagon, as you point out).
>
>  No, a 3 pointed star has 6 sides.  You can remove the input checking and
>  try:
>
>     (star 3 30 5 'outline 'red)
>
>  Or just think of the Mercedes-Benz logo -- it's a three pointed star.

Oh, right! Of course. Silly me. (I tested poorly and didn't think ...)

>
>  > How about I just add a regular polygon function?
>
>  That would be fine with me, but like I said, I think the concept of
>  3-pointed star is completely sensible.
>
>  Also, I think this is a bug:
>
>     (image-width (star 4 30 5 'outline 'red))
>  => 62
>
>  I expected 60, analogous to:
>
>     (image-width (circle 30 'outline 'red))
>  => 60
>

Yes, I can see how that happens, and it appears to be a bug to me too.

I've fixed these two bugs in SVN, and I've added a regular-polygon
function, but I couldn't find the documentation so I'll update the
docs in a bit.

Robby


Posted on the users mailing list.