Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turtle-graphics extensions #250

Open
davidedc opened this issue Jun 19, 2015 · 9 comments
Open

Turtle-graphics extensions #250

davidedc opened this issue Jun 19, 2015 · 9 comments

Comments

@davidedc
Copy link
Owner

Preamble:

  • this is not going to change the grammar - so this will transparently work in lang v2 (modulo adding the keywords I guess, see below).
  • this is going to stay un-merged in a branch until we properly like it.

I'm going to add a couple of keywords like penUp and penDown and showTurtle and hideTurtle, forward, backward, turnRight, turnLeft (both in degrees), arc.

I'm also gonna add an "axes" keyword which is gonna draw the axes according to the world matrix when "axes" is called.

This spawned out of a maddening "what the heck should be the order of the transformations here" moment, where I realised that drawing the axes would make everything so much easier to understand... and finally realising what several tweets have pointed out already, that LCL can also be used as a 3d version of Logo...

If that can be done with a few new keywords then it'd look like a win...

If the mapping is as direct as it looks at first sight then I'm gonna try to flesh it out tonight...

(Let's see how it pans out, we can scrap if we don't like.)

@rumblesan
Copy link
Collaborator

this sounds like it could be hilarious haha. I'm all for it

@davidedc
Copy link
Owner Author

I've pushed it in dedicated branch and published in secret directory here:

http://livecodelab.net/play2.1/

Some examples:

I didn't add the penUp / penDown yet, and there are a couple of tweaks and questions...

There is an "axes" command not shown in the examples that draws the axes (with the world transformations applied when invoked)

...play around with it as you please, pass over interesting stuff or examples that you find or comments...

@davidedc
Copy link
Owner Author

🐢 🐢 🐢 🐢
screen shot 2015-06-21 at 11 11 36
screen shot 2015-06-21 at 11 12 16

@rumblesan
Copy link
Collaborator

hahaha, so this is really cool. will start having a play around

@rumblesan
Copy link
Collaborator

just a quick one, I think that axes command would be really useful in general. especially when teaching people

@davidedc
Copy link
Owner Author

indeed, that's how the rabbit hole started. I needed to see the axes, and then really one can see them as the current "cursor", or "pen" or "turtle"...

@davidedc
Copy link
Owner Author

🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢 🐢
screen shot 2015-06-21 at 12 49 10

@rumblesan
Copy link
Collaborator

hey, so I've rebased the changes you made for the turtle onto the new master branch and pushed it as a new branch. There were a couple of minor things I've fixed up but it seems to be working. Though I couldn't get it to actually draw the turtle, just a red line.

@davidedc
Copy link
Owner Author

ops might not have pushed the "turtle" change yet.

I'm concerned with the turtle being too cutesy for LCL. So I thought maybe, in addition to showTurtle/hideTurtle, there should be a showPen/hidePen.

because of the penUp/penDown keywords people would normally show the pen (it would look like an arrow I think), but the cutesy-inspired could show the turtle instead...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants