Right. Like I said, it was the simplest thing that would work to be able to autobuild stuff using a Logo-like dialect. OTOH it can't really be exactly Logo, not exactly; Logo didn't have flying turtles!<br><br><div class="gmail_quote">
On Thu, Feb 28, 2013 at 9:59 AM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
On 2013-02-28, at 08:38, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>> wrote:<br>
<br>
> On 28 February 2013 01:04, Casey Ransberger <<a href="mailto:casey.obrien.r@gmail.com">casey.obrien.r@gmail.com</a>> wrote:<br>
>> Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in<br>
>> OpenQWAQ now that I think about it.<br>
>><br>
>> Is there a canonical MC repository for this code, or should I grab an Cobalt<br>
>> image and start filing stuff out?<br>
>><br>
>> Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing<br>
>> that would work, which is something like...<br>
>><br>
>> turtle<br>
>> penDown;<br>
>> turn: #west;<br>
>> go: 5;<br>
>> turn: #up;<br>
>> go: 1;<br>
>> turn: #east;<br>
>> go: 5<br>
>><br>
>> This is actually good enough to make procedurally generating relatively<br>
>> complex builds (e.g., a CPU) much less painful that even a map editor, but<br>
>> it doesn't feel like Logo at all. I haven't used Logo since childhood, but<br>
>> IIRC one would turn by degrees and these would be mapped onto pixel space. I<br>
>> *think* this is why I'm wanting a 3D Point, so I can map 3D points onto<br>
>> voxel space without reinventing the third dimension from scratch.<br>
>><br>
>> This was a fun problem to think about: I tried to get #left and #right as<br>
>> valid params to the turn method, but wait! What does #left mean when the<br>
>> turtle is currently traveling up? Which has me now thinking in terms of<br>
>> roll/yaw/pitch. It's weird to think about.<br>
><br>
> Yep, that makes sense, given Logo's differential-geometry-ness.<br>
> #left/#right are, of course, yaw: 'left a bit, up a bit, ok fly like<br>
> that. down a bit, right a bit.' Have you heard of the TNB frame at<br>
> all? The torsion/normal/binormal frame. Might help in getting yourself<br>
> inside the turtle.<br>
><br>
> frank<br>
<br>
</div></div>Yep. The most important thing about turtle graphics is that almost all turtle commands are relative to the turtle's position and direction. So instead of turning "west" and "east" absolutely, you should turn "left" and "right", and if you do 4 "up + go" in a row would have made a (square) looping. "Left" and "right" make total sense if you imagine being a turtle :)<br>
<br>
If it's just a "cursor" instead of a turtle, then using absolute directions would make sense. In that case "cursor goX: 5; goY: 5; goX: -5; goY: -5" would also draw an upright square. This might be more convenient in some cases, but you shouldn't call it "turtle".<br>
<span class="HOEnZb"><font color="#888888"><br>
- Bert -<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Casey Ransberger