Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

SL Physics Workshop

Kanker Greenacre
Registered User
Join date: 17 May 2003
Posts: 178
08-24-2003 14:47
Second Life Physics Workshop
September 13-14, 2003
Sponsored by Kazenojin

Overview:
----------
The first ever SL Physics Workshop will be held on Saturday, Sept. 13 and Sunday, Sept. 14. The purpose of the workshop is to demonstrate how physics works in Second Life and the use of physics functions in the Linden Scripting Language. The workshop will be divided into four sessions, two on each day. All sessions will be open to the public, with a L$10 cover charge per presentation.


Workshop Coordinators:
--------------------------
Kanker Greenacre
Ananda Sandgrain


Call for Presentations:
------------------------
We are looking for presenters to demonstrate each of the following four subject areas:

1) "Fundamentals of physics" -- including an overview of Newton's laws, the equations of motion, and demonstrations of force, impulse, and torque
2) "Rotation of Objects" -- including demonstrations of the use of Euler angles and quaternions
3) "Controlling Object Movement" -- including demonstrations of llMoveToTarget, llLookAt, etc.
4) "Joints" -- including demonstrations of making joints and hinges

Presenters will be awarded L$250 each, plus up to L$50 for upload costs associated with their presentation. Presentations should be around 30 minutes long, with an extra 15 minutes at the end for questions from the audience. An overview of each presentation must be submitted to the workshop coordinators before being approved. Each presentation should include one or more demonstrations with actual scripted objects (in the case of the first three subject areas) or simply physical objects (in the case of the "Joints" presentation). All scripts and objects used in the demonstrations must be made available to all workshop attendees.


Location:
---------
The location for the workshop will be announced at a later date. Times have been tentatively set at 6 pm and 7 pm (PDT) on Sat. and Sun.
_____________________
Living La Vida Segunda
Ope Rand
Alien
Join date: 14 Mar 2003
Posts: 352
08-24-2003 17:16
Awesome! I've been thinking of preparing and doing something almost exactly like this for a while now. I think it can help a lot of ppl who want to learn more about how to make stuff move around in SL. My whole problem is I'm busy preparing for RL school so I know I can't devote much time to it. (and I think it sure will take a lot of preparation)

If you have trouble finding anyone else, I 'might' be able to prepare presentations 1 and 3. I'll be taking another physics course this semester so I will have much of that stuff on the top of my mind again, heh

Thanks for stepping up and organizing this Kanker and Ananda. I expect it will be a huge success. And I'll be in touch about presenting.
_____________________
-OpeRand
Darwin Appleby
I Was Beaten With Satan
Join date: 14 Mar 2003
Posts: 2,779
08-24-2003 21:58
Oooh good idea
_____________________
Touche.
Ananda Sandgrain
+0-
Join date: 16 May 2003
Posts: 1,951
Calling all physicists
08-27-2003 10:50
Bump!

This project is getting more and more support, but we still need some knowledgeable presenters to help out with demonstrating the physical principles underlying some of SL's favorite gadgets.

Get in touch with Kanker or myself if you are qualified to speak on these subjects.

Thank you.
Kanker Greenacre
Registered User
Join date: 17 May 2003
Posts: 178
09-04-2003 19:09
Hey! We're still looking for someone to teach the "Joints" session on Sunday, September 14, at 7 pm PDT. If anyone has the slightest bit of interest, see me in-world or IM me.
_____________________
Living La Vida Segunda
Ananda Sandgrain
+0-
Join date: 16 May 2003
Posts: 1,951
09-10-2003 16:35
Three physics workshops will be taking place in Gray this weekend! Check the events calendars for more details. This is your opportunity to learn more about the way objects and physics scripts function in SL. Also you'll get a better idea about where things function predictably according to the rules of physics, and where they don't!

And if we're lucky, Andrew Linden will be able to enlighten us on this subject at the Sunday session!
Garoad Kuroda
Prophet of Muppetry
Join date: 5 Sep 2003
Posts: 2,989
09-15-2003 17:00
Are any future weekday workshops planned for those who can't make it on the weekends? :(
Kanker Greenacre
Registered User
Join date: 17 May 2003
Posts: 178
Chat Log: Session I - Vectors
09-22-2003 18:26
[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 :P
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 :)
_____________________
Living La Vida Segunda
Sapphire Bombay
Avatar
Join date: 8 Oct 2003
Posts: 341
10-13-2003 08:52
This log was extremely helpful! Did anybody log the 2nd speaker? And could they post it? Also, are there any upcoming physics courses?

Sapphire
Kanker Greenacre
Registered User
Join date: 17 May 2003
Posts: 178
10-13-2003 13:14
Looks like I just plain forgot to post the other two chatlogs from my "Dynamics" session and Andrew Linden's "Rotations" session. You can find copies in-world at the Kazenojin Store in Gray - I put the actual demos, chatlogs, and course notes on a shelf and made them free to copy (I think).

I'm hoping that we can teach these classes again through the Second Life University in the near future. Stay tuned.
_____________________
Living La Vida Segunda
Sapphire Bombay
Avatar
Join date: 8 Oct 2003
Posts: 341
10-13-2003 14:28
Thanks, found them. And, btw, great building there. I had poked around it before, but this time I went into the Passenger Lounge/lower area - Nice uniforms!

Thanks,
Sapphire