Repost.Us

Thursday, June 14, 2012

Turning around with TATILogo

In a preceding post, I showed a few examples a few examples of creating different types of objects each one following different physical laws with TATI - The Amiable Textual Interface for Second Life and its TATILogo programming language.

In other posts, I showed a few examples of realization of circular trajectories with different types of TATI objects types and the setup of a 3D collision simulation with TATI.

It must be noticed, however, that SL is a 3D environment where rotations around all axes are allowed. Therefore, besides LEFT and RIGHT rotations Logo commands, the analogous commands for the other axes, such as UP, DOWN, CLOCK, and ACLOCK were included in TATILogo.

In this example, I show these 3D rotation features. In the final part of the video, a sequence of commands allows for a simulation of a plane takeoff.





The commands were:
/33 create b1 geoobject plane orange
/33 forward b1 2
/33 right b1 90
/33 left b1 180
/33 right b1 90
/33 up b1 45
/33 down b1 90
/33 up b1 45
/33 clock b1 45
/33 aclock b1 90
/33 clock b1 45
/33 repeat 12 ( forward b1 1 ; up b1 5 ; forward b1 1 ; clock b1 5 ; right b1 5 ; forward b1 2 )

Tuesday, June 12, 2012

A collision course with TATILogo

In the preceding post, I showed a few examples of realization of circular trajectories with different kinds of objects each one following different physical laws with TATI - The Amiable Textual Interface for Second Life and its TATILogo programming language.

Example 1 - Newton's falling apple

In this example, I bring a Second Life version of Newton's falling apple.





The commands were:
/33 create m1 phyobject apple
/33 setpos m1 aboveme

Note: No, I didn't got inspiration for any new physical theory whatsoever.

Example 2 - 3D collision simulation

In this example, I show how TATI can be use to setup a simple virtual immersive 3D collision simulation in Second Life.

I simply had to type a few simple TATILogo commands in the chat window. TATI translates these TATILogo commands in Linden Scripting Language commands that will make Second Life rezz the two colliding bodies, position them, set the impulses that will put them in motion and invoke its Hawok physics engine to take care of all Physics involved.

Finally, I say 'go' and watch the simulation running.




The commands were:
/33 create c1 phyobject sphere blue
/33 setpos c1 (214.7874 208.3379 38.48)
/33 create c2 phyobject sphere red
/33 setpos c2 (207.5374 216.3379 38.48)
/33 appimpulse c1 (-4 0 0) ongo
/33 appimpulse c2 (0 -4 0) ongo
/33 go

TATI (The Amiable Textual Interface for Second Life) is able to translate simple TATILogo instructions into Second Life commands that will rezz different kinds of objects each one following different physical laws. 

The motivation is to help teachers interested in building simple simulations for Physics teaching but would not go up the high learning curve for Linden Scripting Language. TATI is able to translate simple Logo-like TATILogo commands into different kinds of objects each one following different physical laws.

Running in Circles with TATILogo

In the preceding post, I showed a few examples of generating different kinds of objects each one following different physical laws with TATI - The Amiable Textual Interface for Second Life and its TATILogo programming language.

Here, inspired by the classic Logo example (Papert, 1980, p.58) of drawing a circumference


TO CIRCLE 
REPEAT [FORWARD 1 RIGHT 1]

I show the realization of trajectories in the form of a circle with other TATI object types.


Example 1 - GEOOBJECT

In this first example, I ordered a GEOOBJECT object type, which is similar to a Papert's 'Geometry Turtle', with the shape of a plane.

Then I used the command REPEAT and geometric commands to make it do little steps forward and little turns to make a trajectory in the form of a circumference.




The commands were:
/33 create b4 geoobject plane 
/33 repeat 36 ( forward b4 0.5 ; left b4 10 ) 

Example 2 - VELOBJECT

In this second example, I ordered a VELOBJECT object type, which is similar to a Papert's 'Velocity Turtle', with the shape of a plane.

Then I used the command REPEAT and dynamical commands to make it to make a trajectory in the form of a square. Geometrical commands such as FORWARD and RIGHT are ineffective here. I had to use the 'velocity' commands SPEEDUP, SLOWDOWN, SPINUP, etc.




The commands were:/33 create b5 velobject plane green
/33 repeat 4 (speedup b5 10 ; slowdown b5 10 ; spinup b5 162 ; setangvel b5 (0 0 0) )

Example 4 - NEWOBJECT

In this fourth example, I ordered a NEWOBJECT object type, which is similar to a Papert's 'Newtonian Turtle', with the shape of a plane.

Then I used the command REPEAT and dynamical commands to make it to make a trajectory in the form of a square. Both geometrical commands and 'velocity' commands  are ineffective here. I had to use the APPIMPULSE command, to make it go forward as well as to stop it and APPROTIMPULSE to make it turn and stop turning.

As Abelson explains,
“A dynamic turtle or dynaturtle behaves as though it were a rocket ship in outer space. To make it move you have to give it a kick by 'firing a rocket'. It then keeps moving in the same direction until you give it another kick. When you change its direction, it does not move in the new direction until you give it a new kick. Its new motion is a combination of the old motion and the motion caused by the new kick. (Abelson, 1982), p. 121).”



The commands were:
/33 create b7 newobject plane red
/33 repeat 4 ( appimpulse b7 ( 12.0 0 0) ; appimpulse b7 ( -12.0 0 0) ; approtimpulse b7 ( 0 0 1.0) ; approtimpulse b7 ( 0 0 -0.98) )

TATI (The Amiable Textual Interface for Second Life) is able to translate simple TATILogo instructions into Second Life commands that will rezz different kinds of objects each one following different physical laws.  

As I said before, the motivation is to help teachers interested in building simple simulations for Physics teaching but would not go up the high learning curve for Linden Scripting Language. TATI is able to translate simple Logo-like TATILogo commands into different kinds of objects each one following different physical laws.

References
Abelson, H., & DiSessa, A. A. (1981). Turtle Geometry: Computations as a Medium for Exploring Mathematics. Cambridge, MA: MIT Press.