POV-Ray : Newsgroups : povray.beta-test : Object pattern in densities? Server Time
31 Jul 2024 04:23:39 EDT (-0400)
  Object pattern in densities? (Message 1 to 3 of 3)  
From: Ben Chambers
Subject: Object pattern in densities?
Date: 14 Sep 2001 12:01:25
Message: <3ba229d5@news.povray.org>
I started messing with the object pattern, and got it to work in a pigment
(great work, guys!).  However, I have not been able to make it work with
densities (the parser gives me an error for the color values after the
nested object{}).  Would this be possible, or will we have to use
workarounds?  (A workaround for this situation is, in fact, quite easy, but
that's not the point - I want to know if what I am trying to do is, in
general, possible).

Here's my scene:
camera {
  location <-5,0,0>
  look_at 0
}

box {
    <-5,-5,-1>,<5,5,1>
    pigment {color transmit 1}
    interior {
        media {
            emission red 1
            density {
                object {
                    sphere {0,1.25}
                    color red 1
                    color blue 1
                }
            }
        }
    }
}

...Chambers


Post a reply to this message

From: Tony[B]
Subject: Re: Object pattern in densities?
Date: 14 Sep 2001 12:49:13
Message: <3ba23509@news.povray.org>
It has to be predeclared. You can't just put it in like that.


Post a reply to this message

From: Ben Chambers
Subject: Re: Object pattern in densities?
Date: 14 Sep 2001 13:22:32
Message: <3ba23cd8@news.povray.org>
"Tony[B]" <ben### [at] catholicorg> wrote in message
news:3ba23509@news.povray.org...
> It has to be predeclared. You can't just put it in like that.

Which part needs to be predeclared?  What I wrote works perfectly well for a
pigment (I tried it first, to make sure I had the syntax), but in a density
it does not.  I've just tried predeclaring it as a density, and it gives me
the same error as when I type the full part in, ie,
Parse Error: No matching } in 'object', color found instead

What I want to know is, can the object pattern be used in a density and, if
so, how?

...Chambers


Post a reply to this message

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