12:55 PM
@dot_Sp0T Hmm?
And hello!

dotSp0t is probably referring to unread messages in the conversion above
Hi!

Yes, probably!

I got an unprovoked Microsoft confirmation code to my phone today :/ Hopefully no one has stolen my identity
(Or even just phone number)

Having your entity stolen looks like a fkn nightmare...

Probably just a typo from someone with a similar email address. Good thing you have a second factor enabled to give you some peace of mind in the off chance it was more than that.

1:06 PM
Not email, SMS
Probably a typo, sent an email to the linked websites (an university in Finland) IT department, asking for any information linked to the phone number and if they can figure out if it's a typo or not

Ah. Even easier to typo a phone number then.
Good idea following up, just to be safe.

keep us updated :D
anyway whatcha all up to today?

Making my MFC class code reentrant.
\0/

aweseom!

I'm eating cookies and solving partial differential equations
Slowly starting to get the hang of these, really cool stuff!

1:19 PM
smooth!

Edgy actually. Since they are only partially differentiable.
Possibly jumpy.

snarky!

It's not really (at least in the current equations) about the smoothness, it's partial differentation because the functions are multivariable

What's the use of this, in real life?

Wave equations for an example, in one dimension you have a multivariable function U(x, t) that returns the displacement of a suspended string at a specific position and time

1:29 PM
Ah okay!
That's the kind of "use it or lose it" knowledge :P

Yeah, IDK if I'll actually ever end up using this :D But it's definitely interesting stuff to learn, and the course goes into my minor in math
Multivariable calculus does come up a bit in graphics stuff though

Really? Shader stuff?

Yeah, I can't remember the exact formula, but I've used a Jacobian matrix, which is basically a matrix of partial differential operators, to calculate normals for a heightmap that is transformed onto a sphere
Doing this in a shader for pixel-perfect normals

Cool!

2:33 PM
@Vaillancourt I've used these for finding analytical formulas for integrating non-linear game state changes over a time step.
I think this answer involved a Jacobian, but I'll confess I'm a bit fuzzy on the exact derivation... gamedev.stackexchange.com/a/183913/39518

3:07 PM
@DMGregory Interesting!

Mostly I just ask Wolfram for stuff like this, 'cause I've forgotten how to solve differential equations: gamedev.stackexchange.com/a/185803/39518

> "They" is me, and yes you can.
Also, that's too complicated math for what I can absorb at the moment :P

Wolfram Alpha is a lifesaver

I guess! If I had to do that kind of thing

2 hours later…
5:26 PM
That and the Online Encyclopedia of Integer Sequences. Got some game system that needs very specific numbers, but you've only worked out a few cases so far? Plug in those numbers and see if it's a well-studied sequence with a generating formula you can use. :D

6:17 PM
@DMGregory Not sure I understand what you mean here.

Tying it back to the question about tile based maps wrapping around a sphere. Say you're working out how many tiles you can fit, and you know that 12, 32, 42, and 72 work...

@DMGregory that is smart
but heck if i was smart enough to apply that

if i haven't linked this already, check this out: http://songho.ca/opengl/gl_sphere.html

It's a joy to read and has nice texture-solutions.

I confess I just got those by doodling soccer balls in my notebook. After I'd filled a page with 4 examples then I started hacking away to find the pattern.

6:36 PM
But while a few folks are here, I got a weird issue with my rotations. Namely that after multiplying a quaternion maybe a hundred times with 1deg increases, the quad i rotate noticeably changes size during rotations (pulsates).

do you think that might just be floating-point fragments, or sth wrong with my math? (gif follows)

Definitely not floating point errors if it's that noticeable

that's after running about 10-15 rots or more
and 1 deg per function call, one call per frame, 60fps

Do you normalize your quaternion periodically to make sure it remains unit length?

no i don't. that's probably it

When you use the current value of a variable as an input to compute the next value, you create a feedback loop. Any tiny rounding error in the input can compound into a slightly larger error in the output, on and on, snowballing with each iteration until it becomes significant/noticeable.

6:46 PM
yeah that's why i thought it'll be the floating-point error accumulating
but posting it here made you mention normalizing, which i totally forgot about doing again

Yeah. The floating point error alone isn't a problem - you'll get a length within about 2^-23 of the true value after one multiplication. That's an error much smaller than a pixel.

i was thinking along the line of somehow smoothening each component, e.g. by multiplying them with 1e+6, casting to an int, and dividing back to floating point

Do not do that.
2

i know that's silly
but that was the best idea i had before you brought normalizing back to my brain
^^
and it very likely would've worked

The problem is the feedback loop, that takes an insignificant error and amplifies it. We often blame floating point for errors that come from the way we chose to use the numbers, not from the number format itself. 😉

6:52 PM
if you cut off the error-margin before it accumulates then it'd work
A standard 32bit C float should have around 7 digits of precision before it all falls apart if that weird bit of knowledge is right
Universities make you learn weird stuff

Something like that. I like to think "2^-24 relative precision". Take the number you want to represent, X. You'll be able to represent it to within +-(X*2^-24)
I have a table of expected precision in this answer I look up from time to time. 😁

but then again the whole thing has been rotating for the past 10 or more minutes and stays stable in size, normalizing it is - which means the floating point was right

Or, "right enough" ;)

and the normalizing solution is way better than keeping a floating point degrees running and rotating clean quaternions every frame

2 hours later…
9:05 PM
We tend to do transformations in the order of: translate * rotate * scale * position
But wouldn't it make more sense to scale at the end? So: scale * translate * rotate * position
So all movements (positional change) are in worldcoordinates instead of scaled coordinates?

Generally if I say "translate by 1 unit" I really want the object to move 1 unit, even if I had to scale its model to 1.52x to make it look right next to my other assets.
Also, if you apply a non-uniform scale after rotating, then the axes the scale is applied to can be different from the object's axes, making it visually skew in a weird way. Lemme find an example...
Here you can see a non-uniform scale applied after rotation. It can be a cool effect, when you want it, but it's not the most intuitive thing we'd want all the time as our default:
1

We can construct a matrix representing this transformation by simply reversing the order in which we normally apply scale and rotation: Matrix4x4 RotationInvariantScale(Vector3 axisAlignedScaleCoeffs, Quaternion orientation) { Matrix4x4 scaleMatrix = Matrix4x4.Scale(axisAlignedScaleCoeffs...