Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
HoboMan
Nov 4, 2010

ah, these hiring things make my job hunt make more sense. even as late as last week i was getting calls for first-round interviews at places i had applied for months ago and had completely forgotten about.
hopefully my "sorry i already found a differnt job" helped motivate a couple hr departments
i know it didn't

my favorite was the one where they were ready to hire me but the opening went up for review and management decided that since the position had been open so long that they were not going to fill it

Adbot
ADBOT LOVES YOU

hobbesmaster
Jan 28, 2008

JawnV6 posted:

reporting to my new terrible programming job at the fruit stand

do y'all think I'll have to come in Tuesday too!?

if an Apple Store is a fruit stand what is the apple hq?

JawnV6
Jul 4, 2004

So hot ...
dunno but I already showed up at the wrong building, go me

FamDav
Mar 29, 2008
I know quaternion chat died a page back but another important benefit is that renormalization of quarternions is necessary much less often than for rotations, and when it is necessary is much simpler to do.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

HoboMan posted:

ah, these hiring things make my job hunt make more sense. even as late as last week i was getting calls for first-round interviews at places i had applied for months ago and had completely forgotten about.
hopefully my "sorry i already found a differnt job" helped motivate a couple hr departments
i know it didn't

my favorite was the one where they were ready to hire me but the opening went up for review and management decided that since the position had been open so long that they were not going to fill it

this explains a lot. i sent out a few resumes after the last round of office politics and have heard back on precisely 0.

my transfer date is in 2 months, if they gently caress me on salary ill be sending out more resumes.

hobbesmaster
Jan 28, 2008

JawnV6 posted:

dunno but I already showed up at the wrong building, go me

how long was the hiring process btw?

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

HappyHippo posted:

seriously what kind of moron automatically replaces strings like that. you're just begging for trouble

to think that cloud-to-butt is more careful about the words it filters...

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
longest i've seen for time from sending my resume to hearing back is 6 months. and somehow telling them i've already found a job just seemed to make them even more eager to have me come in for an interview, probably because they figured if some other place hired me i can't be that terrible. joke's on them, i'm terrible, but i'm still not dumb enough to waste my time interviewing somewhere that seems to be run with all the efficiency of soviet bureaucracy

HoboMan
Nov 4, 2010

i didn't really get anything back until i took sort of a shotgun approach to my job hunt.
"just apply to everything and let the interview process sort it out."
i was seriously applying to a half dozen every day for a month. there were days i would submit multiple dozens.
this was after a month of applying only to stuff i wanted and was sure i could do and not hearing back from anything.

after all that i got replied to by like a dozen within a week tops and most of those were "you are no longer under consideration" emails.

ofc, after i get a job is when i start getting a glut of calls.
i just thought my resume was bad or something

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
i just rode my unemployment benefits until a former coworker called from a new company and asked if i still need a job.




...after which the hiring process took several months

tef
May 30, 2004

-> some l-system crap ->

JawnV6 posted:

dunno but I already showed up at the wrong building, go me

rip jawn's effort posts

jony neuemonic
Nov 13, 2009

make friends with a recruiter, imo.

Valeyard
Mar 30, 2012


Grimey Drawer
i like when i come accross code that other people have wrote, and it makes my life easier when making changes

but sadly sometimes i realise I am not able to keep up with this level and my additions are not As Good

VikingofRock
Aug 24, 2008




FamDav posted:

I know quaternion chat died a page back but another important benefit is that renormalization of quarternions is necessary much less often than for rotations, and when it is necessary is much simpler to do.

So forgive me if this is a stupid question because I don't really do graphics stuff. But don't rotations preserve normalization by definition? Is the problem that rotation matrices have more floats, so floating point errors accumulate quicker?

hobbesmaster
Jan 28, 2008

VikingofRock posted:

So forgive me if this is a stupid question because I don't really do graphics stuff. But don't rotations preserve normalization by definition? Is the problem that rotation matrices have more floats, so floating point errors accumulate quicker?

thanks to floating point precision unit vectors/quats/whatever are only approximately 1. changing a rotation matrix is a more floating point operations than changing a quat and when you apply a matrix you have fewer operations too.

when you have to deal with this yourself you're usually in for a bad day

HoboMan
Nov 4, 2010

quats are cool and i remember seeing a video series on youtube explaining them in a "building them up in the natural progession it took real people" perspective that i never got around to watching
i would have linked it, but i can't find it

fritz
Jul 26, 2003

MALE SHOEGAZE posted:

i drop down to buttembly when i want to get really close to the metal

buttembly the scrivener

HoboMan
Nov 4, 2010

poo poo, all this linq jazz got me wanting to just chain method calls all day long.
i'm finding not many things support this.

cinci zoo sniper
Mar 15, 2013




starting to get pissed at python's struct error messages, they don't help to understand anything at all

VikingofRock
Aug 24, 2008




I think the basic theory of quaternions isn't that complicated if you are already comfortable with complex numbers. Instead of having numbers of the form (a + bi) you have (a + bi + cj + dk). Addition works in the intuitive way. For multiplying, it's just a few simple rules. i*i = j*j = k*k = -1. When you multiply them in the i->j->k->i order you get the next one in that sequence: i*j = k, j*k = i, k*i = j. When you multiply them in the reverse order (i -> k -> j -> i), you get a negative out in front: i*k = -j, k*j = -i, j*i = -k. For conjugation you just switch the sign of the i/j/k terms, so the conjugate of (a + bi + cj + dk) is (a - bi - cj - dk). The norm of (a + bi + cj + dk) is sqrt(a^2 + b^2 + c^2 + d^2). You can draw pretty clear analogues of these to complex numbers as well.

It's the applications of quaternions that I wish I knew more about. Also as a physicist I've always thought it would be real neat to come up with a representation of GR using quaternions that was as tidy as using complex numbers to represent E&M stuff, but alas I am a mere experimentalist who is leaving the field after I graduate, and my eyes glaze over whenever I read the heavy theory papers, so I guess I will leave that to the theorists.

HoboMan
Nov 4, 2010

naming a chainable Add function MonAdd seemed like a hilarious idea at the time...

Sapozhnik
Jan 2, 2005

Nap Ghost

VikingofRock posted:

I think the basic theory of quaternions isn't that complicated if you are already comfortable with complex numbers. Instead of having numbers of the form (a + bi) you have (a + bi + cj + dk). Addition works in the intuitive way. For multiplying, it's just a few simple rules. i*i = j*j = k*k = -1. When you multiply them in the i->j->k->i order you get the next one in that sequence: i*j = k, j*k = i, k*i = j. When you multiply them in the reverse order (i -> k -> j -> i), you get a negative out in front: i*k = -j, k*j = -i, j*i = -k. For conjugation you just switch the sign of the i/j/k terms, so the conjugate of (a + bi + cj + dk) is (a - bi - cj - dk). The norm of (a + bi + cj + dk) is sqrt(a^2 + b^2 + c^2 + d^2). You can draw pretty clear analogues of these to complex numbers as well.

It's the applications of quaternions that I wish I knew more about. Also as a physicist I've always thought it would be real neat to come up with a representation of GR using quaternions that was as tidy as using complex numbers to represent E&M stuff, but alas I am a mere experimentalist who is leaving the field after I graduate, and my eyes glaze over whenever I read the heavy theory papers, so I guess I will leave that to the theorists.

Apparently Maxwell wrote the initial version of his field equations using quaternions and it made everyone's head hurt a whole heck of a lot until complex analysis got invented and the equations got recast into the more understandable modern form

HoboMan
Nov 4, 2010

actually i meant that video series was specifically explaining and building up the use of quaternions in the context of 3d computer graphics

quats as an isolated object are not too hard to think about, it's just how to use them to perfom fast 4d rotations (and imporantly why it works) is the part i wanted to learn

Luigi Thirty
Apr 30, 2006

Emergency confection port.

I think I need to figure out the math behind how to have a 90-degree horizontal fov at 320x200 first

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

VikingofRock posted:

I think the basic theory of quaternions isn't that complicated if you are already comfortable with complex numbers. Instead of having numbers of the form (a + bi) you have (a + bi + cj + dk). Addition works in the intuitive way. For multiplying, it's just a few simple rules. i*i = j*j = k*k = -1. When you multiply them in the i->j->k->i order you get the next one in that sequence: i*j = k, j*k = i, k*i = j. When you multiply them in the reverse order (i -> k -> j -> i), you get a negative out in front: i*k = -j, k*j = -i, j*i = -k. For conjugation you just switch the sign of the i/j/k terms, so the conjugate of (a + bi + cj + dk) is (a - bi - cj - dk). The norm of (a + bi + cj + dk) is sqrt(a^2 + b^2 + c^2 + d^2). You can draw pretty clear analogues of these to complex numbers as well.

It's the applications of quaternions that I wish I knew more about. Also as a physicist I've always thought it would be real neat to come up with a representation of GR using quaternions that was as tidy as using complex numbers to represent E&M stuff, but alas I am a mere experimentalist who is leaving the field after I graduate, and my eyes glaze over whenever I read the heavy theory papers, so I guess I will leave that to the theorists.

is there a euler's identity for quaternions?

e: yes but it's not interseting

DONT THREAD ON ME fucked around with this message at 21:12 on Jul 11, 2016

HoboMan
Nov 4, 2010

MALE SHOEGAZE posted:

is there a euler's identity for quaternions?

e: yes but it's not interseting

extending this to (non-euclidian) metric spaces is where it gets more interesting

HoboMan fucked around with this message at 21:17 on Jul 11, 2016

cinci zoo sniper
Mar 15, 2013




Mr Dog posted:

Apparently Maxwell wrote the initial version of his field equations using quaternions and it made everyone's head hurt a whole heck of a lot until complex analysis got invented and the equations got recast into the more understandable modern form
maxwell originally wrote 20 equations that heaviside did rewrote into 4 equations around the time vector algebra was invented

Bloody
Mar 3, 2013

Mr Dog posted:

Apparently Maxwell wrote the initial version of his field equations using quaternions and it made everyone's head hurt a whole heck of a lot until complex analysis got invented and the equations got recast into the more understandable modern form

maxwell made a 20 equation mess of garbage that everybody ignored until the most autistic man Oliver heaviside came along and reformulated it into the modern form

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

kalstrams posted:

maxwell originally wrote 20 equations that heaviside did rewrote into 4 equations around the time vector algebra was invented

Bloody posted:

maxwell made a 20 equation mess of garbage that everybody ignored until the most autistic man Oliver heaviside came along and reformulated it into the modern form

i can't imagine how loving painful it must have been without vector calculus. it could be even better if physicists would get off their asses and finally discover a magnetic monopole because then you could get some more sweet, sweet symmetry in those equations

Sapozhnik
Jan 2, 2005

Nap Ghost
2D rotation using complex numbers:

A complex number is a two-dimensional number built by adding some multiple of i to a number on the real number line to send it up off the number line and onto the 2D complex plane. i is this weird thing that has the property i*i = -1. So like, x + iy for some real numbers x and y is a complex number. It's a 2D number, w/e. Standard arithmetic works as you'd expect, though you have to take a sideways step if you're trying to do division, which involves a "conjugate" (you flip the sign in the middle, change the + to a - or vice versa)

Ae^{i\theta} = A\cos\theta + iA\sin\theta. Easily proven by considering the Taylor series for exp, cos, and sin and the fact that i*i = -1. So you can write a complex number using cartesian co-ordinates or as an angle and a distance from the origin, and that equation tells you how to convert between the two forms, just apply algebra and basic trig.

If you encode a point as a cartesian complex number and then multiply it by a complex number (call it "r") whose distance from the origin ("modulus") is 1 then you'll rotate by r's counterclockwise angle from the positive real axis (its "argument"). So if you really wanted to do 2D rotation using complex numbers that's how you'd do it. If the modulus wasn't 1 then you'd also scale by the modulus in the process. Whatever.

Complex multiplication is commutative just like real multiplication. Stacking up a bunch of 2D rotations is also commutative. Good to know.




3D rotation using quaternions:

Three imaginary units instead of one: ii = jj = kk = ijk = -1. Fiddle with that and you'll see that these are not commutative, so multiplying on the left gives you a different answer to multiplying on the right. aaaag that's weird. Yeah well matrices also have the same problem, and so does 3D rotation: change the order of a sequence of 3D rotations and you end up facing in a different direction at the end.

Quaternion is something like w + ix + jy + kz. w is the real bit, everything else is the imaginary bit. Vectors are encoded as purely imaginary quaternions (w = 0).

Let's say you want to a thing that rotates other things by \theta radians about an arbitrary unit vector (x,y,z). That thing looks like

q = e^{\frac{\theta}{2}(ix + jy + kz)} = \cos \frac{\theta}{2} + (ix + jy +kz) \sin \frac{\theta}{2}

Why theta divided by 2? I dunno, it's just like that. The important thing is that you have to divide theta by two to compute q and then you evaluate the right hand cartesian side to get tuple of four reals. That's a rotation quaternion. Unlike a quaternion vector it has both a real and an imaginary part. How do you use that to rotate something? Take an imaginary vector v that you want to rotate and calculate qvq^{*}. q^{*} is the quaternion conjugate and it's just like the complex conjugate: flip the sign in the middle of the equation above. Why does qvq^{*} rotate v by q? Because gently caress you.

Why use them instead of matrices? Because multiplying (combining) a bunch of rotation quaternions together is faster than doing the same thing with matrices, which is handy if you want something to be rotating constantly. Also because you can tween between two rotation quaternions whereas you can't really do that with matrices.

idk if any of that helps. probably not.

cinci zoo sniper
Mar 15, 2013




ffs this struct thing is getting annoying
code:
. [80, 584024144, 1048576, 524288, '=524288h', 1, 706772912, 122748768, 1048576, 122748768]
. [80, 585072720, 1048576, 524288, '=524288h', 1, 706772912, 121700192, 1048576, 121700192]
. [80, 586121296, 1048576, 524288, '=524288h', 1, 706772912, 120651616, 1048576, 120651616]
. [80, 587169872, 1048576, 524288, '=524288h', 1, 706772912, 119603040, 1048576, 119603040]
. [80, 588218448, 1048576, 524288, '=524288h', 1, 706772912, 118554464, 1048576, 118554464]
Traceback (most recent call last):
  File "script.py", line 128, in <module>
    real=real, datafile=datafile)
  File "/path/codebase.py", line 125, in binary
    data.append(np.array(unpacker.unpack(storage.read(line_bytes)), dtype=np.float32))
struct.error: unpack requires a string argument of length 1048576
so, in that list that's being printed, we have
header in bytes, pointer in bytes, data size to read in bytes (line_bytes), number samples to read (line_samples), sample format (form), irrelevant variable, effective size of the current file in bytes, unread amount of data in the current file in bytes, irrelevant variable, and effective remaining amount of data in bytes

code where it breaks
code:
storage.seek(header + pointer)
data.append(np.array(unpacker.unpack(storage.read(line_bytes)), dtype=np.float32))
where
code:
form = format % (line_samples)
unpacker = struct.Struct(form)
and
code:
storage = io.open(self.source[datafile], 'rb', buffering=0)
for the life of me i cant figure out why it seemingly randomly has broken at that point, if, as you see from earlier in the log (new line = successful read) - it did work just fine before that

HoboMan
Nov 4, 2010

Mr Dog posted:

idk if any of that helps. probably not.

i think TeX broke your brain (and ability to have sane notation)

cinci zoo sniper
Mar 15, 2013




HoboMan posted:

i think TeX broke your brain (and ability to have sane notation)

fritz
Jul 26, 2003

Mr Dog posted:

Why theta divided by 2? I dunno, it's just like that.

this:
http://math.stackexchange.com/questions/1385028/concise-description-of-why-rotation-quaternions-use-half-the-angle

has a couple good answers


there's a bunch of doubled things in quats, like the fact that (w,x,y,z) and (-w,-x,-y,-z) represent the same rotation and this: https://en.wikipedia.org/wiki/Plate_trick

VikingofRock
Aug 24, 2008




YeOldeButchere posted:

i can't imagine how loving painful it must have been without vector calculus. it could be even better if physicists would get off their asses and finally discover a magnetic monopole because then you could get some more sweet, sweet symmetry in those equations

Hey we found one, it's finding the second that's been giving us trouble!

gonadic io
Feb 16, 2011

>>=

VikingofRock posted:

Hey we found one, it's finding the second that's been giving us trouble!

well duh, it's not called a duopole

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

ynohtna posted:

whatever happened to dart?

I liked NewSpeak more

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?

JawnV6 posted:

reporting to my new terrible programming job at the fruit stand

do y'all think I'll have to come in Tuesday too!?

probably

congratulations

Luigi Thirty
Apr 30, 2006

Emergency confection port.

can someone help me out with my rasterization routine?

code:
        //screenCoords[i] = vector between <(-1,1),(-1,1),(-1,1)>

        //Perform scaling. The screen is (-1,1) along the X and Y axes.
        float scaleFactor = 50.0f;
        screenCoords[i].x = screenCoords[i].x * scaleFactor + SCREEN_WIDTH/2;
        screenCoords[i].y = screenCoords[i].y * scaleFactor + SCREEN_HEIGHT/2;
    }
this obviously is the equivalent of a super-tight FOV. how i calculate 90-degree fov :saddowns:

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

ynohtna posted:

whatever happened to dart?

chrome team refused to ship the vm in mainline chrome and js developers weren't really interested in it as a compile-to-js lang, but they claim to have some uptake within google for server-side stuff

  • Locked thread