[abridged chat log from the first session of the Physics Workshop on September 13. Ope Rand discussed vectors.]
Ope Rand: have any of you guys learned about vectors befor?
Ope Rand: well ok then i'll take that as a no
Ope Rand: understanding how to use vectors is very important if you want to understand how things move around in SL
Ope Rand: first of all why would we use a vector?
Ope Rand: informally, its because there are quantities that we cant describe with just a single number
Ope Rand: for example
Ope Rand: if i tell you i'm going to move 10 meters away from where i'm standing, you still wouldn't know exactly where i'll end up
Ope Rand: what you'd need to know in addition to how far i'm going is, in what direction i'm going to move
Ope Rand: this is one reason why we would use a vector
Ope Rand: a vector is a quantity which has both a magnitude and a direction
Ope Rand: in other words it not only tells you "how much"
Ope Rand: but "in what direction"
Ope Rand: so you can probably see how using vectors would be very useful when we're dealing with things that are moving in some space
Ope Rand: aw shoulda waited longer i think
Ope Rand: well, anyway
Ope Rand: you can imagine a vector as if it were an arrow or line in space
Ope Rand: like those colored lines i have behind me
Ope Rand: they point in certain directions and their magnitudes are indicated by their lengths
Ope Rand: the longer they are the greater the magnitude
Neal Nomad: did you define magnitude?
Ope Rand: so if i were to have told you a vector describing the direction and the distance(magnitude) that i was going to travel, then you could figure out exactly where i was going to end up
Ope Rand: magnitude is like saying "how much"
Ope Rand: and the direction the vector points is the direction that we the magnitude is applied
Ope Rand: oops - we

Ope Rand: i had asked earlier but a few of you just showed up...
Ope Rand: have any of you learned about vectors before?
Dusty Rhodes: yes
Ope Rand: or maybe more importantly how many havent?
Neal Nomad: 30 years ago
Ope Rand: oh ok
Ananda Sandgrain: sure
Kanker Greenacre: way back in kindergarten, neal?
Ope Rand: well this is not hard stuff
Evie Fairchild:

Neal Nomad: I'm just a bit older that that

Ope Rand: but its important to understand before you move onto physics
Ope Rand: now a vector doesn't only have to describe how something is going to move from one point to another
Ope Rand: remember, a vector is only used to indicate the direction and magnitude of 'something'
Ope Rand: its just like a regular number in that way
Ope Rand: just like the number 5 can describe how man apples i have, or how many minutes have gone by
Ope Rand: a vector can describe all types of things that involve a magnitued and a direction
Ope Rand: the simplest use for vectors is to describe a position
Ope Rand: this we call a position vector, or coordinate
Ope Rand: it is the displacement from the origin (0,0,0) of our coordinate system
Ope Rand: so to imagine a position vector you can imagine a line that starts from 0,0,0 and ends at the position it indicates
Ope Rand: another thing that is described by a vector is an object's velocity
Ope Rand: velocity is the change in position(or displacement) per unit of time
Ope Rand: so in the case of a velocity vector, the vector will point in the direction the object is moving and its magnitude indicates how fast it is going in that direction
Ope Rand: so the larger the magnitude, the faster it is going
Ope Rand: another type of vector is acceleration
Ope Rand: acceleration is the change in velocity per unit of time
Ope Rand: and again, the vector points in the direction of acceleration and its magnitude indicates how much acceleration is being experienced
Ope Rand: you might remember that force is related to acceleration by the equation, force = mass*acceleration
Ope Rand: now the last 2 uses of vectors that we will be concerned with have to do with angular(rotational) motion
Ope Rand: when things rotate, they rotate around an axis
Ope Rand: and the axis is describable by a vector
Ope Rand: so an angular displacement is the change in angle about that axis
Ope Rand: angular velocity is the rate of change of that angle
Ope Rand: and torque is the angular force
Ope Rand: kanker will give a much better explanation than me about this

Ope Rand: with a very nice demo
Kanker Greenacre: let's just say, another explanation
Ope Rand: so as you probably already know a vector has 3 independent components
Ope Rand: these correspond to the magnitude of the vector in the 3 independent directions x,y and z
Ope Rand: in other words 'how much in the x direction, how much in the y direction" etc..
Ope Rand: you can access these components by adding a .x, .y, or .z to the end of the name of the vector
Ope Rand: for example myvec.x will give me the x component of myvec
Ope Rand: same thing for y and z of course
Ope Rand: in most cases you don't have to deal with the individual components of a vector
Ananda Sandgrain: ? that looks familiar... how would you use that?
Ope Rand: you can usually use and manipulate vectors through some handy lsl methods and arithmetic operations
Ope Rand: so you can usually forget about the details and continue to think about vectors as lines, instead of some numbers
Ope Rand: so lets see why and how we would do certain things with vectors
Ope Rand: first
Ope Rand: vectors can be added together
Ope Rand: this would be just like adding regular numbers but now we do it in 3 dimensions
Ope Rand: when we do that, the individual components are added up seperately
Ope Rand: the x's are added to each other, the y's etc..
Ope Rand: so for example if i added my position vector to the vector <0,0,1>
Ope Rand: i would get a vector that indicates my position plus 1 meter up in the z direction
Ope Rand: all this means for our imaginary lines is that we start one line where the other one ends
Ope Rand: thats what adding one vector to another means
Ope Rand: it doesn't matter the order that you add them
Ope Rand: if you look back here
Ope Rand: the bottom 2 vectors are <0,0,1> and <1,0,1>
Ope Rand: when you add them you get <1,0,2
Ope Rand: or actually i think these are <2,0,2> and <0,0,2> .. same difference
Ope Rand: the top ones are the same as the bottom
Ope Rand: if you start on the bottom left, the bronze looking one and addthe blue one you end at the same point as you would have if you add the red and then the light blue
Kanker Greenacre: everyone - you need to zoom in on the vectors to see the numbers
Garth Fairlight: ty
Ope Rand: oh yeah those numbers aren't too important at the moment tho
Kanker Greenacre: right, sorry ope
Ope Rand: so basically thats just to show you that it doesn't matter which order you add vectors in
Ope Rand: np kanker
Ope Rand: vectors can also be subtracted from eachother
Ope Rand: and again the individual components are subtracted
Ope Rand: now just like regular subtraction is like finding the difference between 2 numbers
Ope Rand: subtracting vectors will give us the difference between 2 vectors
Ope Rand: so for example
Ope Rand: lets say i know my position and i know your position
Ope Rand: and i want to know how to get from me to you
Ope Rand: i can subtract my position from yours and that would be the answer
Ope Rand: so
Ope Rand: difference_vector = your_pos - my_pos
Ope Rand: if i did it the other way around (my_pos - your_pos) i'd get a vector that points from your position to mine
Ope Rand: the same thing can be done with any type of vector
Ope Rand: like for another example, a velocity vector
Ope Rand: lets say we had a physics enabled box that was moving in a straight line through the air
Ope Rand: you get its velocity using llGetVel()
Ope Rand: and say you want to change the velocity (the direction and speed its moving) to something else
Ope Rand: you could find the difference in velocities by subtracting the furrent one from your target velocity
Ope Rand: so:
Ope Rand: difference_vel = target_vel - current_vel
Ope Rand: so this difference_vel is what you want to add to the box's current velocity to get the new velocity
Ope Rand: you could use llApplyImpulse() to instantly add that difference and get it to move how you want
Ope Rand: we can also multiply vectors by constants
Ope Rand: in fact subtracting vectors is just like addina a vector that you first multiply by -1
Ope Rand: when you multiply a vector by -1
Ope Rand: you get a vector that has the same magnitude but points in the opposite direction
Ope Rand: in general, when you multiply a vector by any constant it will multiply each component of the vector
Ope Rand: so the total magnitude will be multiplied the same
Ope Rand: division also works just like multiplication, because you are just multiplying by a fraction
Ope Rand: it just means you'd be making the vector shorter
Ope Rand: there are 3 lsl function calls you should know about
Ope Rand: llVecMag(), llVecDist(), and llVecNorm()
Ope Rand: llVecMag() returns the magnitude of the vector
Ope Rand: llVecDist() tells you the distance between 2 vectors
Ope Rand: and llVecNorm() returns a vector which has the same direction but with a magnitude of 1
Ope Rand: sheesh didn't realize i'd take so long
Ope Rand: ok questions?
Water Rogers: yes
Water Rogers: special vectors.... colors
Water Rogers: they don't Oh behave! like "other"
Water Rogers: oops
Water Rogers: sorry
Water Rogers: okay ... so.... is there a list of those somewhere? or a way to know how they behave?
Ope Rand: what do you mean how they behave?
Ope Rand: a vector is just like a number
Ope Rand: its used to indicate how much and in what direction something is
Kanker Greenacre: basically the color vector has Red, GReen, and Blue as the compenents
Ope Rand: tehy all behave the same
Kanker Greenacre: and those values range from 0 to 1
Ope Rand: oh the color vector i'm sorry
Artemis Tesla: I think he means colors use 0.001 insteda oh whole numbers
Water Rogers: yes
Ope Rand: yeah its RGB
Ope Rand: wasn't going to bring that up
Water Rogers: right... so they aren't whole.... just wanted to know that

Kanker Greenacre: you can probably find somewehre on the internet that has the proper ratios of RGB for specific colors
Ope Rand: yeah
Ope Rand: anything else?
Kanker Greenacre: before anyone leaves...
Kanker Greenacre: ananda is making up a quick survey, i think
Kanker Greenacre: is that right, ananda?
Ope Rand: oh also everything here is free to copy guys
Ope Rand: help yourselves
Kanker Greenacre: who all is staying for the next session?
Artemis Tesla: I am
Tommy Spade: me
Water Rogers: what is the next session?
Evie Fairchild: me
Ope Rand: the next one will be more interesting ;P
Ananda Sandgrain: Sure one sec, I've got a notecard for each of you...
Kanker Greenacre: ope - can you explain the coordinate system for sims?
Ope Rand: sure
Ope Rand: i'm actually now 100% knowledgable about it but from as far as i remember, the coordinate system goes from 0,0,0 to 256,256,512
Ope Rand: and it does negative a bit as well
Kanker Greenacre: i think 0-255 actually
Ope Rand: ah right
Ope Rand: so each sim has their own origin (0,0,0>
Ope Rand: anything else at all? while i'm up here?
Kanker Greenacre: well, i guess that's it
Artemis Tesla: nope its 0- 256 odd but Ive seen it
Kanker Greenacre: huh
Kanker Greenacre: must round up
Ope Rand: well okie doke, i hope this helped you guys a bit, definietly stick around for kanker presentation, and tommorrow Andrew will be explaining *gasp* rotations!
Garth Fairlight: I have seem it up to 258 but I think that is sim overlap
Artemis Tesla: shrug
Kanker Greenacre: my presentation is soon
Garth Fairlight: That was great Ope. helped me understand some of what I do by trail and error
Kanker Greenacre: like in a few minutes
Ope Rand: great garth glad i helped

Ope Rand: well i'm gonna take a seat with you guys

Ananda Sandgrain: Thanks ope!
Garth Fairlight: Let's hear it for Ope
Ope Rand: ty ty
