  | 
  | 
 
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
So I've got this scene written for MegaPOV 0.7 with the following code 
in it:
#declare worldnet5 = function
   {
   pigment
     {
     marble
     color_map
       {
       [ 0.0 color rgb 0 ]
       [ 1.0 color rgb 1 ]
       }
     rotate <0, 0, 90>
     }
   }
#declare worldnet7 = function { pigment { radial frequency 48 turbulence 
4 } }
#declare worldnet9 = function { (min(worldnet7+.9, worldnet5) * 
(worldnet7 * worldnet5)^3) * 100 }
...and I was trying to make it work in POV-Ray 3.5. Well, changing the 
power operator to pow() was a no brainer, but it kept giving me parsing 
errors for worldnet9, no matter how I tried to fix it. Finally I gave up 
and looked through the documentation to see exactly what was going 
wrong. The documentation is far from easy reading, but the impression 
that I got was that what I'm trying to do may not be possible at all.
As far as I'm concerned, whoever changed functions for 3.5 butchered a 
perfectly good syntax.. but that's not the point, the point is, *is* it 
possible to write this function in 3.5, and if so, how should it look?
-Xplo
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Wasn't it Xplo Eristotle who wrote:
>So I've got this scene written for MegaPOV 0.7 with the following code 
>in it:
>
>#declare worldnet5 = function
>   {
>   pigment
>     {
>     marble
>     color_map
>       {
>       [ 0.0 color rgb 0 ]
>       [ 1.0 color rgb 1 ]
>       }
>     rotate <0, 0, 90>
>     }
>   }
>
>#declare worldnet7 = function { pigment { radial frequency 48 turbulence 
>4 } }
>
>#declare worldnet9 = function { (min(worldnet7+.9, worldnet5) * 
>(worldnet7 * worldnet5)^3) * 100 }
>
>...and I was trying to make it work in POV-Ray 3.5. Well, changing the 
>power operator to pow() was a no brainer, but it kept giving me parsing 
>errors for worldnet9, no matter how I tried to fix it. Finally I gave up 
>and looked through the documentation to see exactly what was going 
>wrong. The documentation is far from easy reading, but the impression 
>that I got was that what I'm trying to do may not be possible at all.
>
>As far as I'm concerned, whoever changed functions for 3.5 butchered a 
>perfectly good syntax.. but that's not the point, the point is, *is* it 
>possible to write this function in 3.5, and if so, how should it look?
>
>-Xplo
>
The syntax is
#declare worldnet9 = function { (min(worldnet7(x,y,z).grey+.9,
worldnet5(x,y,z).grey) * pow((worldnet7(x,y,z).grey *
worldnet5(x,y,z).grey),3)) * 100 }
I know the syntax is slightly more complicated, but that's the price you
have to pay for the considerably increased functionality.
-- 
Mike Williams
Gentleman of Leisure
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
Xplo Eristotle wrote:
> So I've got this scene written for MegaPOV 0.7 with the following code 
> in it:
> 
> #declare worldnet5 = function
>   {
>   pigment
>     {
>     marble
>     color_map
>       {
>       [ 0.0 color rgb 0 ]
>       [ 1.0 color rgb 1 ]
>       }
>     rotate <0, 0, 90>
>     }
>   }
> 
> #declare worldnet7 = function { pigment { radial frequency 48 turbulence 
> 4 } }
> 
> #declare worldnet9 = function { (min(worldnet7+.9, worldnet5) * 
> (worldnet7 * worldnet5)^3) * 100 }
> 
> ...and I was trying to make it work in POV-Ray 3.5. Well, changing the 
> power operator to pow() was a no brainer, but it kept giving me parsing 
> errors for worldnet9, no matter how I tried to fix it. Finally I gave up 
> and looked through the documentation to see exactly what was going 
> wrong. The documentation is far from easy reading, but the impression 
> that I got was that what I'm trying to do may not be possible at all.
> 
> As far as I'm concerned, whoever changed functions for 3.5 butchered a 
> perfectly good syntax.. but that's not the point, the point is, *is* it 
> possible to write this function in 3.5, and if so, how should it look?
> 
Hello Xplo,
If you have a look at http://www.econym.demon.co.uk/isotut/index.htm you 
will find good tutorials that explains the syntax for povray 3.5
All the best
Fidel.
 Post a reply to this message 
 | 
  | 
 
 |   |  
 |   |  
 | 
  | 
 | 
  | 
 
 |   |  
 
 | 
  |