From: James Edward Gray II Date: 2006-12-08T05:55:20+09:00 Subject: Re: [SUMMARY] Turtle Graphics (#104) On Dec 7, 2006, at 10:56 AM, David Tran wrote: >> Most of those should be obvious implementations. The surprise, if >> any, comes >> from the fact that pen_down() puts a point on the track. This >> makes sense >> though, if you think about it. If you touch a pen to a piece of >> paper you have >> made a mark, even though you have not yet drawn a line. The >> Turtle should >> function the same way. > > Well, using this way, it may create "invalid" segment. > > By definition: > track ::= [segment, segment, ...] # drawing data > segment ::= [point, point, ...] # points to be joined by line > segments > point ::= [x, y] # pair of floats > > I was thinking a "no-empty" segment must have at least 2 points. Well a track with just one segment is legal so I assume a segment with just one point is fine too. The code provided with the quiz handles individual points, though it seems Morton and I took different approaches as to how to handle them. James Edward Gray II