POV-Ray : Newsgroups : povray.binaries.images : Invitation: The Gate is Never Locked : Re: Invitation: The Gate is Never Locked Server Time
2 Aug 2024 20:19:34 EDT (-0400)
  Re: Invitation: The Gate is Never Locked  
From: Allan
Date: 17 Jun 2007 19:45:01
Message: <web.4675c75f753da72387a47510@news.povray.org>
"Kirk Andrews" <kir### [at] hotmailcom> wrote:

> You can turn any pigment into a function, so first declare an image pattern
> pigment, and then declare a function using that pigment.  This is my code:
>
> #declare PGate =
> pigment {
>   image_pattern {
>     jpeg "Gate/GateStructure4.jpg"   // image file to read
>   }
> }
>
> #declare GateF =
> function {
>   pigment {PGate scale 10000*z}
> }


Kirk,

It appears that I need a little help on your "image as function" code.  If I
try to render the object (see below) POVray tells me this:

{
 function
 {
  GateF(x,y,z)
 }
Parse Error: Expected '.', } found instead

Did I misunderstand your sample?

-Allan



Here is my code...

#declare PGate =
pigment
{
  image_pattern
  {
    jpeg "GateStructure4.jpg"   // image file to read
  }
}

#declare GateF = function {pigment {PGate scale 10000*z}}

isosurface
{
  function
  {
    GateF(x,y,z)
  }
  accuracy 0.01
  threshold 1.0
  contained_by {box {-2,2}}
  max_gradient 35
  uv_mapping
  material
  {
    texture
    {
      pigment {color rgb <0.98, 0.83, 0.58>}
      normal
      {
        brick 0.5 //amount
      }
      finish
      {
        diffuse 0.6
        brilliance 1.0
      }
    }
    interior
    {
      ior 1.3
    }
  }
}


Post a reply to this message

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