POV-Ray : Newsgroups : povray.general : Minimum Distance Function : Re: Minimum Distance Function Server Time
8 Aug 2022 22:37:00 EDT (-0400)
  Re: Minimum Distance Function  
From: Bald Eagle
Date: 6 Jul 2022 20:15:00
Message: <web.62c625546fb4e4481f9dae3025979125@news.povray.org>
"jceddy" <jce### [at] gmailcom> wrote:

> Is there already functionality implementing a minimum distance to an arbitrary
> object that I missed? I looked for one, but haven't actually asked directly.

I don't believe there is - accessible from the SDL, anyway.  I know that in the
past, people have asked about ways to make pigment patterns based on the
distance of an object from the camera.
Can't find those threads at the moment...

> I am still playing with it a bit, but am thinking that if it might be useful for
> other folks, I should do it "right" so I can submit it over on github.

You are correct - it would be a useful thing to have.

>on the
> right the the object rendered as an isosurface using the minimum distance
> function with a very short annealing period (BTW, the function flips the sign to
> negative for points inside the object, so you have a clean 0.0 threshold at the
> surface of the object).

So, I'm curious, and confused.
This sounds a lot like ray-marching, mixed with signed distance functions.
And how are you taking an algorithm and having that work with a function {} ?


I don't know what you're exactly doing, or the details of how simulated
annealing work, but I'd likely approach this (naively, wrongly) by using the
bounding box and trace (), and only scanning a grid of points corresponding to
the resolution of the render, arranged on a plane just behind the bounding box
and perpendicular to the camera to look_at vector.

And that sounds like a macro more than a proper function...


- Bill


Post a reply to this message

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