POV-Ray : Newsgroups : povray.unofficial.patches : For fun: half full glass : Re: For fun: half full glass Server Time
2 Sep 2024 08:19:16 EDT (-0400)
  Re: For fun: half full glass  
From: Chris Huff
Date: 17 Apr 2000 18:21:03
Message: <chrishuff_99-B0E24D.17234917042000@news.povray.org>
In article <38FB56CE.EEB42B36@my-dejanews.com>, 
gre### [at] my-dejanewscom wrote:

> No, sorry, I didn't want CSG, because my object is a complex blob.

Blobs work fine with CSG...just do something like this:
#macro BlobComponents()
// put your blob components here, to avoid
// having to duplicate them for each blob which
// uses them.
#end

#macro MakeBlobContainer(LiqHeight, ThreshDiff, Thresh, GlassMaterial, 
LiqMaterial)
    union {
        difference {
            blob {BlobComponents() threshold Thresh}
            blob {BlobComponents() threshold Thresh+ThreshDiff}
            material {GlassMaterial}
        }
        intersection {
            blob {BlobComponents() threshold Thresh+ThreshDiff-0.01}
            plane {y, LiqHeight}
            material {LiqMaterial}
        }
    }
#end

And use ThreshDiff to control the thickness of the blob "container".


> I want the interior or texture or media to be two different things (glass 
> vs. glass+liquid).

I am not sure what you mean...

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

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