POV-Ray : Newsgroups : povray.newusers : parametric function error : parametric function error Server Time
5 May 2024 06:36:56 EDT (-0400)
  parametric function error  
From: Bald Eagle
Date: 19 Jul 2014 17:20:00
Message: <web.53cadfeadf57d4755e7df57c0@news.povray.org>
I was intrigued by the fact that an entire apple could be described by a
parametic equation: (WAY down at the bottom of the page)
http://www.econym.demon.co.uk/isotut/printable.htm

I wanted to play around with this some, but naturally it's been so long that I
have to RElearn how to get my brain to play nicely with functions.

#declare Apple = parametric {
   function { cos(u) * (R1 + R2*cos(v)) + pow((v/pi), 100) },
   function { sin(u) * (R1 + R2*cos(v)) + 0.25 * cos(5*u) },
   function { -2.3 * ln(1 - v*0.3157) + 6*sin(v) + 2*cos(v) }
   <0,0>, <2*pi,pi>
       contained_by { sphere{0, 1.1} }
       max_gradient 10
       accuracy 0.0001
       precompute 10 x,y,z
   texture {pigment {color Red}}
   }
This is throwing a
Parse Error: Expected 'parameter identifier or floating-point constant
identifier', } found instead
at the first _function_ line.

This leads me to believe that I'm missing something, but I've searched and read
things and looked at examples all over the place but haven't been able to lay my
finger on what's causing the error.


Post a reply to this message

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