12,067,916 members (27,415 online)

Articles by YvesDaoust (Articles: 2, Tip/Tricks: 10)

Average article rating: 4.82

Algorithms & Recipes
General
Posted: 21 Apr 2012   Updated: 23 Apr 2012   Views: 13,310   Rating: 4.87/5    Votes: 11   Popularity: 5.06
We study the problem of computing R cos(a + k b) and R sin(a + k b) for increasing k
Posted: 26 Oct 2013   Updated: 26 Oct 2013   Views: 11,550   Rating: 4.78/5    Votes: 7   Popularity: 4.01
Short study of the perspective projection of a rectangle in space; homography opposed to bilinear transform
No blogs have been submitted.

Average tips rating: 4.27

Posted: 16 May 2011   Updated: 16 May 2011   Views: 1,480   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
// A faster solutionreturn (value & mask) == 0;// Where mask == ~ (None | One | Eight)// This constant can be precomputed at compile-time or run-time (like in Alternate 1)
Posted: 13 Dec 2011   Updated: 13 Dec 2011   Views: 3,110   Rating: 1.80/5    Votes: 2   Popularity: 1.51
array= new int[4][] { new int[] { 5, 1, 0, 0, 0 }, new int[] { 6, 2, 0, 1, 0 }, new int[] { 7, 3, 0, 0, 0 }, new int[] { 0, 4, 0, 0, 0 },};1341 keystrokes spared.
Math
Posted: 23 Dec 2013   Updated: 24 Dec 2013   Views: 16,010   Rating: 4.62/5    Votes: 6   Popularity: 3.63
Yet another home-made implementation of the floor function
Posted: 2 Jul 2014   Updated: 2 Jul 2014   Views: 4,090   Rating: 4.47/5    Votes: 5   Popularity: 3.12
Computation of the Faulhaber polynomials coefficients
Programming Tips
General
Posted: 9 Nov 2010   Updated: 9 Nov 2010   Views: 2,770   Rating: 4.00/5    Votes: 1   Popularity: 0.00
// Real solutions of the quadratic equation A x^2 + B x + C = 0// Returns two roots (possibly identical) in increasing order, or nonebool Quadratic(double A, double B, double C, double R[2]){ if (A == 0) { // Linear, impossible or degenerate, cannot find two roots ...
Posted: 9 Aug 2011   Updated: 9 Aug 2011   Views: 2,960   Rating: 5.00/5    Votes: 1   Popularity: 0.00
What about this, using SSE2 assembly (32 bits):void Zero(void* Buffer, int Count){ char* Cur= (char*)Buffer; char* End= (char*)Buffer + Count; // Clear the initial unaligned bytes while (Cur < End && (Cur - (char*)0) & 0xf) { *Cur++= 0; } // Clear...
Posted: 13 Dec 2011   Updated: 13 Dec 2011   Views: 3,980   Rating: 5.00/5    Votes: 1   Popularity: 0.00
http://msdn.microsoft.com/en-us/library/h5e7chcf.aspx[^]
Posted: 17 Jan 2012   Updated: 17 Jan 2012   Views: 6,420   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0
You shouldn't rely on methods from the .NET classes (Bitmap::SetPixel, Bitmap::GetPixel, Color::FromArgb) in the inner loop as these are called intensively, million times per image, and their implementation are opaque to you.If their implementation is opaque to the compiler too, no code...
Posted: 17 Jan 2012   Updated: 17 Jan 2012   Views: 3,910   Rating: 5.00/5    Votes: 1   Popularity: 0.00
You should be delighted by the CORDIC approach to elementary functions computation.http://drdobbs.com/184404244[^]log10(x){ z = 0; for ( i=1; i= 1) x = x - x*2^(-i); z = z - log10(1-2^(-i)); else x = x + x*2^(-i); ...
Posted: 18 Jan 2012   Updated: 18 Jan 2012   Views: 3,460   Rating: 0.0 / 5    Votes: 0   Popularity: 0.0