16,241 reputation
23465
bio website sam.zoy.org
location Paris, France
age 35
visits member for 3 years, 4 months
seen 7 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.


Jul
16
comment Is it legal to allow users to install replacement game data containing real-world personalities?
This seems relevant: even former dictators could sue you if they aren’t pleased with how you depict them
Jul
4
comment match 3 Shuffling
@Lucas Have you actually calculated or maybe measured the “anomaly”? Even in an extremely pessimistic setting (a 9×9 board with only 4 different candy colours), this algorithm requires 3 iterations in average. The odds that more than 100 iterations are needed are less than 1:500,000. The odds that more than 1000 are needed are 1 in 7 million, the odds that more than 10000 are needed are 1 in 100 million (which happens for very degenerate and unbalanced board settings). The average computer does those 10000 iterations in about 10 milliseconds.
Jul
1
comment Unreal Engine 4 — Casting
@Guest102 “is incorrect”, or “doesn’t seem to work” is not a helpful description of your problem. Be more specific.
Jul
1
comment Unreal Engine 4 — Casting
@Mario it’s 100% C++ (with some build-time generation of headers).
Jul
1
comment Unreal Engine 4 — Casting
@Katu it’s definitely not UScript; the author just said he/she was used to UScript from UE3.
Jun
26
comment How can I simplify this code to compute the shortest rotation between two angles?
They are the same in absolute value, but the sign matters, too. rotationBetween(0,1) should return 1 but it is expected that rotationBetween(1,0) returns -1.
Jun
26
comment How can I simplify this code to compute the shortest rotation between two angles?
This cannot be correct. It returns the same value for rotationBetween(a,b) and rotationBetween(b,a).
Jun
8
comment Surface normal to screen angle
The screen angle is not “obviously” pi/4. It is closer to pi/6, actually. The normal vector always lies on a line that goes through the centre of the sphere. Here is a more accurate drawing.
Jun
4
comment Convert vector interpolation to quaternion interpolation? (Catmull-Rom)
Have you tried simply interpolating the quaternion components, then normalising the result? It is definitely “more direct” and the results are very similar.
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
@cagirici Could you maybe paste sample values for A B C P Q R, for the two intermediate matrices, and for the final matrix? This could help reproduce results and find the problem.
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
@cagirici This is usually caused by a) mismatched matrix multiplication order, b) mismatched matrix layout. Since you don’t use a fully standard API, it might require tweaking. Try to transpose M in makeMatrix(), or try to swap the arguments to mul(), or try to do both.
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
@cagirici okay, if you know three points in the target plane, then the problem becomes easy and you don’t even need a b c d. I posted new code in my answer.
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
Can you maybe rewrite the question to say precisely what data you know and what you don’t? Right now it looks like you know a, b, c, d, but it seems that you actually don’t? Also in your 2D representation, the b distance isn’t actually preserved, is that an error?
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
@MartijnCourteaux But the question doesn’t mention these three points, and they appear nowhere in the code… The question is “I want to turn a plane into another plane, preserving the pairwise distances”.
May
29
comment How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
Yes, they’re from your question: “I have another set of points double[] m on the plane ax + by + cz + d = 0”.
May
7
comment determine collision angle on a rotating body
I’m afraid I don’t understand the drawings. What is the blue rectangle? The blue line? The black circle? The two black lines? The red line? What is actually colliding with what? For this answer to be useful to other people, it should be a bit more clear what you are asking.
Apr
15
comment Relative Position/Rotation calculation
Almost everything is wrong in here. All lines mentioning someUnknownMatrix have the wrong multiplication order, and one even inverts the wrong matrix. And the last part ignores the impact the rotation has on the relative translation.
Apr
14
comment OpenGL: glRotatef cause performance drop while rotating -x and -y
glRotatef will cause performance drops, period. It’s been superseded by better mechanisms for 10 years and deprecated for 6 years now. You should learn yourself some modern OpenGL instead.
Apr
2
comment Having trouble setting color in fragment shader
You can divide integers, but in GLSL, as is the case in C, C++ and many other languages, the result of 127 / 255 will be 0.
Mar
27
comment Compute world position by walking N units along spline?
You should fix your variable names. If Distance is the alpha value, why not call it Alpha? And… what is Alpha, then?