tsoding / ray-tracer

My ongoing effort to learn how to make Ray Tracers
MIT License
15 stars 2 forks source link

Marching: constructive solid geometry #36

Open w23 opened 5 years ago

w23 commented 5 years ago

With clever combinations of min, max and all this carp it's easy to add, subtract and intersect geometry. Also: repetition, mirroring, domain transforms.

Depends on #35

rexim commented 5 years ago

@w23 If I understand correctly you refer to https://en.wikipedia.org/wiki/Constructive_solid_geometry which sounds really interesting to implement on the stream. Thanks!

But why does it depend on #35 ?

w23 commented 5 years ago

Because it's trivial to do for distance functions. I believe any other approach will require a lot of head scratching (never tried myself).

rexim commented 5 years ago

@w23 ok, let's resolve #35 first then. :)