POV-Ray : Newsgroups : povray.binaries.images : More isosurface extrusions of 2D SDFs Server Time
6 Jan 2025 19:37:21 EST (-0500)
  More isosurface extrusions of 2D SDFs (Message 1 to 3 of 3)  
From: Chris R
Subject: More isosurface extrusions of 2D SDFs
Date: 23 Dec 2024 14:10:00
Message: <web.6769b4a9eeabe52ed30e597d5cc1b6e@news.povray.org>
I added most of the 2D SDF functions from Inigo's site to my library as well as
a few new utilities for manipulating them.

The rendering shows a 2D SDF generated by starting with an Iso_fixed_2d_box and
an Iso_fixed_2d_circle.  I used Translate_fn_2d (from my libfn.inc library) to
put the circle on the upper right corner of the box and then create a smooth
union sdf from those two functions:

#local _box_size = <1,1>;
#local _circle_r = 0.25;
#local _sdf_box = Iso_fixed_2d_box(_box_size)
#local _sdf_circle = Iso_fixed_2d_circle(_circle_r)
#local _sdf_circle2 = Translate_fn_2d(_sdf_circle,
<_box_size.x/2,_box_size.y/2>)
#local _k = 0.2;
#local _union_fn = Iso_fixed_smooth_union(_k)
#local _sdf1 = function(x,y) {
   _union_fn(_sdf_box(x,y),_sdf_circle2(x,y))
}
#local _sdf = Iso_fixed_2d_annular(_sdf1,0.1)

I created the 4 different views by creating isosurfaces functions:

Iso_fixed_rotation(_sdf,Radius)
Iso_fixed_extrusion(_sdf,Length) (the second one is just rotated and translated
for another view)
Iso_fixed_helix_extrusion(Radius,Rise,Direction,_sdf)

The updated library code is here: https://github.com/carath63/povlibrary

-- Chris R


Post a reply to this message


Attachments:
Download 'libisoshapes_test.png' (171 KB)

Preview of image 'libisoshapes_test.png'
libisoshapes_test.png


 

From: Bald Eagle
Subject: Re: More isosurface extrusions of 2D SDFs
Date: 23 Dec 2024 15:10:00
Message: <web.6769c386def61fd471fd7cd25979125@news.povray.org>
"Chris R" <car### [at] comcastnet> wrote:
> I added most of the 2D SDF functions from Inigo's site to my library as well as
> a few new utilities for manipulating them.

Having tried to implement and visualize some of IQ's SDFs, some of them seem to
not behave very well - at least on the interior of the surface.

Have you tried using your converted functions as a pigment {function {}} and
looking at them on a plane?

https://news.povray.org/povray.advanced-users/thread/%3Cweb.63cd9a0842d33bbf1f9dae3025979125%40news.povray.org%3E/

triangle, 5-pointed star, octogon.


- BW


Post a reply to this message

From: Chris R
Subject: Re: More isosurface extrusions of 2D SDFs
Date: 24 Dec 2024 10:25:00
Message: <web.676ad23fdef61fd3a6dfc485cc1b6e@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "Chris R" <car### [at] comcastnet> wrote:
> > I added most of the 2D SDF functions from Inigo's site to my library as well as
> > a few new utilities for manipulating them.
>
> Having tried to implement and visualize some of IQ's SDFs, some of them seem to
> not behave very well - at least on the interior of the surface.
>
> Have you tried using your converted functions as a pigment {function {}} and
> looking at them on a plane?
>
>
https://news.povray.org/povray.advanced-users/thread/%3Cweb.63cd9a0842d33bbf1f9dae3025979125%40news.povray.org%3E/
>
> triangle, 5-pointed star, octogon.
>
>
> - BW

Here's the same scene using the 5-pointed star SDF.  I have found that using
these functions I need to set the accuracy for the isosurface pretty small to
get good results.  The good thing is that for most of them you don't need big
max_gradients even at those small accuracy values because of the nature of exact
SDFs and the way isosurface computation is done.

For this, accuracy is 1e-5, and max_gradient was 20.  It rendered in 2 minutes
at 6700 PPS.

-- Chris R


Post a reply to this message


Attachments:
Download 'libisoshapes_test.png' (125 KB)

Preview of image 'libisoshapes_test.png'
libisoshapes_test.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.