Re: [IAEP] using the insert function block in turtle art

2009-02-08 Thread Bert Freudenberg

On 07.02.2009, at 14:13, Paul Schulz wrote:

 - Is there another application I could use?

Did you try Etoys? It's the shooting star icon.

- Bert -


___
IAEP -- It's An Education Project (not a laptop project!)
IAEP@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep


Re: [IAEP] using the insert function block in turtle art

2009-02-07 Thread Paul Schulz
Hi Everyone..

On Sat, Feb 7, 2009 at 10:27 PM, Bill Kerr billk...@gmail.com wrote:
 http://tonyforster.blogspot.com/2009/02/using-insert-function-block-in.html

 Tony Forster has used Walter's new insert function block in turtle art to
 program an analog clock

I have been playing with TurtleArt with the aim of producing some
physical 2D models of forces on an object (the turtle).

I have had some initial success:
- with x and y velocity being stored in box1 and box2
 ..constant force problems can be done. eg.
  * projectile turtle
  * charged turtle in a constant electic field
 ..1D position related forces
  * bouncing turtle

I would like to model inverse square law motion as well (turtle in
space) but I hit a couple of problems.

1) I need 'braces' or I need to know more about the way that TurtleArt
calculates expressions..

eg. To calculate the new velocity I need something like..

 new_vx = old_vx - constant * xpos / (xpos *xpos + ypos * ypos )

but I don't have braces '(', to delimit the denominator, and I am
already using box1 and box2 to hold the existing velocity components.

2) I though I could get away without it, but I also need the
'sqrt' (square root) function.

Also...

As I'm not actually using the turtle to drew... I am using the 'moveto' the new
location, I have to 'wiggle' the turtle (move forward and back) to make a mark.

- Is there another application I could use?
- How do I pull out my 'program' from sugar on my XO, for saving and sharing.

Any help would be appreciated..

Cheers,
Paul
paul at mawsonlakes.org

 ___
 IAEP -- It's An Education Project (not a laptop project!)
 IAEP@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep

___
IAEP -- It's An Education Project (not a laptop project!)
IAEP@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep


Re: [IAEP] using the insert function block in turtle art

2009-02-07 Thread Walter Bender
Which version of Turtle Art are you using? If you use the experimental
fork, TurtleArtPortfolio, I think you'll find that the math functions
are a bit more deterministic. Also, you can define as many variables
and procedures as you'd like.
(http://sugarlabs.org/wiki/images/7/78/TurtleArtPortfolio-12.xo)

You may also want to look at Tony's blog
(http://tonyforster.blogspot.com/2009/02/using-insert-function-block-in.html)
regarding defining functions on the fly.

FInally, there is a largely undocumented feature that allows you to
program the action of a block using Pippy. Try editing tamyblock.py
(you'll find it in the Journal after you have first run
TurtleArtPortfolio). Edit it in Pippy and then import it back into
TurtleArtPortfolio using the Pippy button on the Save/Load tab.

good luck.

-walter

On Sat, Feb 7, 2009 at 8:13 AM, Paul Schulz pschul...@gmail.com wrote:
 Hi Everyone..

 On Sat, Feb 7, 2009 at 10:27 PM, Bill Kerr billk...@gmail.com wrote:
 http://tonyforster.blogspot.com/2009/02/using-insert-function-block-in.html

 Tony Forster has used Walter's new insert function block in turtle art to
 program an analog clock

 I have been playing with TurtleArt with the aim of producing some
 physical 2D models of forces on an object (the turtle).

 I have had some initial success:
 - with x and y velocity being stored in box1 and box2
  ..constant force problems can be done. eg.
  * projectile turtle
  * charged turtle in a constant electic field
  ..1D position related forces
  * bouncing turtle

 I would like to model inverse square law motion as well (turtle in
 space) but I hit a couple of problems.

 1) I need 'braces' or I need to know more about the way that TurtleArt
 calculates expressions..

 eg. To calculate the new velocity I need something like..

  new_vx = old_vx - constant * xpos / (xpos *xpos + ypos * ypos )

 but I don't have braces '(', to delimit the denominator, and I am
 already using box1 and box2 to hold the existing velocity components.

 2) I though I could get away without it, but I also need the
 'sqrt' (square root) function.

 Also...

 As I'm not actually using the turtle to drew... I am using the 'moveto' the 
 new
 location, I have to 'wiggle' the turtle (move forward and back) to make a 
 mark.

 - Is there another application I could use?
 - How do I pull out my 'program' from sugar on my XO, for saving and sharing.

 Any help would be appreciated..

 Cheers,
 Paul
 paul at mawsonlakes.org

 ___
 IAEP -- It's An Education Project (not a laptop project!)
 IAEP@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep

 ___
 IAEP -- It's An Education Project (not a laptop project!)
 IAEP@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep




-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
___
IAEP -- It's An Education Project (not a laptop project!)
IAEP@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/iaep