Logocraft (was Re: [squeak-dev] 3D points?)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Logocraft (was Re: [squeak-dev] 3D points?)

Casey Ransberger-2
Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in OpenQWAQ now that I think about it.

Is there a canonical MC repository for this code, or should I grab an Cobalt image and start filing stuff out?

Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing that would work, which is something like...

turtle
    penDown;
    turn: #west;
    go: 5;
    turn: #up;
    go: 1;
    turn: #east;
    go: 5

This is actually good enough to make procedurally generating relatively complex builds (e.g., a CPU) much less painful that even a map editor, but it doesn't feel like Logo at all. I haven't used Logo since childhood, but IIRC one would turn by degrees and these would be mapped onto pixel space. I *think* this is why I'm wanting a 3D Point, so I can map 3D points onto voxel space without reinventing the third dimension from scratch. 

This was a fun problem to think about: I tried to get #left and #right as valid params to the turn method, but wait! What does #left mean when the turtle is currently traveling up? Which has me now thinking in terms of roll/yaw/pitch. It's weird to think about.

I'm having a blast though. Thanks for doing the bindings, Bert!

On Wed, Feb 27, 2013 at 1:51 AM, Bert Freudenberg <[hidden email]> wrote:
On 27.02.2013, at 10:45, Bert Freudenberg <[hidden email]> wrote:

On 27.02.2013, at 05:54, Casey Ransberger <[hidden email]> wrote:

Is there a stand alone package that provides Point>>@ in Squeak? E.g., x@y@z.

Balloon3D-Math from


- Bert -

Ah, but Ron is right, using the one from Croquet would be better. 

- Bert -






--
Casey Ransberger


Reply | Threaded
Open this post in threaded view
|

Re: Logocraft (was Re: [squeak-dev] 3D points?)

Karl Ramberg


On Thu, Feb 28, 2013 at 2:04 AM, Casey Ransberger <[hidden email]> wrote:
Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in OpenQWAQ now that I think about it.

Is there a canonical MC repository for this code, or should I grab an Cobalt image and start filing stuff out?

Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing that would work, which is something like...

turtle
    penDown;
    turn: #west;
    go: 5;
    turn: #up;
    go: 1;
    turn: #east;
    go: 5

This is actually good enough to make procedurally generating relatively complex builds (e.g., a CPU) much less painful that even a map editor, but it doesn't feel like Logo at all. I haven't used Logo since childhood, but IIRC one would turn by degrees and these would be mapped onto pixel space. I *think* this is why I'm wanting a 3D Point, so I can map 3D points onto voxel space without reinventing the third dimension from scratch. 

This was a fun problem to think about: I tried to get #left and #right as valid params to the turn method, but wait! What does #left mean when the turtle is currently traveling up? Which has me now thinking in terms of roll/yaw/pitch. It's weird to think about.

I'm having a blast though. Thanks for doing the bindings, Bert!

On Wed, Feb 27, 2013 at 1:51 AM, Bert Freudenberg <[hidden email]> wrote:
On 27.02.2013, at 10:45, Bert Freudenberg <[hidden email]> wrote:

On 27.02.2013, at 05:54, Casey Ransberger <[hidden email]> wrote:

Is there a stand alone package that provides Point>>@ in Squeak? E.g., x@y@z.

Balloon3D-Math from


- Bert -

Ah, but Ron is right, using the one from Croquet would be better. 

- Bert -






--
Casey Ransberger






Reply | Threaded
Open this post in threaded view
|

Re: Logocraft (was Re: [squeak-dev] 3D points?)

Nikolay Suslov
In reply to this post by Casey Ransberger-2
Hello,

On Thu, Feb 28, 2013 at 5:04 AM, Casey Ransberger <[hidden email]> wrote:
Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in OpenQWAQ now that I think about it.

Is there a canonical MC repository for this code, or should I grab an Cobalt image and start filing stuff out?


As I know the latest 3DTransform package is avaliable at http://www.squeaksource.com/CroquetGL.html
OpenQwaq also contains it (http://www.squeaksource.com/openqwaq.html
 
Regards,
Nikolay

Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing that would work, which is something like...

turtle
    penDown;
    turn: #west;
    go: 5;
    turn: #up;
    go: 1;
    turn: #east;
    go: 5

This is actually good enough to make procedurally generating relatively complex builds (e.g., a CPU) much less painful that even a map editor, but it doesn't feel like Logo at all. I haven't used Logo since childhood, but IIRC one would turn by degrees and these would be mapped onto pixel space. I *think* this is why I'm wanting a 3D Point, so I can map 3D points onto voxel space without reinventing the third dimension from scratch. 

This was a fun problem to think about: I tried to get #left and #right as valid params to the turn method, but wait! What does #left mean when the turtle is currently traveling up? Which has me now thinking in terms of roll/yaw/pitch. It's weird to think about.

I'm having a blast though. Thanks for doing the bindings, Bert!

On Wed, Feb 27, 2013 at 1:51 AM, Bert Freudenberg <[hidden email]> wrote:
On 27.02.2013, at 10:45, Bert Freudenberg <[hidden email]> wrote:

On 27.02.2013, at 05:54, Casey Ransberger <[hidden email]> wrote:

Is there a stand alone package that provides Point>>@ in Squeak? E.g., x@y@z.

Balloon3D-Math from


- Bert -

Ah, but Ron is right, using the one from Croquet would be better. 

- Bert -






--
Casey Ransberger






Reply | Threaded
Open this post in threaded view
|

Re: Logocraft (was Re: [squeak-dev] 3D points?)

Frank Shearar-3
In reply to this post by Casey Ransberger-2
On 28 February 2013 01:04, Casey Ransberger <[hidden email]> wrote:

> Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in
> OpenQWAQ now that I think about it.
>
> Is there a canonical MC repository for this code, or should I grab an Cobalt
> image and start filing stuff out?
>
> Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing
> that would work, which is something like...
>
> turtle
>     penDown;
>     turn: #west;
>     go: 5;
>     turn: #up;
>     go: 1;
>     turn: #east;
>     go: 5
>
> This is actually good enough to make procedurally generating relatively
> complex builds (e.g., a CPU) much less painful that even a map editor, but
> it doesn't feel like Logo at all. I haven't used Logo since childhood, but
> IIRC one would turn by degrees and these would be mapped onto pixel space. I
> *think* this is why I'm wanting a 3D Point, so I can map 3D points onto
> voxel space without reinventing the third dimension from scratch.
>
> This was a fun problem to think about: I tried to get #left and #right as
> valid params to the turn method, but wait! What does #left mean when the
> turtle is currently traveling up? Which has me now thinking in terms of
> roll/yaw/pitch. It's weird to think about.

Yep, that makes sense, given Logo's differential-geometry-ness.
#left/#right are, of course, yaw: 'left a bit, up a bit, ok fly like
that. down a bit, right a bit.' Have you heard of the TNB frame at
all? The torsion/normal/binormal frame. Might help in getting yourself
inside the turtle.

frank

> I'm having a blast though. Thanks for doing the bindings, Bert!
>
> On Wed, Feb 27, 2013 at 1:51 AM, Bert Freudenberg <[hidden email]>
> wrote:
>>
>> On 27.02.2013, at 10:45, Bert Freudenberg <[hidden email]> wrote:
>>
>> On 27.02.2013, at 05:54, Casey Ransberger <[hidden email]>
>> wrote:
>>
>> Is there a stand alone package that provides Point>>@ in Squeak? E.g.,
>> x@y@z.
>>
>>
>> Balloon3D-Math from
>>
>> http://www.squeaksource.com/Balloon3D/
>>
>> - Bert -
>>
>>
>> Ah, but Ron is right, using the one from Croquet would be better.
>>
>> - Bert -
>>
>>
>>
>
>
>
> --
> Casey Ransberger
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Logocraft (was Re: [squeak-dev] 3D points?)

Bert Freudenberg

On 2013-02-28, at 08:38, Frank Shearar <[hidden email]> wrote:

> On 28 February 2013 01:04, Casey Ransberger <[hidden email]> wrote:
>> Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in
>> OpenQWAQ now that I think about it.
>>
>> Is there a canonical MC repository for this code, or should I grab an Cobalt
>> image and start filing stuff out?
>>
>> Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing
>> that would work, which is something like...
>>
>> turtle
>>    penDown;
>>    turn: #west;
>>    go: 5;
>>    turn: #up;
>>    go: 1;
>>    turn: #east;
>>    go: 5
>>
>> This is actually good enough to make procedurally generating relatively
>> complex builds (e.g., a CPU) much less painful that even a map editor, but
>> it doesn't feel like Logo at all. I haven't used Logo since childhood, but
>> IIRC one would turn by degrees and these would be mapped onto pixel space. I
>> *think* this is why I'm wanting a 3D Point, so I can map 3D points onto
>> voxel space without reinventing the third dimension from scratch.
>>
>> This was a fun problem to think about: I tried to get #left and #right as
>> valid params to the turn method, but wait! What does #left mean when the
>> turtle is currently traveling up? Which has me now thinking in terms of
>> roll/yaw/pitch. It's weird to think about.
>
> Yep, that makes sense, given Logo's differential-geometry-ness.
> #left/#right are, of course, yaw: 'left a bit, up a bit, ok fly like
> that. down a bit, right a bit.' Have you heard of the TNB frame at
> all? The torsion/normal/binormal frame. Might help in getting yourself
> inside the turtle.
>
> frank

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 :)

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".

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: Logocraft (was Re: [squeak-dev] 3D points?)

Casey Ransberger-2
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!

On Thu, Feb 28, 2013 at 9:59 AM, Bert Freudenberg <[hidden email]> wrote:

On 2013-02-28, at 08:38, Frank Shearar <[hidden email]> wrote:

> On 28 February 2013 01:04, Casey Ransberger <[hidden email]> wrote:
>> Vector3D is totally it. I knew I'd seen it x@y@z somewhere, which was in
>> OpenQWAQ now that I think about it.
>>
>> Is there a canonical MC repository for this code, or should I grab an Cobalt
>> image and start filing stuff out?
>>
>> Eeep! I'm a step closer to Logo in Minecraft :D I did the simplest thing
>> that would work, which is something like...
>>
>> turtle
>>    penDown;
>>    turn: #west;
>>    go: 5;
>>    turn: #up;
>>    go: 1;
>>    turn: #east;
>>    go: 5
>>
>> This is actually good enough to make procedurally generating relatively
>> complex builds (e.g., a CPU) much less painful that even a map editor, but
>> it doesn't feel like Logo at all. I haven't used Logo since childhood, but
>> IIRC one would turn by degrees and these would be mapped onto pixel space. I
>> *think* this is why I'm wanting a 3D Point, so I can map 3D points onto
>> voxel space without reinventing the third dimension from scratch.
>>
>> This was a fun problem to think about: I tried to get #left and #right as
>> valid params to the turn method, but wait! What does #left mean when the
>> turtle is currently traveling up? Which has me now thinking in terms of
>> roll/yaw/pitch. It's weird to think about.
>
> Yep, that makes sense, given Logo's differential-geometry-ness.
> #left/#right are, of course, yaw: 'left a bit, up a bit, ok fly like
> that. down a bit, right a bit.' Have you heard of the TNB frame at
> all? The torsion/normal/binormal frame. Might help in getting yourself
> inside the turtle.
>
> frank

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 :)

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".

- Bert -






--
Casey Ransberger