Reputation
18,053
Top tag
Next privilege 20,000 Rep.
Access 'trusted user' tools
Badges
2 37 75
Newest
 Nice Answer
Impact
~405k people reached

Jul
1
answered Unreal Engine 4 — Casting
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
revised How can I simplify this code to compute the shortest rotation between two angles?
suggest another version
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”.