Difference between revisions of "SL Cert - Basic LSL Rotations"

From Second Life Wiki
Jump to navigation Jump to search
Line 1: Line 1:
This is an initial take on a set of guidelines for scripting position and rotations. It still needs a lot of work and a good deal of thought.


This list of requirements is part of the [[SL Certification | 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.
This list of requirements is part of the [[SL Certification | 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.
Line 38: Line 37:


== Intermediate Requirements ==
== 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 ===
=== Reference Frames ===
* Global
* Global
* Local
* Local
Similar to the basic requirements, but the person must be able to demonstrate an ability to move back and forth between global 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 a global reference frame and react accordingly.


=== Basic commands to get position information  ===
=== Basic commands to get position information  ===
Line 47: Line 50:
* llGetLocalPos
* llGetLocalPos
* llGetRootPosition
* llGetRootPosition
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 ===
=== Basic commands to get rotation information ===
Line 52: Line 57:
* llGetLocalRot
* llGetLocalRot
* llGetRootRotation
* 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 ===
===Basic commands for changing position ===
Line 58: Line 66:
* llSetPos within different reference frames.
* llSetPos within different reference frames.


=== Basic commands for changing rotation ===
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 and global coordinate systems. For example, a person should be able to move a prim within a linkset to a specific point. 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
* llSetRot
* llSetLocalRot
* llSetLocalRot
* llSetPrimitiveParams
* llSetPrimitiveParams
* llAxes2Rot
* llAxisAngle2Rot
* llRotBetween
* llRot2Axis
* llRot2Angle
* How the commands work in different reference frames.
* How the commands work in different reference frames.
* Rotations
* Rotations
** Multiplication and division of rotations
** Multiplication and division of rotations
** Difference between left and right multiplication
** 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 ===
=== Working with vectors ===
Line 71: Line 88:
* Finding a vector perpendicular to two vectors.
* Finding a vector perpendicular to two vectors.
* Finding a vector perpindicular to a plane.
* 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 ==
== Advanced Requirements ==

Revision as of 04:35, 22 February 2009

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.

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

  • Absolute position
  • Local position

A person should know what position is in the context of SL. This means the person should know the difference between 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 be 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 and add vectors that have been multiplied by a scalar 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
  • Local

Similar to the basic requirements, but the person must be able to demonstrate an ability to move back and forth between global 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 a global reference frame and react accordingly.

Basic commands to get position information

  • llGetPos
  • llGetLocalPos
  • llGetRootPosition

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 and global coordinate systems. For example, a person should be able to move a prim within a linkset to a specific point. 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)

Smooth movements

Absolute coordinates

  • Rotate and movement around the edge of a prim
  • Rotate and move around a fixed point
  • Rotate and move around a predefined axis

Local coordinates (within a linkset)

  • Rotate and movement around the edge of a prim
  • Rotate and move around a fixed point
  • Rotate and move around a predefined axis

Transitions

  • Smooth movements from one orientation (position and rotation) to another.

Determining specific orientations

Absolute coordinates

  • Given a point rotate an object to face the point.
  • Given two points rotate an object to face perpindicular to the two points.

Local coordinates to local

  • Given a point rotate an object to face a local point.
  • Given two local points rotate an object to face perpindicular to the two points.

Local coordinates to absolute

  • Given a point rotate an object to face a point in absolute coordinates.
  • Given two absolute points rotate a local object to face perpindicular to the two points.