logoalt Hacker News

Ray Tracer in SQL

35 pointsby kbumsiktoday at 2:27 PM8 commentsview on HN

Comments

agustechbrotoday at 4:48 PM

In the Age of AI coding, this lovely cool demos are no longer interesting anymore. I use to appreciate them by the craftsmanship and hacking aptitude they required, but now AI took away that joy of watch this for me.

show 2 replies
laszlokortetoday at 4:40 PM

Very cool! I did a similar (but much simpler!) experiment by implementing perspective projection via SQL, storing meshes (vertices, edges, faces), the camera position and the screen size in tables and building a single query that generates the SVG paths (including backface culling). Running via WASM SQlite inside the web browser. [1]

  SELECT project(...) as x, project(...) as y 
  FROM model, vertex, camera, transform 
  WHERE clockwise AND clipped IN BETWEEN -1 AND 1
[1]: https://static.laszlokorte.de/sql3d/
cma256today at 3:59 PM

Very cool project. Next they should create a database with SQL. Querying my database's database with my database's SQL's SQL would be trippy.

Jgoauhtoday at 4:03 PM

Nice, but why ?

show 2 replies