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


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
revised How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
spare a function call
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
revised How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
fix syntax
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
revised How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
give the solution to the question that wasn’t really asked…
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
29
answered How to rotate a set of points on z = 0 plane in 3-D, preserving pairwise distances?
May
26
awarded  Notable Question
May
25
answered Draw a rotated rectfill in Allegro 4.2?
May
9
awarded  Nice Answer
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
20
answered Find closest point from an origin, in a mesh
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.
Apr
2
answered Having trouble setting color in fragment shader
Apr
1
revised How to use mocaps in your game if they don't loop smoothly?
reword a few things