Settings

Theme

Show HN: Godray – a simple ray tracer

github.com

13 points by ppymou 11 years ago · 12 comments

Reader

ppymouOP 11 years ago

Wrote this with friend as a learning project for golang. Any golang tips would be much appreciated.

856dfiuk 11 years ago

What would you recommend for writing a simple ray tracer? Any books or websites?

  • ppymouOP 11 years ago

    For 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 will probably help.

  • pavlov 11 years ago

    Physically Based Rendering is a great, practical book on writing raytracers:

    http://www.pbrt.org

drewmate 11 years ago

Are 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.

  • jackhxs 11 years ago

    Hi, 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.

  • ppymouOP 11 years ago

    The 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.

_ph_ 11 years ago

What is the license for the code?

  • ppymouOP 11 years ago

    Ah. An oversight on our part, we will make it MIT licensed so feel free to do whatever you want with it.

  • jackhxs 11 years ago

    I've added MIT license to the repo.

mazeway 11 years ago

How do you find a friend to study and write code with you?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection