[Etoys] stars, polygons, repairs and getting them accepted

Jerome Peace peace_the_dreamer at yahoo.com
Tue Mar 3 20:46:25 EST 2009

Hi Yoshiki,

When I did star repairs and enhancements. I did so w/o first thinking about etoys vocabulary.

Everything I did for the user was focused on direct manipulation with handles and menu commands.

I started with an idea that I should keep from introducing iVars where ever I could use existing data.

That lead me to the idea of polygons and starts having a control edge. The first and last points of the polygon.

For stars the first point becomes the outer handle and determines the outer radius.

The last point determines the inner radius. To avoid keeping separate track of the number of points on a star I just used the size 
of the vertices. This had the advantage of having one and only one authourative source of information.
Nothing could get out of sync because you could always find out what you needed to know from the vertices.

When the star had an odd number of vertices the only things this scheme allowed were that the first and last points had to have equal radius.

And when I first started out this seemed like a good idea because it gave me all the regular polygons as well as stars.

As things developed however, I figured out how to calculate the skip ratios. Then I had two ways to make regular polygons.
Stars with and odd number of vertices or stars with twice as many vertices and a skip of two.

Eventually, I realized that the second way was better. It divided the problem in half without losing the ability to have regular polygons shapes.

I no longer had to explain how to go from the odd to even state of vertices for stars.

And I removed the commands to add or subtract just one vertex.

The changeset OLPC Etoys went with apparently was either from before that change or maybe the change snuck back in.

When Hayashi-san added the vocabulary to stars to setVertexCount he was unaware of my later decisions.

I hope if he had been he would have realized that refering to starPoints rather than vertexCount would have been prefered.
It keeps the concept of stars much clearer. Makes teaching it much simpler. And avoids the problems of trying to decide what to 
do when asked to assign odd numbers to control the number of star points.


When programming I have always felt on a journey. While destination always  satisfies the need for taking the journey, it is often different than where I thought I would get when I started out. Part of the fun has always been the learning the difference.

With all my repairs I am journeying to reach a squeak that is more elegant, more bug free, and more unrestrained in its abilities.
The bugs are easy to find. Good repairs somewhat harder. The hardest thing for me after I discover them, however, is to gain the favor of those who have the ability to harvest and distribute them.

I have more to say on this both specifically and generally but this is enough for now.

Would you help me by letting me know what would make you more inclined to use my fixes?

Yours in curiosity and service, --Jerome Peace


More information about the Etoys mailing list