POV-Ray : Newsgroups : povray.newusers : Dodgy Wine Glass : Re: Dodgy Wine Glass Server Time
29 Jul 2024 12:25:02 EDT (-0400)
  Re: Dodgy Wine Glass  
From: PM 2Ring
Date: 8 Dec 2005 03:50:00
Message: <web.4397f33190f42f198e989a880@news.povray.org>
"nzdzeni" <nzd### [at] gmailcom> wrote:

> PM 2,
>
> I commented out the planes to see if that would get rid of the noise and
> interstingly, it didn't!  Which would imply that the planes are not the
> problem.

Sorry about that! Still, those planes did need fixing. :)

By way of apology, here is something I derived from what Chris B posted. I
hope you like it.


//-----------------------------------------------------------------------------

/*

Less dodgy wine glass

Derived From: Chris B
Subject: Re: Dodgy Wine Glass
Date: 6 Dec 2005 12:19:07
Message: <439581bb$1@news.povray.org>

PM 2Ring

*/

#include "colors.inc"
#include "glass.inc"

#declare Photons = 1;
#declare Area_Lights = 1;
#declare Use_Sturm = 1;

global_settings {
  assumed_gamma 2.2   //because of glass.inc
  max_trace_level 10

#if(Photons)
  photons {
    count 250000
    autostop 0
  }
#end
}

camera {
  location <0, 2, -2> * 10 * .85
  //location <0, .5, -2> * 10 * .65
  look_at 3.25*y
  angle 50
}

#if(0)
  sky_sphere{pigment{function{abs(y)}}}
#else
  background {color Silver}
#end

#declare Spot = 0.75;
light_source {
  <-5, 6, -3>*25
  //rgb 1
  rgb 640 fade_distance 6.25 fade_power 2
  spotlight point_at 8*z falloff 8*Spot radius 5*Spot tightness 0.1*Spot

  #if(Area_Lights)
    #declare AL = 5;
    #declare ASize = 2.5;
    area_light x*ASize, z*ASize, AL, AL
    adaptive 1
    jitter
    circular
    orient
  #end
}

#declare Floor =
plane {
  y, -1e-4
  texture{
    pigment {cells colour_map{[0 White][0.25 SkyBlue][1 White]}}
    //pigment {color LightBlue }
    pigment {checker SkyBlue, White}
    //pigment {checker rgb <1,.8,.9>, White}

    finish{reflection .25 diffuse 0.75 specular 0.25 roughness 1e-4}
    //finish{diffuse .9}
    //normal{quilted .25 control0 0 control1 0}
    //normal{wrinkles .15 scale 3e-5}

    translate z
    scale 10

    rotate y*45
  }
}

//Wine Glass
#declare WGS = 10;
#declare WGA = array[WGS]    //SOR points
{
  <0.0,  0.4>,
  <2.0,  1.0>,
  <0.2,  1.05>,
  <0.2,  1.08>,
  <0.2,  1.9>,
  <0.2,  4.9>,
  <0.4,  5.3>,
  <2.0,  6.9>,
  <1.5,  9.4>,
  <  2, 10.9>
}

#declare Wine_Glass_Outer = sor {
  #declare I=0;
  WGS,
  #while(I<WGS)
    WGA[I]
    #declare I=I+1;
  #end
  #if(Use_Sturm) sturm #end
  //pigment{checker}
}

#declare TH = 0.025;            //thickness (sort-of)
#declare Wine_Glass_Inner = sor {
  #declare I=5;
  WGS-I,
  #while(I<WGS)
    WGA[I] + <-TH, TH*1e-4>         //move inwards, and up a tiny bit
    #declare I=I+1;
  #end
  #if(Use_Sturm) sturm #end
  //pigment{checker Red,Yellow}finish{ambient .5}
}

#declare Wine = intersection
{
  plane {y, 8.5}
  sor {
    #declare I=5;
    WGS-I,
    #while(I<WGS)
      WGA[I] + <-TH-1e-4, TH*2e-4>         //move inwards, and up a tiny bit
more
      #declare I=I+1;
    #end
    #if(Use_Sturm) sturm #end
  }

  texture {
    pigment{Red filter .6 transmit .4}
    finish{ambient 0 diffuse 0.2 reflection {0,1 fresnel} conserve_energy}
  }
  interior{ior 1.35}

  photons {
    target
    refraction on
    reflection on
    collect off
  }
}

#declare Wine_Glass = difference {
  object{Wine_Glass_Outer}
  object{Wine_Glass_Inner}

  texture {T_Glass3}
  interior{ior 1.5}

  photons {
    target
    refraction on
    reflection on
    collect off
  }
}

//---The
scene--------------------------------------------------------------------------

union{
  object{Wine_Glass}
  object{Wine}

  translate <0, -1, 1>
  //rotate x*-45
}

object{Floor}

//-----------------------------------------------------------------------------


Post a reply to this message

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