[etoys-dev] (SQ-749) When you add a vertex to a polygon, the added vertex is at the same location as the another vertex and not visible until moved

Bert Freudenberg bert at freudenbergs.de
Thu Aug 12 05:02:34 EDT 2010

On 12.08.2010, at 10:32, Steve Thomas wrote:

> On Thu, Aug 12, 2010 at 3:32 AM, Bert Freudenberg <bert at freudenbergs.de> wrote:
>> This would likely be simple to implement, but could break existing projects. E.g. the morphing stuff in the showcase. Maybe you could take a look?
> Checked "Morphing" by Kazuhiro Abe and that should be fine. Each Polygon in the holder has the same number of vertices and the script simple changes the positions of the vertices one at a time.
> "The Walkers" and associated remixes by P.A. Dreyfus uses a special category "morphing" which would be great to get into Etoys (although I would suggest the addition of some way to show/manage the frames) to make the invisible more visible and to make it easier to create these kind of animations. Anyway, whether this would be a problem or not depends on how it is implemented.  If he stores complete information about the polygon in each frame, I see no problems. If he only stores differences and adds/removes/repositions each vertex that MAY cause a problem.
> Anyway if it is a simple change and you can make it, I think I can easily test the change by opening the project, then file-in the changes and see if anything breaks. Or you could also ask P.A. Dreyfus (master of polygon's and connectors) what he thinks as he knows and can check the changes against his implementation.
> Stephen

Thinking about this more I do not like the proposal. It would makes the system less predictable.

Having the new vertex remain at the same position is the only sensible choice. It matches the "copy" behavior of regular objects, which also appear in the same position. It would not scale anyway - see this image where I only inserted 4 vertices. The position quickly converges to the next vertex position.

-------------- n?chster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : PastedGraphic-3.png
Dateityp    : image/png
Dateigröße  : 2336 bytes
Beschreibung: nicht verfügbar
URL         : <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20100812/54b78dc3/attachment.png>
-------------- n?chster Teil --------------

Also, I'd argue that "add a vertex at beginning" and "add a vertex at end" tiles are not needed in the first place. To be useful they would, as you noticed, have to be "set cursor to beginning and insert vertex" and "set cursor to end and insert vertex", because otherwise one cannot assign their position immediately. But that makes them perform two operations that are available separately. There is no good reason to coalesce those steps into one.

In any case, inserting a vertex should not change the cursor. If you want a cursor change to occur, insert a tile.

So my counter-proposal is: remove the "add vertex at beginning" and "add vertex at end" tiles. (to not break existing projects, the tiles would only be hidden)

- Bert -

More information about the etoys-dev mailing list