8 ms·
Show HN: Godray – a simple ray tracer
- ppymou 11y agoWrote this with friend as a learning project for golang. Any golang tips would be much appreciated.
- 856dfiuk 11y agoWhat would you recommend for writing a simple ray tracer? Any books or websites?
- pavlov 11y agoPhysically Based Rendering is a great, practical book on writing raytracers: http://www.pbrt.org http://www.pbrt.org
- ppymou 11y agoFor me, going through wikipedia article on phong and working out the math with my friends (instead of just blindly translating the equations to code) really helped me understand the basics. In order to learn more (I admittedly know very little about anything other than the phong model - the other friend is much more knowledgable), I presume either a textbook or a course notes like this https://www.student.cs.uwaterloo.ca/~cs488/notes.pdf https://www.student.cs.uwaterloo.ca/~cs488/notes.pdf will probably help.
- drewmate 11y agoAre there any dependencies to run it on Windows? I do 'go run src/main.go' on Windows, and nothing happens and there are no errors reported.
- ppymou 11y agoThe code should have no dependency other the standard go library. You should see an output.png if it run successfully in the same folder. Sorry, no easy access to a windows right now, but I will try it out on when I get a chance.
- jackhxs 11y agoHi, I worked on this project as well. I tried it on Windows, it ran without issues. If you run 'go run src/main.go', it should create output.png in the current directory. Then you should be able to run 'explorer output.png' to view the image.
- _ph_ 11y agoWhat is the license for the code?
- not_with_retard 11y ago"To run without compilation" `go run` compiles the application, then runs it, the executable simply doesn't appear in the current directory as it would with `go build`. I know sometimes it's tough to tell because of the insanely quick compilation speeds ;)
- mazeway 11y agoHow do you find a friend to study and write code with you?