POV-Ray : Newsgroups : moray.win : Isosurface questions : Re: Isosurface questions Server Time
28 Jun 2024 23:39:00 EDT (-0400)
  Re: Isosurface questions  
From: Tor Olav Kristensen
Date: 9 Jan 2003 09:10:08
Message: <web.3e1d81ad5fe0597fb417814a0@news.povray.org>
Steve Shelby wrote:
>Hi,
>I've been playing with the isosurface plugin, and trying out some things I
>found on various websites, most of which were apparently written for
>MegaPov, and won't parse in PovRay3.5. The problem is, I havn't a clue how
>to change them to work with PovRay3.5. Here's an example:
>
>#declare Cracks = function { pigment{ crackle color_map{ [0 rgb 1][1 rgb
>0] }}}
>function {(x*x+y*y+z*z-1) +Cracks(x, y, z)*0.5}
>
>Here's what Pov gives me:
>
>   File: isocrackle.pov  Line: 96
>      (x*x+y*y+z*z-1) + Cracks( x, y, z )
>
>   } <----ERROR
>Parse Error: Expected '.', } found instead
>Returned from renderer with error status
>
>That doesn't make any sense to me. There are several others I've tried with
>similar results. Does anyone know how to make this work?

Now that you have found a solution,
you may find it interesting that this
will give the same results:

#include "functions.inc"
#declare CracksFn=function{pattern{crackle}}

function{(x*x+y*y+z*z-1)+(1 - CracksFn(x, y, z))*0.5}


Tor Olav


Post a reply to this message

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