|
|
Erik wrote:
> Hi...I've lathed a cup with a glyph spline and now I have no idea how
> to shape the water object to fit into it. Using Moray BTW and tweaking
> the file manually when needed. clipped_by and none of the CSG
> operations seem to be getting me anywhere. Any suggestions other than
> folding the spline to simulate thickness and working the water from
> there?
I put together a demo illustrating how to accomplish what you asked.
I used a SOR object instead of the lathe you are using, but this will not
affect the outcome. This will work with SOR's, Prism's, and Lathe's.
So without further ado ...
/*-- A Vase containg a red liquid - Demo File by K.Tyler 8/98 --*/
// This defines the shape of the Vase and Liquid.
#declare Vase =
sor {
7,
<0.000000, 0.000000>
<0.118143, 0.000000>
<0.620253, 0.540084>
<0.210970, 0.827004>
<0.194093, 0.962025>
<0.286920, 1.000000>
<0.468354, 1.033755>}
// This Differences a Vase shape from a cube to make the Liquid
#declare Liquid =
difference {
box { -1, 1 scale <25, 6, 25> translate 3.5*y }
object { Vase inverse scale 20 } pigment { rgbf <.65,.13,.13,1> }
finish { ambient .5 diffuse 0 reflection .2 ior 1.66 caustics .5}}
// Then we use the same Vase shape as the container for the Liquid
#declare Water_Filled_Vase =
union {
object { Vase scale 20 hollow on pigment { rgbf <.97,.97,.97,1 > }
finish { ambient .3 diffuse 0 specular 1 roughness .004 ior 1.66 brilliance 4}}
object { Liquid scale 1.0001 }}
// The Liquid should be scaled slightly larger than the Vase,
// to avoid the possibility of Coincident Surfaces.
// The Declared Object
object { Water_Filled_Vase translate 12.5*y}
// A Small Pedistal for the Vase
box { -1, 1 scale<10,10,10>translate 2*y pigment{rgb .85}
finish { ambient .4 diffuse .1 reflection .15 }}
/* ---------------------------------- */
// The Camera, Lights, and other Vase object enhancing items
camera{location<0,9,-100>look_at 10*y}
light_source{<0, 4,-170>rgb 1}
light_source{<0,200, 0>rgb 1}
plane{y,0 rotate 3*x pigment { rgb .4 }
finish{ambient .4 diffuse .2 reflection .3}}
sky_sphere{
pigment{gradient y
color_map {[0 rgb .7][1 rgbf<.1,.4,.6,.8>]}}
pigment{bozo
color_map {[0 rgbf<.5,.3,.5,.6>][.5 rgbf .8][1 rgbf 1] } scale 2 }}
K.Tyler et, al
Post a reply to this message
Attachments:
Download 'us-ascii' (4 KB)
|
|