17,504 reputation
23672
bio website sam.zoy.org
location Paris, France
age 36
visits member for 4 years, 1 month
seen 12 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.


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
26
answered How can I simplify this code to compute the shortest rotation between two angles?
Jun
22
answered How to obtain the currently bound texture ID in an openGL ES 2.0 project
Jun
13
awarded  Taxonomist
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
8
awarded  Nice Answer
Jun
4
revised Convert vector interpolation to quaternion interpolation? (Catmull-Rom)
explain the time values
Jun
4
answered Convert vector interpolation to quaternion interpolation? (Catmull-Rom)
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
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