[plt-scheme] Re: stars in image teachpack

From: David Van Horn (dvanhorn at cs.brandeis.edu)
Date: Thu Feb 28 12:03:18 EST 2008

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.

> 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

David



Posted on the users mailing list.