My current WIP (Scrabble) had a need for a helix that I could texture, and I
could not find one in Inigo Quilez article on distance functions, so I decided
to create one myself using his basic principles.
I started just sing a circular cross section, but as you can see from the image,
I abstracted it so you can supply any 2D cross-section SDF, (this one is a
simple 2D square that I rotated 45 degrees).
Since it is an SDF, applying textures by adding noise works as expected.
The updated libisoshapes.inc is in GitHub now:
https://github.com/carath63/povlibrary
-- Chris R
Post a reply to this message
Attachments:
Download 'libisoshapes_test.png' (255 KB)
Preview of image 'libisoshapes_test.png'
|