from Hacker News

Show HN: Super-Sunshine – A ray-tracer for easily generating beautiful images

by diegomacario on 11/22/17, 1:41 PM with 3 comments

  • by diegomacario on 11/22/17, 1:42 PM

    Hi everyone!

    This year I embarked on a quest to learn as much as I could about computer graphics.

    I initially focused on building small applications using OpenGL, but after completing a few of them, I couldn't stop feeling that I did not fully understand how they worked. OpenGL was simply hiding too many details from me.

    Hoping that building something from scratch would give me more insight, I started working on this ray-tracer. The whole experience quickly devolved into a ridiculous passion project. I built the ray-tracer from the ground up, starting with the API used to perform operations with points, vectors, normals and transformation matrices. I also read Scott Meyer’s “Effective C++” book while I worked on it, which really helped me improve my C++ skills.

    Once I finished it, I challenged myself to explain everything I had learned as clearly as I could. For that purpose, I designed and generated all the images and animations you see in the readme (except for the ones of the Stanford Dragon and the human head). Most of the images started out on paper; I would draw them, break them down into triangles, and figure out the coordinates of each vertex. I found it very satisfying to generate images in such rudimentary fashion. I feel that the constraints imposed by my ray-tracer just push one to be more creative!

    I now believe that building a ray-tracer is the best way to start learning about computer graphics. The whole experience is simply illuminating.

    I hope you enjoy the readme!

  • by rickitan on 11/22/17, 2:16 PM

    The images are beautiful! I've always wanted to learn more about ray tracers. This is going to be an excellent resource!
  • by climber_mac on 11/22/17, 6:02 PM

    Stunning images! It's amazing what you can do some with some simple linear algebra.