POV-Ray : Newsgroups : povray.general : What am I doing wrong? Server Time
19 Nov 2024 05:34:42 EST (-0500)
  What am I doing wrong? (Message 1 to 3 of 3)  
From: Corey Woodworth
Subject: What am I doing wrong?
Date: 8 Apr 2002 02:13:26
Message: <3cb13506@news.povray.org>
Why doesn't this code work?

#declare fun = function { pigment {
  image_map {
    tga "face.tga"
    map_type 0
    interpolate 2
  }
 }
}

and then this in some object:

texture {
 pigment {
   fun
   color_map {
   [0  color White]
   [1  color Black]
  }
}

it keeps stopping between fun and color_map saying no matching } in pigment
vector function identifier found instad.

HELP!

Corey


Post a reply to this message

From:
Subject: Re: What am I doing wrong?
Date: 8 Apr 2002 02:53:14
Message: <2df2buk3fv1nct50duhaj5rem1ej0idal7@4ax.com>
On Mon, 8 Apr 2002 02:25:42 -0400, "Corey Woodworth" <cdw### [at] mpinetnet> wrote:
> texture {
>   pigment {
>     fun
>     color_map {
>     [0  color White]
>     [1  color Black]
>    }
>  }

probably

texture {
  pigment {
    function{1-fun(x,y,z).gray}
  }
 }

is enough

ABX


Post a reply to this message

From: Christopher James Huff
Subject: Re: What am I doing wrong?
Date: 8 Apr 2002 09:51:19
Message: <chrishuff-4AB83A.09525308042002@netplex.aussie.org>
In article <3cb13506@news.povray.org>,
 "Corey Woodworth" <cdw### [at] mpinetnet> wrote:

> and then this in some object:
> 
> texture {
>  pigment {
>    fun
>    color_map {
>    [0  color White]
>    [1  color Black]
>   }
> }
> 
> it keeps stopping between fun and color_map saying no matching } in pigment
> vector function identifier found instad.

You want "pigment {function {fun(x, y, z)} ...}"...function names were 
never useable directly as pattern identifiers, though that would be a 
nice shortcut sometimes...

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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