code logs -> 2010 -> Tue, 29 Jun 2010< code.20100628.log - code.20100630.log >
--- Log opened Tue Jun 29 00:00:37 2010
--- Day changed Tue Jun 29 2010
00:00 Orthia [orthianz@Nightstar-661d35aa.xnet.co.nz] has quit [Ping timeout: 121 seconds]
00:11 ASCII [none@Nightstar-a7d2ccfd.dyn.optonline.net] has joined #code
00:13
< ASCII>
hey, can anyone point me towards a good reference for vectors, and movement along them?
00:14
< ASCII>
it seems like there's a lot of information, so I'm a bit at a loss as to where to start
00:15
<@McMartin>
Hmmm
00:15
<@McMartin>
A basic linear algebra text, quite possibly.
00:16
<@McMartin>
I had a decent one back in the day, but I'd have to track down the proper references for it.
00:17
< ASCII>
I have a feeling that what I want to do will be pretty simple once i find the right qurestion to ask
00:17
< ASCII>
since my software will handle vector math for me, I mostly need to figure out what i need to do
00:20
< Vornicus>
Describe your problem. Many of us have done this sort of thing.
00:23
< Vornicus>
actualyl I have to Store, so I'll be back in like half an hour.
00:24
< ASCII>
I have a rotation (h,p,b) a location (x,y,z), and a velocity (a) I need to translate the location along the rotated direction at the given speed
00:24
< Vornicus>
Aha!
00:25
< Vornicus>
So you want a constant-speed rotation, like somebody's driving a car, right?
00:25
< ASCII>
correct
00:25
< Vornicus>
in a straight line around the world that is
00:26
< Vornicus>
Hokay, let's see, how would I do this.
00:26
< ASCII>
no, the rotation could varry between sampling
00:26
< Vornicus>
Well, okay, but still, you need to figure out...
00:26
< ASCII>
yes
00:28
< Vornicus>
You can, using Euler Angles (I think that's the tool) the axis of rotation.
00:28
< ASCII>
I'm honestly undecided whether it would be easier to plot the path externally and just import the keyframes
00:31
< Vornicus>
Er, get, the axis of rotaton, and the angular velocity of that rotation. Then given the axis of rotation and the amount of rotation (length/radius = angle in radians) you can generate the matrix of rotation, and apply that to the vector.
00:32
< Vornicus>
I'm enough out of practice that I don't remember if there's a nicer way.
00:34
< ASCII>
this is gonna be a bitch
00:48
<@McMartin>
Note that for full 3-D rotation like a homing missile or something you want to avoid talking about angles directly because you'll run into an odd phenomenon called "gimbal lock"
00:49
<@McMartin>
For "like someone driving a car" that should not come up.
00:49 Orth [orthianz@Nightstar-66598c17.xnet.co.nz] has quit [Client closed the connection]
00:50
< ASCII>
yes, I'm well aquainted with gimbol lock but I plan to be limiting this to a 2d plane
00:51
< ASCII>
I already wrote a node group to handle vertical motion
00:53 * gnolam still can't really figure out what it is you want.
00:53
< gnolam>
Can you draw a diagram?
01:01
< Vornicus>
Okay, got it. To find the axis of rotation, apply the rotation you have... twice. This gives you the original point and two more points. Cross two differences between these points and you get the AoR
01:03
< gnolam>
Err...
01:03 * gnolam reads the question again.
01:04 shade_of_cpux is now known as cpux
01:05 Orthia [orthianz@Nightstar-66598c17.xnet.co.nz] has joined #code
01:05
< gnolam>
From "Translate the location along the rotated direction at the given speed" it just sounds like... l = l + s*r, where r is the rectangular representation of the originally spherical rotation vector.
01:12
< ASCII>
gnolam- ok, say I have an object sitting at 0,0,0 and facing a given direction. I need to move the object in that direction
01:12
< Vornicus>
AHa!
01:12
< ASCII>
in my case, it will only be rotating on one axis
01:12
< Vornicus>
Okay, my description was wrong.
01:13
< gnolam>
Then it really is as simple as position vector = position vector + lambda*direction vector. :)
01:13
< Vornicus>
gnolam has it.
01:15
< gnolam>
As for the direction vector's rectangular coordinates, they will depend on your coordinate system.
01:15
< Vornicus>
apply pitch then yaw; roll doesn't come into this calculation.
01:16
< gnolam>
You're thinking of the rotation now and not the translation.
01:17
< ASCII>
why yaw?
01:18 Attilla [Attilla@Nightstar-f91b5f12.threembb.co.uk] has quit [Ping timeout: 121 seconds]
01:18
< ASCII>
and also, when you say simple remember that you're dealing with someone who has no clue whatsoever how to derive lambda
01:19
< gnolam>
Lambda there is your speed.
01:19
< ASCII>
the coordinate system is cartesian
01:20
< Vornicus>
ASCII: okay. 1. what direction is +x? +y? +z?
01:20
< Vornicus>
(actually lambda is your speed times the amount of time between calculations.)
01:20
< gnolam>
For a vector v = (x, y, z), lambda*v = (lambda*x, lambda*y, lambda*z) (where lambda is a scalar, a real number)
01:21
< gnolam>
Well, yeah.
01:21
< gnolam>
But I'm game damaged. I think "speed per timestep", heh.
01:21
< Vornicus>
For positive pitch, do you point up, or down? For positive yaw, do you turn left or right?
01:21
< ASCII>
+x is right, +y is up, and +z is forward
01:21
< gnolam>
Left-handed coordinate system then.
01:21
< Vornicus>
For yaw 0, which way do you want to progress?
01:21
< ASCII>
+z
01:22
< Vornicus>
Okay, and the pitch/yaw questions, and then we'll have everything we need.
01:22
< ASCII>
with 0,0,0 rotation the object points along +z
01:23
< gnolam>
You still need to answer this one: <Vornicus> For positive pitch, do you point up, or down? For positive yaw, do you turn left or right?
01:24
< ASCII>
positive pitch is down
01:25
< ASCII>
and positive yaw is right
01:25
< Vornicus>
Okay, that's all I need. Let's see.
01:26
< ASCII>
though for lightwave I should point out that what you call pitch is 'heading' and what you call 'yaw' is 'pitch'
01:26
< Vornicus>
<0,0,1> ... <0, -sin(phi), cos(phi)> ... <sin(theta)*cos(phi), -sin(phi), cos(theta)*cos(phi)>
01:26
< ASCII>
er, the opposite
01:26
< ASCII>
rather
01:26
< Vornicus>
That last is your direction vector.
01:26
< ASCII>
yaw is heading, and pitch is pitch
01:27
< Vornicus>
Yeah, heading and yaw are the same thing
01:27
< Vornicus>
Or approximately
01:27
< ASCII>
hrm
01:27
< ASCII>
so how do I apply this
01:27
< Vornicus>
Your roll doesn't affect your actual direction vector.
01:28
< gnolam>
Vector addition is simple. Just add the components together.
01:28
< Vornicus>
and vector * scalar is also simple: multiply each component by the scalar.
01:28
< Vornicus>
Your speed/distance thing here is a scalar)
01:29
< gnolam>
u = (x, y, z), v = (r, s, t). u + v = (x + r, y + s, z + t)
01:29 Derakon[AFK] is now known as Derakon
01:30
< gnolam>
Oh, and one more thing: make sure the angle format is the one whatever you're using is expecting (so you don't use degrees where it should be radians or vice versa).
01:38
< ASCII>
hrm
01:42
< ASCII>
oh, and i missed before, +x is right, +y is up, and +z is forward
01:43
< Vornicus>
You said that.
01:45
< ASCII>
ok, what is r,s,t
01:47
< gnolam>
The components of vector v in an example of vector addition.
01:48
< ASCII>
ok
01:48
< ASCII>
but like I said, I can add the vectors already
01:49
< ASCII>
I need to figure out the numbers to plug into them
01:50
< gnolam>
The direction vector is (sin(yaw)*cos(pitch), -sin(pitch), cos(yaw)*cos(pitch)) .
01:51
< ASCII>
ah
01:51
< Vornicus>
your starting position vector is whatever your position vector happens to be. Your distance is speed * per-tick time.
01:53
< Vornicus>
Then you just do new_pos = old_pos + distance * direction
01:54
< ASCII>
it boggles the mond that nobody has done something like this before
01:54
< ASCII>
*mind
01:55
< gnolam>
?
01:56
< ASCII>
eh? just wondering why nobody's made something of this sort before
01:56
< gnolam>
Plenty of people have?
01:57
<@McMartin>
This is like every 3D engine ever
01:57
< ASCII>
...I meant in lightwave
01:57
< ASCII>
That's WHY I thought it was odd, given it's ubiquity elsewhere
01:58
< gnolam>
BTW, for a moment there, before reading the correction or even the rest of the sentence, I thought you actually meant "It boggles the MOND". I thought "Whoa, the guy is attempting to replicate alternative physics theories but doesn't know his linear algebra?", heh.
01:59
< gnolam>
This is probably a sign that I should go to bed.
02:01
< ASCII>
heh
02:28 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has quit [Ping timeout: 121 seconds]
02:38 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
02:39 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has quit [[NS] Quit: Z?]
02:51 Syloqs-AFH [Syloq@NetworkAdministrator.Nightstar.Net] has quit [Ping timeout: 121 seconds]
04:01 Orthia [orthianz@Nightstar-66598c17.xnet.co.nz] has quit [Ping timeout: 121 seconds]
04:07 ASCII [none@Nightstar-a7d2ccfd.dyn.optonline.net] has left #code []
04:50 Orthia [orthianz@Nightstar-f443dcac.xnet.co.nz] has joined #code
05:28 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Client closed the connection]
05:54 Syloqs_AFH [Syloq@NetworkAdministrator.Nightstar.Net] has joined #code
05:55 Syloqs_AFH is now known as Syloqs-AFH
06:20 cpux is now known as shade_of_cpux
06:45 Derakon is now known as Derakon[AFK]
06:52 Orthia [orthianz@Nightstar-f443dcac.xnet.co.nz] has quit [Connection reset by peer]
07:00 Orthia [orthianz@Nightstar-f443dcac.xnet.co.nz] has joined #code
07:11 You're now known as TheWatcher
07:14 AnnoDomini [annodomini@Nightstar-15408570.adsl.tpnet.pl] has joined #code
07:14 mode/#code [+o AnnoDomini] by Reiver
07:45 Orth [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
07:48 Orthia [orthianz@Nightstar-f443dcac.xnet.co.nz] has quit [Ping timeout: 121 seconds]
08:11 You're now known as TheWatcher[afk]
08:31 Stalker [Z@3A600C.A966FF.5BF32D.8E7ABA] has joined #code
09:52 You're now known as TheWatcher
10:21 You're now known as TW[d00mish]
10:42 gnolam [lenin@Nightstar-38637aa0.priv.bahnhof.se] has joined #code
10:48 Orth [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Client closed the connection]
10:54 AnnoDomini [annodomini@Nightstar-15408570.adsl.tpnet.pl] has quit [Ping timeout: 121 seconds]
10:56 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
10:57 AnnoDomini [annodomini@Nightstar-9452acfe.adsl.tpnet.pl] has joined #code
10:57 mode/#code [+o AnnoDomini] by Reiver
11:04 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has quit [Client exited]
11:16 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Connection reset by peer]
11:23 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
11:24 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Client closed the connection]
11:32 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
11:46 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Client closed the connection]
11:52 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
12:02
< gnolam>
Argh.
12:03
< gnolam>
Anyone have any experience in setting up SVN on Windows?
12:03
< gnolam>
A server that is. Not a client.
12:15 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Client closed the connection]
12:31 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
12:33 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Connection reset by peer]
12:39 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
12:40 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Connection reset by peer]
12:48 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
13:12 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Client closed the connection]
13:20 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has joined #code
13:26
<@ToxicFrog>
gnolam: no, but based on my experience setting one up on linux, you'll be saving yourself a shitload of time and effort by using a DVCS instead.
13:39 You're now known as TheWatcher
--- Log closed Tue Jun 29 14:21:08 2010
--- Log opened Tue Jun 29 14:21:47 2010
14:21 TheWatcher [chris@Nightstar-b4529b0c.zen.co.uk] has joined #code
14:21 Irssi: #code: Total of 22 nicks [3 ops, 0 halfops, 0 voices, 19 normal]
14:21 mode/#code [+o TheWatcher] by Reiver
14:22 Irssi: Join to #code was synced in 53 secs
14:37 Orth [orthianz@Nightstar-940c1ff0.xnet.co.nz] has joined #code
14:38 Orthia [orthianz@Nightstar-4f0522b9.xnet.co.nz] has quit [Ping timeout: 121 seconds]
14:46
< gnolam>
ToxicFrog: I have an existing revision history that I would like to keep.
14:47
<@ToxicFrog>
I stand by my statement, as my experience has been that converting an SVN depot to git (can't speak for other DVCSs) is still easier than setting up a new SVN server.
14:57
< gnolam>
Git is out. Last I checked, even the official builds said they were broken.
14:59
< gnolam>
And Mercurial seems to assume an up-and-running SVN server, which leads me back to question 1.
15:00
< gnolam>
... so does Git, by the look of it.
15:05
< gnolam>
So it's doubly out.
15:13 Orth is now known as Reiv
15:30
< jerith>
svn on Windows is not recommended by the svn people.
15:31
< gnolam>
I'm not planning on getting another computer soon, so it will have to do anyway. :P
15:39
<@ToxicFrog>
"broken" in what way?
15:40
<@ToxicFrog>
(also, I didn't realize you had a history without a server)
15:41
< jerith>
What form is the history in?
15:45
< gnolam>
I have a .tgz dump of the repo directory.
15:54
< jerith>
Ah. You're almost certainly going to need a *nix box to use that.
15:55
< jerith>
I can set one up for you on my webserver, if you like.
15:55
< jerith>
You'll just have to put the tarball somewhere I can get at it.
15:55
< jerith>
Then you can migrate it to hg or whatever.
16:02 * PinkFreud pokes google with a sharp stick
16:02
< PinkFreud>
kindly release an imap client which doesn't crash on whitespace. kthx,bye
16:02 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has joined #code
16:56
< gnolam>
jerith: Thanks.
16:57
< gnolam>
I guess I'll try to get an SVN server working on little tank first, but if that doesn't work I'll contact you.
16:57 * gnolam blarghs a bit more.
16:57
< jerith>
gnolam: I'm about to head out, but I'll be online again in a few hours.
17:06 AnnoDomini is now known as ST
17:38 ijerith [ijerith@Nightstar-5b568206.vodacom.co.za] has joined #code
17:52 ijerith [ijerith@Nightstar-5b568206.vodacom.co.za] has quit [Ping timeout: 121 seconds]
18:22 Reiv [orthianz@ServerAdministrator.Nightstar.Net] has quit [Client closed the connection]
18:22 Orthia [orthianz@Nightstar-940c1ff0.xnet.co.nz] has joined #code
19:14 Attilla [Attilla@Nightstar-c979837b.threembb.co.uk] has joined #code
19:15 mode/#code [+o Attilla] by Reiver
19:27
< Vornicus>
gnuh, need to name something.
19:27
< Stalker>
Hmmm?
19:27
<@ToxicFrog>
f3c306ed-9b4c-4e90-b9c3-925690a264fc
19:27
< Vornicus>
Not... quite useful there, tf
19:28
<@ToxicFrog>
^.^
19:28
< Vornicus>
I mean, okay, I grant it's /unique/, but that's about it.
19:28
< Vornicus>
Anyway: writing a logic puzzle thingy.
19:29
< Vornicus>
I need a function that tells me whether a particular value /is/ in a particular slot, and another function that tells me whether a particular value /can be/ in a particular slot.
19:31
<@ToxicFrog>
slot contains value, slot accepts value
19:32
< Vornicus>
Woot, thank you
19:32
< Vornicus>
I was having trouble because "is" is a keyword
19:40
< jerith>
Vornicus: Python?
19:44
< Vornicus>
yah
20:12
<@ToxicFrog>
Ok.
20:12
<@ToxicFrog>
Scala's parser combinators are the bomb.
20:15
<@McMartin>
Parser combinators generally rock entire sock drawers.
20:18
<@ToxicFrog>
I have a parser for a restricted subset of C (specifically, a file containing lots of array-of-struct declarations + some other code I don't care about and pass through verbatim) in 50 lines, which includes the AST classes.
20:27 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has quit [[NS] Quit: ]
20:30
<@McMartin>
Sounds about right.
20:30
<@McMartin>
(I had similar experiences with Haskell's parser combinator library Parsec.)
20:31 Vornicus [vorn@ServerAdministrator.Nightstar.Net] has joined #code
20:31 mode/#code [+o Vornicus] by Reiver
20:58 * ToxicFrog nods
20:58
<@ToxicFrog>
I've heard good things about Parsec.
20:59
< jerith>
It's what pyparsing and such would very much like to be.
20:59
<@ToxicFrog>
scala.util.parsing.combinator is particularly nice because as long as you're inside a subclass of Parser, you have a bunch of implicit converters in scope, so things like:
20:59
<@ToxicFrog>
("{" ~ fields ~ "}") *
20:59
<@ToxicFrog>
Are equivalent to:
21:00
<@ToxicFrog>
literal("{").append(fields).append(literal("}")).repeated
21:01
<@McMartin>
Yeah. Parsec's (ab)use of Monad abbreviation syntax lets it do similar
21:03
<@ToxicFrog>
<3 explicit implicit converters
22:01 Rhamphoryncus [rhamph@Nightstar-bbc709c4.abhsia.telus.net] has joined #code
22:04 ST is now known as AnnoDomini
22:30 Thaqui [Thaqui@27B34E.D54D49.F53FA1.6A113C] has quit [Connection closed]
22:58 AgentIchiro [Smith@Nightstar-7085e070.pathcom.ca] has joined #code
23:08 You're now known as TheWatcher[T-2]
23:11 You're now known as TheWatcher[zZzZ]
23:19 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has quit [Ping timeout: 121 seconds]
23:45 Namegduf [namegduf@Nightstar-5c10d129.beshir.org] has joined #code
--- Log closed Wed Jun 30 00:00:35 2010
code logs -> 2010 -> Tue, 29 Jun 2010< code.20100628.log - code.20100630.log >