POV-Ray : Newsgroups : povray.general : [stupid q.] isosurface bounding : Re: [stupid q.] isosurface bounding Server Time
5 Aug 2024 08:28:15 EDT (-0400)
  Re: [stupid q.] isosurface bounding  
From: Slime
Date: 27 Oct 2002 13:18:56
Message: <3dbc2e10@news.povray.org>
> >   function { x*x + y*y - 1 }

> so... shat is the real max_gradient for this (tryvial) function ?
>
> Shouldn't real max_gradient be same for all bounding boxes ?

The function's gradient increases farther away from the origin. That's
because it's a function related to the distance from the origin *squared*,
which gets bigger faster as you look at it farther from the origin. (Just
like y=x^2.)

If you want to use this function far away from the origin, it may actually
be faster to make it

function { sqrt(x*x + y*y) - 1 }

Since then the function will have a max_gradient of 1 *everywhere*.

In addition, since the cylinder never goes out more than 1 unit in the X or
Y directions, you may want to switch your contained_by box to

contained_by { box { <-1,-1,-s>, <1,1,s> } }

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

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