POV-Ray : Newsgroups : povray.binaries.images : Barkeep! Another round! : Barkeep! Another round! Server Time
2 Oct 2024 16:28:36 EDT (-0400)
  Barkeep! Another round!  
From: Charles Krause
Date: 8 Apr 2000 20:22:52
Message: <38efcd5c@news.povray.org>
Here's a test run from a Macro/Model that I'm working on, which is a fully
parameterized model of a bar glass.

Except for the tabletop, every object in the scene, even the tray, is
created by sending different parameters to the macro.

The macro is called like this,

#macro bar_glass
        (
        glass_height,
        glass_radius,
        wall_thickness,
        base_thickness,
        outer_rounding_radius,
        inner_rounding_radius,
        glass_material,
        drink_material,
        filled                  // Valid values 0 to 1.0. Determines
       // how 'full' of the drink_material the
       // glass is.
        )

which should be pretty self-explanatory, I hope.

The objects are my attempts at guessing the rough dimensions of a highball
glass (far left and right glasses), a regular drink glass, and a shot glass.
The left and right highball glasses are of slightly different design, even
though they are the same dimensions. The parameter values were just pulled
out of the air, so if you think the glasses are mis-proportioned  that's the
modeler's fault, not the model :> In fact, more realistic dimensions would
be appreciated if any of you happen to know them :>

The 'bottle' in the middle of the tray is just a really big and thick-walled
glass made of from T_Vicksbottle_Glass in glass.inc, and the tray is just a
very short and wide glass made of Soft_Silver from textures.inc.

The 'contents' of the glasses is a very simple material, just a

         texture { pigment { color rgbf<1.0,0.5,0.5,1> } }

statement. Glass material is standard T_Glass2 from Glass.inc. (acrylic
plastic). If you don't like the materials, the model will take any material
as a parameter.

Empty glasses are created by setting the 'filled' parameter to zero, even
though a dummy parameter must by included in the macro call for
'drink_material'.

It's not a terribly complex model, but I've tried to make it as flexible,
yet as easy to use, as possible.

I want to add some code to check and adjust parameters so you don't
accidentally cut holes in the sides of the glass by misadjusting the
parameters, but other than than the model is pretty much done, barring any
really good suggestions from the public at large (you! :>).

Comments, suggestions, and criticism welcome.


Post a reply to this message


Attachments:
Download 'Glasses.jpg' (86 KB)

Preview of image 'Glasses.jpg'
Glasses.jpg


 

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