15,682 reputation
23263
bio website sam.zoy.org
location Paris, France
age 35
visits member for 3 years, 1 month
seen 2 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
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.
Feb
5
comment Improving the performance of smooth movement up and down
How many objects do you have? I have trouble believing that using a sine wave is “slightly slow”.
Feb
4
comment Gerstner wave function simplified?
Here’s a tip: the common typographic convention for vectors is to use boldface.
Feb
3
answered How does this formula for generating water waves work?
Feb
2
comment Why are the coordinates interchanged in Monogame?
If changing the orientation from portrait to landscape doesn’t change anything, you are probably doing it wrong.
Feb
1
comment How does atan2 work when getting angle of a vector?
The blue part of your drawing is wrong.
Jan
28
comment How do I use the dot product to get an angle between two vectors?
Note that your intended use of the dot product only works when the initial vectors are unit vectors.
Jan
24
comment How to optimize the distance function?
This is the best answer. There is nothing to optimise in the distance function; one just needs to use it less often.