@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16



Comments:

<0> k, count me out of this for now ;P
<1> Here's where I start to die out.
<1> Decept404: I feel the same way :P lols
<2> Here's the abbr. version to this because my coffee fix is wearing off. :)
<0> i'm a 2d guy anyway. thank god for flat stuff
<1> ok
<1> yeah, I'm the god of over-coding collision detection
<2> To rotate a point in 2D you would use a set of equations such as this: x' = xcos(theta) - ysin(theta) and y' = xsin(theta) + ycos(theta)
<3> http://en.wikipedia.org/wiki/Unit_Circle
<2> In our 3D space we can fit ourselves into this 2D defintion by restricting our view of the coordinate system. In each I'm discussing we will be sitting on an axis and therefore will only be able to 'see' the other two. For the Z axis, we can only see the X and Y axis. For the X axis, we can only see the Z and Y axis. and finally for the Y axis we can only see the X and Z axis
<1> Wow. *eyes bug out*
<3> understand the unit circle, and all rotations will be a piece of cake
<2> ayeyen ifyou have that page open, take a look at the unit circle in the top right
<1> I did.
<2> imagine that at the origin (0,0) , there was another 3rd axis coming straight out, that would be the z axis
<1> Seems fair



<0> the problem for me was always understanding how rotating 2 axes will affect the third
<0> ie matrices
<0> :P
<0> 2d rotations are ez.
<2> Now in your mind go sit on the axis that has an x on it
<0> 3d rotations screw with my head, bigtime
<1> I understand, if you're sitting on one axis, you only see the other two
<2> If you were looking towards the origin you would see the Y axis and now the Z axis
<2> fantastic
<1> So 3D is more like lots of little 2Ds.
<2> :)
<0> its just 2d with another axis
<1> That helps to visualise a little
<2> So now if we were to use those equations I mentioned above
<0> in 2d terms youve probably already done rudimentary 3d
<0> with depth sorting
<1> yeah
<2> We would simply change the x variable to z and we would have the rotation equation for the x-axis. Or pitch
<0> true 3d is really just that with vertices, ie points in a 3d mesh
<1> I've made games where the background is behind the player, etc, in visual basic
<0> sorry.
<1> risis_ATC: What do you mean change x to z?
<2> In other words looking at the origin from the x-axis we now see the Y and Z axis right? :)
<1> yeah
<2> So if we wanted to use the 2D equations from above x' = xcos(theta) - ysin(theta) and y' = xsin(theta) and +ycos(theta) we would need to change the x variable to z
<1> oh god, brain cramp
<1> What are sine and cosine anyways
<1> And please re-explain those two equations so I can copy them down right >_<
<3> http://en.wikipedia.org/wiki/Sine-wave
<2> If we wanted to rotate a point X,Y by an angle theta we would use those equations above. x' and y' refer to the values after the rotation
<2> I won't go into the derivation of those because I'd be typing for another half hour :)
<1> okay
<1> Do I need to know those equations for anything, actually?
<4> Wazzzzzzzzzzzzaaaaaaaaaaaaaaaaaaaaaaaaaaaaaap?!?!?!?!?
<1> Or to understand how sine or cosine work?
<3> basically they take an angle in radians and give you a value between -1 and 1
<1> And there's 4 radians in 360' right?
<2> Yes those are very fundamental, but you can understand them on a conceptual level rather than an indepth technical level.
<3> no, 2pi
<1> 2 rads?
<3> no, 2 pi radians
<1> oh.
<1> *dies*
<1> I guess, just tell me how to use them for my purposes, and I'll try not to have a breakdown every time i see them.
<3> look at the circle again
<3> any point on the surface of the circle can be calculated by using sin and cos
<1> okay?
<3> think of the point you want to rotate as a point on a circle
<3> when rotating, it will follow the surface of that circle
<1> Oh, neat
<1> So for roll, it would follow a circle on the x axis
<4> http://www.fat-pie.com/spoilsminus2.htm <-- Anyone not seen this yet?
<2> roll is around the Z axis, and the circle described by it uses the X and Y coordinates :)
<3> more like a circle in the x/y plane
<3> since circles are 2d
<1> yeah
<1> I kind of meant to say that
<2> Ah good good, now if you were on the X axis and could only see the Y and Z axis..
<2> your circle would be described using... (prompting you here)



<1> Then the circle would be on the y and z axis
<2> awesome!
<1> 'k
<2> and if you were on the Y axis and could only see the...
<1> This helps to visualise stuff
<2> :)
<1> Whoa hold on, I'm afraid of heights
<1> lol
<1> the x and z axis
<1> So how do I use this in C++? :P
<1> I'm anxious to make a 3d graveyard and fly through it.
<2> we'll glaze over the whole 3d matrix stuff and define this lookat vector using this definition: LookAt.x = Sine(Yaw) * Cosine(Pitch) LookAt.y = Sine(Pitch) and finally LookAt.z = Cosine(Pitch) * -Cosine(Yaw)
<2> BUT
<2> this vector is relative to the position of the camera
<2> so in fact we need to translate it by the Position we had earlier
<1> Position we had earlier?
<2> Remember the Position vector
<1> oh yeah
<2> If we did the above we would have a LookAt vector that came out of the origin of the coordinate system, when in fact we want it to be looking out of the camera's position. Or in other words make the origin for the look at vector, the position of the camera
<1> You lost me.
<2> This is done by simply adding each component of the above look at vector to the position of the camera
<1> Hmm
<2> no problem i'll refine the defintion
<1> ok
<2> Let's say my camera is at the origin of my coordinate system (0,0,0) right
<1> right smack dab in the middle of everything
<2> And my look at vector calculates out to let's say (0,0,20). So my camera is at the origin and the lens is pointed towards a point 20 unites down the positive side of the z axis
<2> Now...I put my camera on a stand and it's now located at (0,15,0). The stand was 15 units high so my camera is sitting right on top of it
<2> now if I used that same look at vector I had before I would in fact be looking in a downwards fashion at the Z axis because my camera is higher up in the air
<1> Yeah
<1> But thats what we want.
<1> Isn't it?
<2> Ah, what we want is the camera to keep 'looking at' the same direction, not the same point per say. If we did not move the look at vector in relation to our camera we would be stuck looking at that one point
<1> If you didn't, you would probably not see the object anymore, you'd see the space above it
<1> Yeah
<1> So we need a different look at vector?
<2> So to keep the look at vector in relation to the camera, we simply add the position of the camera to the look at vector. This is called translation
<1> Translation = sliding, right?
<2> so (0,15,0) + (0,0,20) would give us (0,15,20), meaning we would be 15 units up in the air looking at a point 20 units down the positive side of the z axis
<2> yes to your question
<2> now to control the lookat we simply have to change the angles of rotation for each of the axis. yaw/pitch/roll
<1> ok
<1> So we change the camera's pitch yaw roll?
<2> so we can have a camera at some position and rotate it around to look around the world
<2> yup
<2> and to get that Side vector you just take the cross product of the look at vector and the position of the camera
<1> And how would i do that O_O
<2> use some predefined function :)
<1> using the automagical procedure?
<2> you will find usually a predefined function will give you the answer...but if you want to have control of something you need to understand the why :) more high faluting wisdom words
<2> yep
<1> So the only part of this I don't understand is how to use what function when, and what to p*** into it
<1> (basically, the formulas)
<1> I'm just a little slow with the fancy math
<1> Decept404: You still with us?
<1> risis_ATC: I swear every time I'm about to poke you to see if you're still here, you talk before I finish.
<0> i totally dig it when my boss takes the word of clients over mine
<0> i made the ****ing thing, i KNOW what it does
<4> No. The retards with the cash know best.
<4> Not the smart coder who works for pennies.
<0> my boss has been preparing me for an update to a game update for a while, saying its probably major
<0> and i get the list of **** to change
<1> Hear hear!
<0> and it's ALWAYS BEEN THAT WAY
<1> That's why you don't make the code work, you make it work for IDIOTS.
<0> so i'm here at the office on a sunday
<0> at 8pm
<0> to do changes that don't exist
<0> that's 2 hours of transit in winter norway for nothing. ****.
<4> Paid, at least?
<0> nah
<0> not paid by the hour


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #gamedev
or
Go to some related logs:

xpwboard vote
#nhl
#nhl
#feckoff
verizon anonymous calling
#stocks
korean smilies
#beginner
in the navy villige people
#photoshop



Home  |  disclaimer  |  contact  |  submit quotes