[Edu-sig] xturtle online via processing.js !?

Andre Roberge andre.roberge at gmail.com
Sat Feb 28 17:50:29 CET 2009


On Sat, Feb 28, 2009 at 11:07 AM, Jurgis Pralgauskis
<jurgis.pralgauskis at gmail.com> wrote:
> Hey, thats cute :)
>

Thanks. :-)

> 1) I played around, and added Turtle.circle() to actions :)
> in code its called called circle_forward(self, radius, extent=None)
> and also aliased as circle
> you can find it http://files.akl.lt/users/jurgis/python/crunchy/
>
Looks nice.

> 1a) seems it would be best to use canvas interface methods,
> which are already in graphics module (according to DRY phylosophy)
> or at least decine upon method naming --
>  which just generate code vs those that pass it to exec_js plugin
>

I agree... this was (and still is) just an experiment.

> 1b) seems, like  polygons and filling also would not be a big problem
> https://developer.mozilla.org/en/Canvas_tutorial/Drawing_shapes#section_9
> for fill you'd just jave to collect the points and then repeat them
> with fill() at end
>
Agreed.

> 2) and also I'd like to make it convert all actions to javacript code at once
> then it would be easier to implement turtel_js and graphics in other
> projects --
> easily escaping crunchy :D

That's a good point.  However, the idea was to be able to control a
turtle from an interpreter, typing one instruction at a time and
seeing the result.

> As now for asinchronous update, the server and session must be up all the time
>
> 2a) then probably time.sleep would be also good to interface directly to js
> something like
> http://groups.google.co.in/group/phpguru/browse_thread/thread/8215dcdc2ac7321c
>
> 3) how is it related to server_root/reborg js experiments?
>

It's not - at least not for now.  The reeborg experiment is an very
early prototype of an implementation of rur-ple
(http://rur-ple.sourceforge.net) inside Crunchy.  You can see a
different version live at
http://reeborg.world.googlepages.com/reeborg.html

André

> so I'll try sth more tomorrow or in a week-time
>
> On Sat, Feb 28, 2009 at 2:18 AM, Andre Roberge <andre.roberge at gmail.com> wrote:
>> On Fri, Feb 27, 2009 at 6:06 PM, Jurgis Pralgauskis
>>> but one more thing is I'd like to let access xturtle functionality online
>>> - one possible way could be triggering tkinter to save its canvas to ps,
>>> and then convert them with imagemagic and show via web (animated gif or static)
>>
>> There's probably a better way: use the html canvas.  I tried to
>> implement a turtle module to be embedded with Crunchy
>> (http://code.google.com/p/crunchy) - it is available as a demo
>> experimental feature.  You could use this as a starting point if you
>> want.
>
> --
> Jurgis Pralgauskis
> Don't worry, be happy and make things better ;)
> http://sagemath.visiems.lt
>


More information about the Edu-sig mailing list