16,660 reputation
23468
bio website sam.zoy.org
location Paris, France
age 36
visits member for 3 years, 7 months
seen 6 hours ago

I live in Paris, France.

I work on video games (computers and consoles) for a living. I write free software and all kind of crazy shit for fun. My interests: image processing, video coding, rendering, game development, maths, physics, compression, cryptography.


Mar
24
comment How do I lerp between values that loop (such as hue or rotation)?
Dividing a vector by its length is called normalization. It ensures it has length 1. The len ? len : 1.0 part just avoids a division by zero, in the rare case that the mouse is placed exactly at the joint position. It could have been written: if (len != 0) dx /= len;.
Mar
23
answered How do I lerp between values that loop (such as hue or rotation)?
Mar
23
comment Compute cone angle (cos) given side and hypotenuse vectors at time 0 and world matrix at time 1
If your tests show no difference between Transform and TransformNormal, you are not testing enough :-) Try adding a translation part to your tranformation matrix.
Mar
23
answered Compute cone angle (cos) given side and hypotenuse vectors at time 0 and world matrix at time 1
Mar
22
comment Calculating the point(s) at which two moving objects are a certain distance from each other
Just a note: the code would be simpler if you did veld = e1.vel - e2.vel and used that variable everywhere instead of p, r, q and s.
Mar
21
answered Which Unreal Engine 4 project files can I ignore in source control?
Mar
19
answered Sweep collision between two moving spheres?
Mar
8
comment From Position/Target to Orientation/Elevation
I suppose you mean 2.6e-06. That is perfectly normal when doing computations with floating point numbers. You can get slightly better precision using double instead of float, but I see little reason to aim for that: a difference of 2.6e-06 in the camera orientation is a displacement smaller than a thousandth of a pixel.
Mar
7
comment From Position/Target to Orientation/Elevation
Ah. If you switch Y and Z, the first argument to the second atan2 call should become dy.
Mar
7
comment From Position/Target to Orientation/Elevation
Well, swapping dy and dz is the way to go. Maybe you’re not converting radians back to degrees?
Mar
6
revised From Position/Target to Orientation/Elevation
nicer code
Mar
6
answered From Position/Target to Orientation/Elevation
Mar
4
comment Given face normal and vertices of a triangle, how to find the acyclic order of vertices?
Given that a cross product is only additions and multiplications, and assuming the implementation is correct, if a cross product results in NaN values it means that one of the initial vectors had a NaN component. Maybe you have uninitialised data in your triangle lists?
Mar
4
awarded  Yearling
Mar
4
answered Given face normal and vertices of a triangle, how to find the acyclic order of vertices?
Feb
22
awarded  Booster
Feb
20
awarded  Nice Answer
Feb
10
awarded  Popular Question
Feb
7
answered Lerping back and forth in Coroutine
Feb
5
comment Improving the performance of smooth movement up and down
Well I think your time (and, indirectly, ours) would be best used learning profiling tools and techniques, so that you can pinpoint the parts that are actually slow.