POV-Ray : Newsgroups : povray.unofficial.patches : complicated functions : Re: complicated functions Server Time
1 Sep 2024 20:13:33 EDT (-0400)
  Re: complicated functions  
From: Chris Huff
Date: 10 Nov 2000 07:08:17
Message: <chrishuff-5CD136.07082310112000@news.povray.org>
In article <3A0B61CC.86B37226@hotmail.com>, Pabs <pab### [at] hotmailcom> 
wrote:

> Why not just use shaders to specify the isosurface funcs?

I assume you mean replace functions with shaders...that would most 
likely be slower. Isosurface functions are designed to take a simple 
equation and return a float value, shaders take all sorts of 
instructions and calculate a color. It would also be harder to write the 
scene code...functions are a lot simpler than shaders.
I think a syntax like this would be most useful:

#declare Sphere =
function(x, y, z, Px, Py, Pz, R)
{
    r - sqrt((x-Px)^2 + (y-Py)^2 + (z-Pz)^2)
}

The "x, y, z" variables would be the default, but you could specify your 
own variables to use instead.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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