Raytracing is a method for drawing scenes by modeling beams of light, illuminating and richocheting off objects. It's realistic but very slow, and only the newest and most expensive video cards [Amazon] introduce it to realtime games. MySQL is the most commonplace relational database, the sewer containing all the web's fatbergs, the last thing on earth you'd use for number-crunching graphics. Or ... is it? Behold the MySQL Raytracer, by Holtsetio.
This is a raytracing engine contained in a single Mysql SELECT statement. In the beginning of the code there are a few parameters that can be modified. The scene can be specified using the @triangles and @squares parameters, but everything is explained in the comments. The whole query returns a bitmap file which can be written to the filesystem using the "INTO DUMPFILE" syntax at the end of the query, if mysql has filesystem write permissions.
The raytracer supports shadows and reflections, which makes it, to my knowledge, the most advanced MySQL raytracer on the market right now. However, it is not really polished and kinda slow. Since I didn't really know how to present this work in a demoparty friendly way, I just included two finished renderings.
The White House Counsel’s “crazy, ranty” legal nastygram to House Leader Nancy Pelosi over impeachment was, Noah Shachtman writes, crafted by Trump himself. Asawin Suebsaeng and Sam Stein, at the Daily Beast: Trump had also privately consulted on the letter with Rudy Giuliani, his notably pugnacious personal lawyer who is at the center of the […]
At The Washington Post, Antonia Noori Farzan reports on an alleged zoophile who demanded farmers let him at the horses while conducting a terrifying stalking campaign against those who refused. For well over a year, two mysteries consumed a peaceful New Jersey community. The 31-year-old was arrested Oct. 3, according to the New Jersey Herald. […]
Twitter reports that email address and phone numbers added for security reasons such as two-factor authorization “may have inadvertently been used for advertising purposes.” When an advertiser uploaded their marketing list, we may have matched people on Twitter to their list based on the email or phone number the Twitter account holder provided for safety […]
Still using elbow grease to clean the sinks, tubs and other grimy surfaces around your house? Save your elbows, and some time. If you’ve got a power drill, the RevoClean® 4-in-1 Drill Brush Cleaning Kit will instantly turn it into a professional scrubber that can tackle any stain on any surface. Attach the 4″ nylon […]
Need data storage? Join the club. It may still seem like the wild west out there, and for many companies, it’s a tough choice between security and accessibility. Luckily, there’s a platform that gives you a lot of both: Polar Backup Cloud Storage. Whether you’re a busy private citizen or managing valuable company data, Polar […]
There are a lot of different language apps out there because nobody learns anything the same exact way – especially not something as complex as a new language. For some people, the best way is to dive in and start talking, but that’s easier said than done if you’re not around those natives you aspire […]