create.stephan-brumme.com
The Mersenne Twister Pseudo Random Number Generator
http://create.stephan-brumme.com/mersenne-twister
The Mersenne Twister Pseudo Random Number Generator. August 19, 2014. Is often regarded as the fastest pseudo-random number generator which passes almost all statistical tests. The original C code. Isn't exactly beautiful, therefore I decided to write my one C class. And for the fun of it, I converted the code to Javascript and added a two live demos, too (scroll down. This demo will give you the first 10. Random numbers generated by the Mersenne Twister. Value will change the sequence of random numbers.
create.stephan-brumme.com
Fast CRC32
http://create.stephan-brumme.com/crc32
November 10, 2011. By Stephan Brumme, updated. February 4, 2015. Real life data tends to get corrupted because machines (and humans) are never as reliable as we wish for. One efficient way is make sure your data wasn't unintendedly modifiied is to generate some kind of hash. That hash shall be unique, compact and efficient:. Any kind of modification to the data shall generate a different hash. As few bits or bytes as possible to keep the overhead low. On my blog, too. CRC32 algorithm in C/C . If you aren...
create.stephan-brumme.com
Drawing Antialiased Circles and Ellipses
http://create.stephan-brumme.com/antialiased-circle
Drawing Antialiased Circles and Ellipses. December 1, 2011. PHP's GD image library can draw all kinds of circles and ellipses. But they look rather ugly because they lack proper antialiasing:. Aside from GD image handling stuff, it's a single line of code:. Img, $width/ 2. Width,$height, $color);. The image above was created by the following PHP file (click show. Draw red ellipse, 2*10px border. Duration = number format. Send PNG to browser. PNG ALL FILTERS);. To be the zoom factor):. Img, $scale);.
create.stephan-brumme.com
Sorting STL Containers
http://create.stephan-brumme.com/stl-sort
September 7, 2011. By Stephan Brumme, updated. February 27, 2014. Yes, there is. Yes, it's pretty much the most efficient way to sort generic STL containers. No, it's not perfect. What if the data is already almost sorted? Doesn't benefit a lot from processing already sorted data. However, it's quite common to have (partially) sorted data. Which are sometimes not available for custom containers. The syntax is completely different:. Fill mylist with data . Must use this instead:. Most routines work with.
create.stephan-brumme.com
Read-Only Git Access Available
http://create.stephan-brumme.com/misc/git.html
Read-Only Git Access Available. February 15, 2013. If you don't know. Grab one of tutorials on the web. Using My Git Repositories. I added a git repository to these projects on create.stephan-brumme.com. That already came with a big yellow download button, e.g.:. Git clone http:/ create.stephan-brumme.com/crc32/.git. You have read-only access via http and any push will produce an error message. Whenever I update my projects (bugfixes, enhancements, .), you can get the latest version:. Add web server's URL.
create.stephan-brumme.com
Portable C++ Hashing Library
http://create.stephan-brumme.com/hash-library
Portable C Hashing Library. February 5, 2014. By Stephan Brumme, updated. June 14, 2014. Let's start with the core features of my C hashing library:. Computes CRC32, MD5, SHA1 and SHA256 (most common member of the SHA2 functions), Keccak. And its SHA3 sibling. Keyed-hash message authentication code). No external dependencies, small code size. Can work chunk-wise (for example when reading streams block-by-block). Supports Windows and Linux, tested on Little Endian and Big Endian CPUs. Git clone http:/ cre...
create.stephan-brumme.com
Software License
http://create.stephan-brumme.com/misc/license.html
April 24, 2013. I received many kind requests from companies willing to use code from create.stephan-brumme.com. I publish my code because I believe that sharing knowledge makes this world a better place. Therefore all code will be under a zlib-style license now. This applies to all past and future postings. The full license can be found on http:/ create.stephan-brumme.com/disclaimer.html. In short, you can do with it whatever you want. Each file's header contains a reference to the license, too:.
create.stephan-brumme.com
Windows 7 Screenshots
http://create.stephan-brumme.com/misc/shotty.html
October 17, 2011. I ran Windows XP for many, many years and skipped Vista. After switching to Windows 7, I had problems taking screenshots because the background shines through the semi-transparent window borders of Windows 7's Aero user interface. Below is my OpenCL tool Clein. In front of my blog. Pressing Alt-Print gives undesired results - while the screenshot on the right side is how it should look:. Of Shotty is available, too. Give it a try. August 17, 2016:. SmalLZ4 - optimal LZ4 compression.
create.stephan-brumme.com
smallpt - Global Illumination in Javascript
http://create.stephan-brumme.com/smallpt-js
Smallpt - Global Illumination in Javascript. September 12, 2011. Published a C Monte Carlo path tracer that is just 99 lines. Short Despite this limit the code supports the most common materials: diffuse and specular reflection as well as refraction. Oops, your browser doesn't support HTML5 canvas . Path tracers never finish their computations. If you are looking for the perfect image then you need to wait until Last Judgment. I arbitrarily chose to abort after each pixel was oversampled 100 times. Overh...