SL Cert - Basic LSL Rotations

Category:Certification
This list of requirements is part of the Second Life Certification project. It is an effort to create a list of specific skills for different topic areas. It is part of a standard to make it easier for people to demonstrate their abilities.
A copy of a set of full perm objects that demonstrate some of the requirements for the advanced requirements can be found at http://slurl.com/secondlife/Hotspur/45/59/30. They are on the second level of the building. Look for the plain Linden cube, and touch it to get the samples.
== Basic Requirements ==
In the basic skill sets a person should be able to demonstrate that they understand the basic definitions. The person should also be able to demonstrate that they understand the basic idea. For example, a person should know how to calculate a dot product but also understand its relationship to the idea of a projection of one vector on to another.
=== Basic definition of position ===
* Globale position
* Absolute position (within a sim)
* Local position 
A person should know what position is in the context of SL. This means the person should know the difference between a global coordinate, an absolute position within a sim, and the local position within a linkset. An understanding of the different contexts when you might use local versus absolute is vital to working with rotations and vectors. For example, when working within a linkset a local coordinate system is used. At the same time it is not uncommon to make use of local offsets when dealing with two separate objects.
=== Basic definition of a rotation ===
* Euler
* Axis and angle
* Quarternions
A person should demonstrate that they know the definitions of a rotation. The person should know the difference between an Euler rotation and a quarternion. A person need not know the specific implementation of a quarternion but should understand a roation in terms of an axis of rotation and an angle around that axis.
=== Changing position and rotation via the edit window ===
A person should be proficient using the edit window to manually move and rotate an object. The person should be able to move and rotate an object to a specific orientation (position and rotation). Also, the person should be able to read the position and rotation for a given object using the edit window.
=== Vectors and Operations ===
* Definition of vector in LSL
* Working with vector components (x, y, and z)
* Linear combinations of vectors
* Dot product
* Cross product
* Unit vectors
A person should know the basic mathematical vector operations. The person should know how the calculations are performed and the LSL overloaded operators. For example, given two vectors u and v, the person should know how to calculate the dot product and also know that in LSL u*v will give you the dot product. The person should know how to multiply a scalar and a vector in LSL as well as find linear combinations of vectors in LSL.
== Intermediate Requirements ==
For the intermediate requirements a person should be able to take the ideas required for the basic requirements and implement them in LSL. More importantly the person should begin to demonstrate an ability to work with the definitions in specific contexts and solve basic problems using a script.
=== Reference Frames ===
* Global
* Sim
* Local
Similar to the basic requirements, but the person must be able to demonstrate an ability to move back and forth between global, sim, and local coordinates. For example, a script that is in a linkset should be able to work with a coordinate passed to it from an object in the sim's reference frame and react accordingly.
=== Basic commands to get position information ===
* llGetPos
* llGetLocalPos
* llGetRootPosition
* llGetRegionCorner
A person must demonstrate an understanding of the basic position commands for getting information about an object's position. The person must demonstrate an understanding how the command works in different global and local contexts.
=== Basic commands to get rotation information ===
* llGetRot
* llGetLocalRot
* llGetRootRotation
A person must demonstrate an understanding of the basic rotation commands for getting information about an object's rotation. The person must demonstrate an understanding how the command works in different global and local contexts.
===Basic commands for changing position ===
* llSetPos
* llSetPrimitiveParams
* llSetPos within different reference frames.
A person must demonstrate a basic understanding of how to move an object. The person should be able to move an object to specific points. This should be done in both local, sim, and global coordinate systems. For example, a person should be able to move a prim within a linkset to a specific point in the sim's coordinate system. More importantly given two separate objects the person must be able to move a prim to points in a local context defined by the two objects.
=== Basic commands for changing and working with rotations ===
* llSetRot
* llSetLocalRot
* llSetPrimitiveParams
* llAxes2Rot
* llAxisAngle2Rot
* llRotBetween
* llRot2Axis
* llRot2Angle
* How the commands work in different reference frames.
* Rotations
** Multiplication and division of rotations
** Difference between left and right multiplication
A person must demonstrate a basic understanding of how to rotate an object. The person must be able to rotate an object to specific orientations. This should be done with a variety of different commands. The person should demonstrate an ability to calculate appropriate rotations given a variety of information. For example, the person should be able to calculate the rotation necessary to achive a given orientation using an Euler rotation as well as making use of an axis of rotation and an angle.
=== Working with vectors ===
* Finding a vector component in a given direction
* Finding a vector perpendicular to two vectors.
* Finding a vector perpindicular to a plane.
The person should be able to perform basic vector operations in LSL. The person should be able to calculate the components of a vector in arbitrary directions. The person should be able to do this in a variety of contexts such as using a plane or multiple vectors.
== Advanced Requirements ==
=== Rotations and position ===
* using llSetPrimitiveParams to move and rotate at the same time
* Rotating and moving a prim to a specified orientation
** Absolute coordinates
** Relative coordinates (in a link set)
The person should be able to move and rotate an object with a single command, llSetPrimitiveParams. The person should be able to move an object to a specified rotation and position. Moreover, the person should be able to combine multiple tasks from the intermediate section to move an object to a variety of orientations. For example, given a sequence of points in either local or absolute coordinates the person should be able to move and rotate an object to move along the points so that the objects orientation is consistent with the movement (i.e. it points along the path).
=== Smooth movements ===
==== Absolute coordinates ====
* Rotate and movement around the edge of a prim
* Rotate and move around a fixed point using a predefined axis
The person should be able to calculate and move an object so that it appears to rotate in a uniform way. The person should be able to do this around one edge of the object to make it appear to move in a uniform circular motion. For example, the person should be able to move an uncut prim like a door around an edge. The person should be able to do this around any arbitrary point. The person should also be able to rotate and move and object around any arbitrary axis as well.
==== Local coordinates (within a linkset) ====
* Rotate and movement around the edge of a prim
* Rotate and move around a fixed point using a predefined axis
This is the same as the previous tasks only in a relative coordinate system.
=== Transitions ===
* Smooth movements from one orientation (position and rotation) to another.
Given an initial and final orientation (position and rotation) the person should be able to move the object in a sequence of discrete points so that it appears to move smoothly from the initial to the final orientation.
=== Determining specific orientations ===
==== Absolute/Sim coordinates ====
* Given a point rotate an object to face the point.
* Given two points and the current position rotate an object to face perpindicular to the two points.
This is similar to the Intermediate requirements. The difference here is that the movement from one orientation to another should be done in a number of steps to appear like a smoother movement. Also, the object should point in the specified direction but should maintain some sort of orientation. For example, the person should have one face of a box point toward a given location, but an arbitrary face should be pointing in an "upward" direction.
==== Local coordinates to local ====
* Given a point rotate an object to face a local point.
* Given two points and the current position rotate an object to face perpindicular to the two points. 
Similar to the previous task, but the objects should both be in the same local context.
==== Local coordinates to absolute ====
* Given a point rotate an object to face a point in absolute/sim coordinates.
* Given two points and the current position rotate an object to face perpindicular to the two points. 
Same as the previous task, but in this case one object should be in a local context and the other in a global context. For example, one prim in a linkset should be moved to face an object moving in a sim's global coordinate system.