Hacker News new | past | comments | ask | show | jobs | submit login

I think a little toy raytracer is another great thing to try out. Just something that outputs bitmap graphics of spheres and does diffuse and specular reflection, couple light sources. Should be a relatively self-limited project if you don't go too crazy with it.



I went to a university with a great computer science & video games major, and while I didn’t finish out all the credits, I took a couple of the videogame classes; holy shit, you will never learn more about how to abuse geometry and data structures than trying to render graphics.


Not just geometry on the math side but numerical computation and linear algebra as well. Was enough to make my head spin.


That is in the sequel! “More challenging projects every programmer should try”

https://austinhenley.com/blog/morechallengingprojects.html


Hey, putting a ray tracer and a web browser in the same category of "more challenging projects" seems a bit weird. A ray tracer is a weekend project. A web browser is a multiple man-years project, unless you use a third-party HTML+CSS engine and a third-party JS engine.


depends on the ray tracer. You can make "a" ray tracer in a weekend. You can spend months making a mid-scoped tracer if you decide to pick up PBRT (which is online for completely free now!): https://pbr-book.org/4ed/contents

If you want to upgrade your "weekend" ray tracer to a 2-4 week project, I'd suggest:

1. have it take input a scene/model file (FBX is the industry standard but also a pain in the butt because Autodesk. I'd suggest looking at gltf or blender scenes). This may or may not mean supporting triangles/quads if you only focused on spheres and planes.

2. texture support. Which sounds easy and then you enter the wonderful world of sampling. you can dive as shallow or as deep as you want there.

3. acceleration structures to improve runtime.

for a small start.


Try using USD instead[0]. It's an open scene description from Pixar that is well documentented and seeing adoption across the board - including apps like Blender.

[0]https://openusd.org/release/index.html


Their definition of web browser is basically the UI and renderer for a text based browser.


A fully featured, commercial ray tracer takes many years, much like a fully featured, commercial web browser.


My point is that a barebones ray tracer (spheres, planes, metal vs plastic) is much, much simpler than a barebones web browser (a minimal HTML parser + a minimal CSS parser and cascading + a minimal JS implementation + a miimal layout engine + a minimal renderer).

A text-only browser without scripting support, like lynx, could be a more reasonable project, but still larger than a basic ray tracer, or even a ray tracer + a basic material system.


Ray Tracing in One Weekend is a popular tutorial series for those interested in trying this out https://raytracing.github.io/


My friend did one of these in a weekend!

https://raytracing-iow.shuttleapp.rs

``` curl --request POST --header 'Content-Type: application/json' --data '{"height":10,"width":10}' https://raytracing-iow.shuttleapp.rs ```


Or go more esoteric: "Raycasting engine in Factorio 1.1": https://youtube.com/watch?v=0bAuP0gO5pc


that's listed in the followup post, and a lot of people have done it within a day. it's a pretty amazing cost-to-benefit ratio




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: