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.
A woman was killed at a “gender reveal” party after being struck by shrapnel from an explosive contraption: “a metal stand, gunpowder and colored powder were involved,” report police. At about 4:03 p.m., police responded to a report that a woman, later identified as 56-year-old Pamela Kreimeyer, had been severely injured in an explosion, according […]
A family visited the Bragg Funeral Home in Paterson, New Jersey for a private viewing of their deceased relative Doris Chapman. When they opened the casket though, it wasn’t Champman inside but someone else wearing Chapman’s clothing. And the funeral home employees didn’t believe them. The family plans to sue. From KCBD: The family says […]
Landon Meir creates convincing “Hyperflesh” masks of celebrities like Steve Carell and Rainn Wilson.
Want an online presence that matters? As the graveyard of fallen start-ups can attest to, having a fancy website and a sleek logo isn’t worth much unless people actually start engaging with them. Even on the fast changing web, there are ironclad strategies for marketing that can adapt to any platform. The best way to […]
Big things are happening in tech with AI and deep learning. That’s not exactly a news flash when you look at how often companies use algorithms to manage everything from online advertising to the songs, videos, posts, and other digital content platforms recommend for their users. Getting into the field requires a pretty broad range […]
In the early days of the web, everyone wanted a .com domain for their site. As a results, all the good ones got snapped up. But .com no longer has the cachet it once did. In fact, many new business and individuals are opting for other top-level domain extensions. One of the most memorable is […]