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.

Tuesday, May 15, 2012

Playing with TATI

In the preceding post, I described how I got the idea of building TATI - The Amiable Textual Interface for Second Life and its TATILogo language.

As I said, 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.

There are 6 types of object available: NOROBJECT, GEOOBJECT, VELOBJECT, ACCOBJECT, NEWOBJECT, PHYOBJECT.

TATI listens to commands on channel 33 from its owner.

Here I show a few examples of creating different types of objects.

Example 1 - NOROBJECT
In the first video, I order TATI to create an object dubbed B1. By default, it will be of NOROBJECT type, which is simply the basic non-physical SL object.

It’s insensitive to SL gravity and, therefore, will float at the position where it was rezzed.

It can be moved like a Papert's Geometry Turtle with TATILogo commands FORWARD and BACKWARD.

To be able to distinguish the various objects, besides the label TATI puts above the object, the user may want to give them different colours. For example, I commanded TATI to change its default color to blue.




The TATILogo commands given were simply:

 /33 create b1 
 /33 forward b1 3 
 /33 backward b1 6 
 /33 setcol b1 blue 

Example 2 - VELOBJECT

In the second video, I order TATI to create a VELOBJECT, which somehow corresponds to Papert’s ‘Velocity Turtle’. It float as well but do not understand position changing commands like FORWARD and TATI sends error messages about that to the user.

In analogy to it, however, there are state-changing TATILogo commands such as SPEEDUP to increase the object present speed (an scalar quantity) in the direction it is heading. 

There is also the command SETVEL, corresponding to Papert’s SETVELOCITY command, to set its velocity (a vectorial quantity) which can have any direction.




The TATILogo commands given were:

 /33 create b2 velobject plane 
 /33 forward b2 3 
 /33 speedup b2 0.5 
 /33 speedup b2 -0.5 
 /33 setvel b2 (-0.5 0 0) 
 /33 setvel b2 (0 0 0) 
 /33 setvel b2 (0 0 0.5) 
 /33 setvel b2 (0 0 0) 

Example 3 - PHYOBJECT

In the third video, I ordered a PHYOBJECT, the basic physical SL object.

As it is subject to SL gravity and dynamics, it falls down to the ground (in this case, right through the hat which was providentially made immaterial to avoid collisions) and rolls the inclined ground down until it finds some obstacle.

Both FORWARD and SPEEDUP TATILogo commands fail because PHYOBJECTs accept only commands that apply mechanical forces, impulses and torques to it.

Firstly I apply a rotational impulse to it to turn it to a convenient position.

Then, I apply a force to it which will cause it to accelerate until the applied force is set to zero. An increase in speed is clearly visible.

If there were not dynamical effects of interaction with the ground, the object, free from forces, would then keep going with constant velocity. Instead, it stops moving.




Now the TATILogo commands were:

 /33 create b3 phyobject cylinder 
 /33 setcol b3 red 
 /33 forward b3 3 
 /33 speedup b3 0.5 
 /33 approtimpulse b3 (0 0 -0.38) 
 /33 appforce b3 (0.5 0 0) 
 /33 appforce b3 (0 0 0)

Sunday, May 13, 2012

TATI - The Amiable Textual Interface for Second Life

After playing for a while with the VLP Display to build vectors and planes in Second Life, as I have discussed briefly in a previous post, ...

Two planes intersecting in a line generated by the VLP Display (Bogacki, 2009) 
Source: photo taken by the author

... I remembered other similar constructions I have recently read about such as the molecule rezzer Orac (Lang & Bradley, 2009) that you can use to easily create the molecule that you want via the chat interface without having to link prims together or learn Linden Scripting Language - the scripting language of Second Life.
1-Pyrenebutanoic acid molecule generated in SL by Orac together with its NMR spectrum.
Source: (Lang & Bradley, 2009)
Suddenly my mind blew up!


If you have been following my posts in this blog, you know from my first post that I always pursued the idea of building a kind of Papert's (1980) microworld for Physics teaching.

But you know as well that it's not an easy task. I have shown elsewhere (dos Santos, 2009) that SL shows itself as a viable and flexible platform for microworlds and simulations but requires creativity to overcome the difficulties of implementation.

One of the main difficulties of this task is the high learning curve that exists for new users (Sanchez, 2009), specially to learn its Linden Scripting Language (LSL) (“LSL Portal,” n.d.), the SL Java-like programming language with nearly four hundred functions without which one cannot add interactivity features to the objects and fatally ends up with a specially inane kind of gigantic Lego.

What I found so interesting and similar about those constructions above? I realized that they bypassed this LSL-learning/programming obstacle by using the ol' good chat channel to interact with the user in a high-level specialized yet familiar language.

Orac 'understands' a chemist jargon such as '1-Pyrenebutanoic acid', is able to dialog with web-services at ChemSpider, and rezzes the structure of prims corresponding to the molecule model.

If we say for example p1=pl 2 1 3 7 in the chat channel the VLP Display 'understands' it as meaning "p1 is the plane 2x + y + 3z = 7" . In my opinion, Prof. Bogacki did something even more interesting in his VLP Display: if you pay attention to my post, you will see that he consciously or not created a 'language', a much Lego-like language. Instead of FORWARD or RIGHT, it included minimalist commands such as pl for 'draw plane', v for 'draw vector', etc.

Summarizing: as I see it, Orac and VLP Display are quite friendly textual interfaces, interpreters that translate the user orders into the sometimes cryptic LSL language commands.

I then decided to build TATI - The Amiable Textual Interface for Second Life that will translate simple Logo-like instructions into physical objects, some kind of Turtles (Papert, 1980) or, even better, DynaTarts (Abelson & DiSessa, 1981) (dynamical turtles), that is, 'turtles' that would understand physical commands such as SETVELOCITY  instead of the geometrical commands shown above.

Folowing Bogacki footprints, the first thing I did was to conceive TATILogo, a Logo language variant comprising a few easy to remember 'action-verbs' such as CREATE, SPEEDUP, and APPFORCE, and a few necessary 'data-types' such as 'vector', 'float', and 'string'. For coherence with the geometrical turtles, I have kept the basic FORWARD, BACKWARD, RIGHT, and LEFT commands but, for reasons discussed in detail in (dos Santos, 2012), instead of SETVELOCITY, etc., I included commands more similar to those geometrical state-change operators (Papert, 1980, p. 127) such as SPEEDUP. Furthermore, being SL a 3D environment where rotations around all axis were allowed, I included analogous commands for the other axis, such as UP, DOWN, CLOCK, and ACLOCK rotations in addition to LEFT and RIGHT.For completeness, I also felt the need to include commands like APPTORQUE and APPROTIMPULSE in addition to APPFORCE and APPIMPULSE.

I try to never forget that SL is some kind of Wonderland. Therefore, I found it appropriated to theme the interface as a 'wizard hat'. I bought a nice fullperm sculpt wizard hat from Web Gearbox for just L$10 and put the interface script into its inventory. Now, at one's orders, objects are rezzed above it 'like magic', as shown in the pictures below.

Objects being rezzed above the wizard hat 'like magic'
Building different object types with TATI
Source: photo taken by the author
See the next post for videos on TATI in operation.

See also (dos Santos, 2012) for further details.

References
  • Abelson, H., & DiSessa, A. A. (1981). Turtle Geometry: Computations as a Medium for Exploring Mathematics. Cambridge, MA: MIT Press.
  • Bogacki, P. (2009). Multivariable Calculus Virtual Office Hours in a Metaverse. In J. Foster (Ed.), CD-ROM Proceedings of the Twentieth Annual International Conference on Technology in Collegiate Mathematics, San Antonio, Texas, March 6-9, 2008 (p. C015). Upper Saddle River, NJ: Pearson Education. Retrieved from http://archives.math.utk.edu/ICTCM/i/20/C015.html
  • dos Santos, R. P. (2009). Second Life Physics: Virtual, real or surreal? Journal of Virtual Worlds Research, 2(1), 1-21. Austin, TX: University of Texas at Austin. Retrieved from http://journals.tdl.org/jvwr/article/view/383/455
  • dos Santos, R. P. (2012). TATI - Uma interface textual amigável para o Second Life. RENOTE: Revista Novas Tecnologias na Educação, 10(1).
  • Lang, A. S. I. D., & Bradley, J.-C. (2009). Chemistry in second life. Chemistry Central Journal, 3(1), 14-33. Retrieved from: http://journal.chemistrycentral.com/content/3/1/14
  • LSL Portal. (n.d.). Retrieved October 29, 2008, from http://wiki.secondlife.com/wiki/LSL_Portal
  • Papert, S. A. (1980). Microworlds: Incubators for Knowledge. In S. A. Papert (Ed.), Mindstorms - Children, Computers and Powerful Ideas (pp. 120-134). New York: Basic Books.
  • Sanchez, J. (2009). Barriers to Student Learning in Second Life. Library Technology Reports, 45(2), 29-34. Chicago, IL: American Library Association. Retrieved from http://search.ebscohost.com/login.aspx?direct=true&db=aph&AN=37251469
     

Friday, April 27, 2012

New Math additions to Second Life Physics Lab!

In a previous post, I mentioned there was only a 'Sierpinski triangle' on Lab's 2nd (Math) floor.


Now I added a few more 'toys' on this floor:

The VLP Display, designed to display points, vectors, line segments, lines, and planes in 3D space, created by Prof. Przemyslaw Bogacki (2009) (aka Reaso Ning in SL), as I discussed in detail in a previous post;


A 'normal vector' demonstration, based on (Bogacki, 2011), which will draw the normal vector to the object's surface at the point touched by the user (look at that crazily twisted object on the right!); 


And Bogacki's Spherical coordinate demonstration, which allows one to easily visualize spherical angles by just touching any point on the sphere surface.


As I said, you will find them on Second Life Physics Lab's 2nd floor.


If you like Math, do come to have fun with them and let me know how did you like them.

References
  • Bogacki, P. (2009). Multivariable Calculus Virtual Office Hours in a Metaverse. In J. Foster (Ed.), CD-ROM Proceedings of the Twentieth Annual International Conference on Technology in Collegiate Mathematics, San Antonio, Texas, March 6-9, 2008 (p. C015). Upper Saddle River, NJ: Pearson Education. Retrieved from http://archives.math.utk.edu/ICTCM/i/20/C015.html
  • Bogacki, P. (2011). Exploring Normal Vectors in the Second Life Metaverse. In M. Fernandez (Ed.), CD-ROM Proceedings of the Twenty-second Annual International Conference on Technology in Collegiate Mathematics, Chicago, Illinois, March 11-14, 2010 (paper# M005). Upper Saddle River, NJ: Pearson Education. Retrieved from http://archives.math.utk.edu/ICTCM/i/22/M005.html

Wednesday, April 25, 2012

Second Life Physics Lab is now even more pleasurable and soothing.

As I told in a previous post,  I have been busy decorating the new Second Life Physics Lab garden at Castelo/208/145/39/.

In that post, I mentioned a nice 20 m pond by Major McCaw.

Now this pond is alimented by a small rocky creek fed by a pretty little cliff face waterfall, both from Major McCaw.


The sound of water stream is now even more soothing as it is mixed with the sound of the waterfall.

Do come to see it and tell me what you think of it.