The Ray Tracer Challenge: A Test-Driven Guide to Your First 3D Renderer (Pragmatic Bookshelf)
G**R
Challenging but so rewarding
Highly recommended, this is most educational book I have read in the last... 5-10 years?A typical chapter will include some descriptions of a ray tracer concept, pseudo code illustrating core parts of the algorithm, a minimal test case example, and then a bunch of test cases assigned for you to finish. These test cases you have to write and then implement are where you prove you really understand what's going on with each ray tracer concept. I suggest you stick with it no matter how long it takes and don't skip ahead, this experience was invaluable.I learned a lot about ray tracing while going through this and came out with a really cool library I can use to render graphics in lots of different ways. It took me at least a year, some parts were very challenging beyond the ray tracing (like how to manage and refactor this growing codebase one chapter at a time), but in the end it all worked out nicely :)This book sets the bar very high for other Pragmatic Bookshelf titles to live up to.I was stuck at least twice and browsing through the forums for this book gave invaluable clues, I recommend to check it out. There are also interesting discussions there for ways to optimize the raytracing logic and implement cool new features.Another review claims that Cucumber test suite is required to use this book, it is certainly not. Examples for test cases are given as short pseudocode Cucumber files, which you can translate into other languages or test frameworks.
O**R
This book is a lot of fun!
The book is awesome! It starts with the basic stuff, gets you to render images quickly and, mostly importantly, explains why you're spending time on implementing a particular piece of code.The book's tests-first approach pays off quickly. It keeps the bug count low and gives you the confidence that the math, shading and intersection code is solid and you can continue to build on top of it.The book's code is mostly pseudocode that is trivial to translate into whatever implementation language you pick. The language really doesn't matter. I used JavaScript and added multi-process rendering to speed things up. I might go back to this book in the future and use C. There are no rendering libraries, no OpenGL/DirectX/Vulkan code and custom book library code to deal with. You write everything from first principles. The images are by default rendered into a memory object and saved to disk in PPM format. I added PNG support because it was easy after implementing the book's PPM functionality.One thing the author does well is he guides you through the details until the point where he can take the training wheels off and you can implement features by yourself.I highly recommend this book to anyone interested in computer graphics. It really is an excellent book!
W**M
Perfect for those looking to practice programming in a new language
I previously bought Jamis' book on Mazes and enjoyed that, so this seemed like a great idea -- I was starting a new job, and needed a project to force myself to learn a new programming language as a result.This book isn't programming language specific -- don't expect guidance setting up your editor or IDE of choice here.What you do get, however -- a guided tour thru the process, background, and math involved in building a ray tracing application with the added bonus of being able to incorporate unit tests into your development following the examples given in the book.I've gone thru the book once so far using Python ( a language I was already familiar with ) -- now I'm working my way thru again using C#.I'd recommend this to anyone looking for practice programming projects (either in a familiar language, or as a tool to help master a new one. )
R**D
THIS is that metaphoric Pearl of Great Price
I just purchased the Kindle ebook version of this, right after I read the preview which was of David Buck's glowing foreword. David Buck, of course, is _the_ DKB who co-authored POV-Ray. So, look. I use Ubuntu because I am a programmer who REFUSES to use Windows. And my pet peeve with Kindle ebooks is that I have to read them by browsing Amazon's Cloud reader with a Linux compatible browser. But ... ANY book which David Buck recommends is a book I want to buy. And, so far, I have not been disappointed. From the first page, this book has that K&R "C Programming Language" vibe which inspired me to teach myself C, and which latter inspired me to teach myself C++ from reading Strustrup's EXCELLENT book. BUY THIS BOOK. You will NOT regret it.
F**H
Wonderful introduction to the world of graphics
I've had this book for a couple years now, and thanks to the COVID pandemic, finally got around to read/implement it. The explanations are clear and to the point. There's loads of unit tests given so you can do Test Driven Development, which is a godsend since graphics programming is very error proned. There is just enough theory and lots of pseudo code to help you along the way. The pacing of the book is also very good, each section starts with basic theory then there's unit test and then some pseudo code that you can implement . I can't recommend this enough. The book is programming language agnostic, I did mine in Rust, but the pseudo code can be translated to any programming paradigm.
S**N
Wow!
The test driven approach of this book is excellent.The book is easy to read, explanations are crystal clear, and if you need help you can use the book's forum.You can build your own ray tracer from scratch bit by bit, step by step and it will be totally covered by tests.It's really exciting feel the accomplishment every time your tests pass and see the results of your effort in an image (a picture is worth a thousand words).You don't have to be a math wizard to fully understand the book.What are you waiting for?, buy your copy of this book and prepare to have a lot of fun.
F**S
Great book
Great book. I did struggle in a few spots. When doing the tests it is good to know the many WILL fail until you read the solution presented pages later. Read ahead.
D**R
Brings fun back to programming
And as a plus you will dive into Cucumber as a testing framework.If you want a deeper dive into the underlying math, this is probably not for you.But if you want to see a project come together and build momentum, this is a fun read.
M**H
Every developer should write a ray tracer!
Arguably one of the few books that every developer should own.You really will build a ray tracer from scratch. You should be prepared to do a lot of work yourself, but the important mathematics and basic structure are supplied.The test-driven nature of the book may be alien at first, and you can probably ignore most of the tests anyway (though as you get to chapters 7 and beyond you'll find them invaluable for keeping your codebase free(ish) of bugs), but if there ever was a case for a test-driven project, then a ray tracer is surely it.I'd ignore the entire matrix section and implement 4x4 matrix determinants, inverse, etc., using code found online. You code will be simpler, quicker, and it'll save you a lot of effort trying to implement these features using the frankly horrible 2x2 and 3x3 sub-matrix code (which isn't explained that well).Once you've finished the book there are three bonus chapters online that are well worth working through.I've always wanted to write a ray tracer. And now I have a project that will keep me busy for months, if not years!Recommended for everyone who loves coding.
T**T
Un bon bouquin qui aurait pu être excellent
Un bon livre à l'approche intéressante, aux explications claires, aux schémas très réussis... qui aurait pu être tout bonnement excellent s'il n'avait eu les deux défauts suivants :- L'approche "test-driven" aurait pu, et dû, être optionnelle. Libre à chacun de vouloir implémenter tous les tests, seulement certains, ou encore n'en implémenter aucun. Si vous décidez de ne pas suivre cette approche, vous aurez à faire de la gymnastique pour vous adapter et suivre le bouquin tel quel malgré tout. Ces tests, détaillés au caractère près, prennent de la place pour quelque chose qui aurait été pourtant capital, cf point suivant.- L'implémentation des calculs mathématiques devrait être plus mise en avant. Si l'implémentation concrète va dépendre du langage utilisé et des méthodes de design propres à chacun, rien n'aurait empêché d'utiliser du pseudo-code ou encore des exemples dans un ou plusieurs langages. Après tout, les tests ne sont-ils pas présentés dans un langage précis choisi par l'auteur ? Certaines opérations mathématiques sont décrites avec des mots, là où un exemple en pseudo-code aurait été bien plus parlant.Je reste satisfait de cet achat et de cette lecture pour l'instant, mais de mon expérience suivre les étapes dans l'ordre est plus fastidieux que si le bouquin avait été structuré sous la forme explications/schémas, puis implémentation, puis propositions de tests.
A**S
One of the best project based books
I was skeptical about the Test-Driven approach the book suggests, but after going through with it I am quite happy with it. The author explains the topic really well and makes this complicated project really easy to approach. I would definitely suggest getting this book if you want to get some hands-on experience in ray tracing.
H**E
Ótimo livro
Se você gosta de programar e tem interesse em Ray Tracing, eu recomendo bastante esse livro. Ele não dá muito detalhe sobre a parte matemática do Ray Tracing, mas sim em como implementá-lo em um linguagem de programação qualquer.
P**A
Bad on my first try
Feel the author leaves us hanging on some parts. Maybe the next time I read it - and if I also try a different language - I'll find it better.
Trustpilot
1 month ago
1 day ago