POV-Ray : Newsgroups : povray.binaries.images : Liquid glass : Re: Liquid glass Server Time
13 Oct 2024 07:09:30 EDT (-0400)
  Re: Liquid glass  
From: PM 2Ring
Date: 7 Apr 2005 14:45:00
Message: <web.42557cb6cc332c023d6ca37a0@news.povray.org>
Tim Cook <z99### [at] bellsouthnet> wrote:
> From my Material IORs chart:

> Diamond                    2.417

Correct, so why does consts.inc still have

#declare Diamond_Ior     = 2.47;

like it has since the days of DKBTrace? :(

Attached is an Ideal-Cut diamond with correct IOR, but the photons are not
quite realistic, although it does give a rather pretty effect, IMNSHO. :)

// Persistence of Vision Ray Tracer version 3.5 Include File
// File: brilliant5.inc
// Desc: The 'brilliant' gem-cut. Parameters from "Diamond Design" by
M.Tolkowsky
// Date: 2004.5.28
// Auth: PM 2Ring
// The "Brilliant" object is centered on the Origin, with girdle in the XZ
plane.
//
// INCLUDE FILE: DO NOT RENDER DIRECTLY!

#version 3.5;

//"Brilliant" parameters from "Diamond Design" by Tolkowsky. h:height,
r:radius, a:angle
#local htable =  0.324;
#local rtable =  0.550 * .89;
#local rgird  =  1.000;
#local hpav   = -0.862;
#local hculet = hpav+1/64;

#local acrown = -34.5;
#local astar = -20;
#local agirdhi = -39;
#local agirdlo = 42.75;
#local apav = 40.75;

#local ff=.9815;        //Fudge factor. Well, you know... :)

//Create MK facets, 'phase' K. Facet 0 passes through (X,Y,0) at angle A.
//N is facet (normal) direction: 1=face up, -1=face down.
#macro Facet(K, MK, X, Y, A, N)
  #local T=radians(A);

  //Find height of plane through (X,Y,0), with angle A to +ve X-axis
  #local H=N*(Y*cos(T) - X*sin(T));

  #while (K<MK)
    plane{N*y,H rotate <A,360*K/MK,0>}
    #local K=K+1;
  #end
#end

//Brilliant cut
#local BBound = cylinder{hculet*y, htable*y, rgird}
//#local BBound = box{<-rgird,hculet,-rgird>, <rgird,htable,rgird>}

#declare Brilliant =
intersection{
  object{BBound}

  plane{y,htable}                         //Table
  Facet(0.5, 8, rtable,htable,astar, 1)   //Stars
  Facet(0.0, 8, rgird,0,acrown, 1)        //Crown
  Facet(0.5,16, rgird*ff,0,agirdhi, 1)    //Upper Girdle

  Facet(0.5,16, rgird*ff,0,agirdlo, -1)   //Lower Girdle
  Facet(0.0 ,8, 0,hpav,apav, -1)          //Pavillion
  plane{-y,-hculet}                       //Culet

  bounded_by{BBound scale 1.001}
}

//Conical Brilliant
#declare BrillCone =
merge{
  cone{0,rgird, y*htable,rtable}
  cone{y*hpav,0, 0,rgird}
}

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


Post a reply to this message


Attachments:
Download 'diamondq2.png' (304 KB)

Preview of image 'diamondq2.png'
diamondq2.png


 

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