POV-Ray : Newsgroups : povray.general : media with unions Server Time
5 Nov 2024 07:19:36 EST (-0500)
  media with unions (Message 1 to 4 of 4)  
From: Matt Crawford
Subject: media with unions
Date: 29 Oct 1998 14:24:10
Message: <3638c0da.0@news.povray.org>
I have a quick question, can you spread a media over numerous objects in a
union statement?  That is to say, is it possible to have many objects share
a single media that would show parts of a large media?  If anyone knows what
I mean any help would be greatly appreciated.

Thanks,
Matt


Post a reply to this message

From: Mike
Subject: Re: media with unions
Date: 30 Oct 1998 02:31:24
Message: <363969BD.32DCAA66@aol.com>
You could either do it by making a union and then giving that an interior or
#declare an interior and use it in each object.  For example:

union {
sphere {<1, 0, 0>, 1 pigment {color rgbt <1, 1, 1, 1>}}
sphere {<-1, 0, 0>, 1 pigment {color rgbt <1, 0, 0, .9>}}
hollow
interior {
media {
ect.
}
}
}

Or,

#declare Media_example =
interior {
media {
absorption <1, 0, 0>
}
}

sphere {<1, 0, 0>, 1
pigment {color rgbt <1, 1, 1, 1>}
interior {Media_example}
hollow
}

sphere {<-1, 0, 0>, 1
pigment {color rgbt <0, 1, 1, .8>}
interior {Media_example}
hollow
}

-Mike

Matt Crawford wrote:

> I have a quick question, can you spread a media over numerous objects in a
> union statement?  That is to say, is it possible to have many objects share
> a single media that would show parts of a large media?  If anyone knows what
> I mean any help would be greatly appreciated.
>
> Thanks,
> Matt


Post a reply to this message

From: Margus Ramst
Subject: Re: media with unions
Date: 30 Oct 1998 04:17:55
Message: <3639842F.6A20D8BA@peak.edu.ee>
Mike wrote:
> 
> You could either do it by making a union and then giving that an interior or
> #declare an interior and use it in each object.
/.../

Yeah, but when you #declare a media and use it in each object, there is actually
a separate media for each object. When container object is translated, the media
in it is also translated (unless you do the translation before the interior
statement). This may ruin the effect of having many objects showing a single
media. When you use the media for the entire union, the media is only moved when
the union is moved. Moving the component objects of the union doesn't affect the
media. Keep this in mind.

Margus


Post a reply to this message

From: Dan Connelly
Subject: Re: media with unions
Date: 30 Oct 1998 04:48:37
Message: <36398B70.AF143059@flash.net>
Did you try merge?

Union, it seems to me, is clearly not what one wants.

Dan


Margus Ramst wrote:
> 
> Mike wrote:
> >
> > You could either do it by making a union and then giving that an interior or
> > #declare an interior and use it in each object.
> /.../
> 
> Yeah, but when you #declare a media and use it in each object, there is actually
> a separate media for each object....

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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