POV-Ray : Newsgroups : povray.binaries.images : Crystal with photons Server Time
19 Nov 2024 15:33:06 EST (-0500)
  Crystal with photons (Message 1 to 4 of 4)  
From: Andrew
Subject: Crystal with photons
Date: 19 Dec 2001 14:26:14
Message: <3c20e9d6@news.povray.org>
OK, I posted this the other day, but I chose a subject line that had
(predictably) already been used, and thus my picture ended up way back
in the history.  But it's nice and small, so I hope you don't mind me
posting again...

For those that wanted the source, it's below.  The icosohedron was
produced with a program called Dome by Richard J Bono, and the
dodecahedron is lifted from one of Warp's posts.  Unfortunately they
didn't match up nicely, so the rotation is done by eye, and the crystal
is not perfectly symmetrical as a result.


#global_settings {max_trace_level 25 photons {count 50000}}

#declare Icosohedron=mesh {
triangle{<0,0,1>,<0.894427,0,0.447214>,<0.276393,0.850651,0.447214>}
triangle{<0,0,1>,<0.276393,0.850651,0.447214>,<-0.723607,0.525731,0.4472
14>}
triangle{<0,0,1>,<-0.723607,0.525731,0.447214>,<-0.723607,-0.525731,0.44
7214>}
triangle{<0,0,1>,<-0.723607,-0.525731,0.447214>,<0.276393,-0.850651,0.44
7214>}
triangle{<0,0,1>,<0.276393,-0.850651,0.447214>,<0.894427,0,0.447214>}
triangle{<0.723607,0.525731,-0.447214>,<0.276393,0.850651,0.447214>,<0.8
94427,0,0.447214>}
triangle{<-0.276393,0.850651,-0.447214>,<-0.723607,0.525731,0.447214>,<0
.276393,0.850651,0.447214>}
triangle{<-0.894427,0,-0.447214>,<-0.723607,-0.525731,0.447214>,<-0.7236
07,0.525731,0.447214>}
triangle{<-0.276393,-0.850651,-0.447214>,<0.276393,-0.850651,0.447214>,<
-0.723607,-0.525731,0.447214>}
triangle{<0.723607,-0.525731,-0.447214>,<0.894427,0,0.447214>,<0.276393,
-0.850651,0.447214>}
triangle{<0.276393,0.850651,0.447214>,<-0.276393,0.850651,-0.447214>,<0.
723607,0.525731,-0.447214>}
triangle{<-0.723607,0.525731,0.447214>,<-0.894427,0,-0.447214>,<-0.27639
3,0.850651,-0.447214>}
triangle{<-0.723607,-0.525731,0.447214>,<-0.276393,-0.850651,-0.447214>,
<-0.894427,0,-0.447214>}
triangle{<0.276393,-0.850651,0.447214>,<0.723607,-0.525731,-0.447214>,<-
0.276393,-0.850651,-0.447214>}
triangle{<0.894427,0,0.447214>,<0.723607,0.525731,-0.447214>,<0.723607,-
0.525731,-0.447214>}
triangle{<0,0,-1>,<0.723607,0.525731,-0.447214>,<-0.276393,0.850651,-0.4
47214>}
triangle{<0,0,-1>,<-0.276393,0.850651,-0.447214>,<-0.894427,0,-0.447214>
}
triangle{<0,0,-1>,<-0.894427,0,-0.447214>,<-0.276393,-0.850651,-0.447214
>}
triangle{<0,0,-1>,<-0.276393,-0.850651,-0.447214>,<0.723607,-0.525731,-0
.447214>}
triangle{<0,0,-1>,<0.723607,-0.525731,-0.447214>,<0.723607,0.525731,-0.4
47214>}
scale 1.088 rotate <45,-22.5,-22.5>
}

#local p=(1+sqrt(5))/2; // the Golden ratio
#local p2=pow(p,2);
#local p3=pow(p,3);

#local
Vert=array[20]{<0,p,p3>,<0,-p,p3>,<p2,p2,p2>,<-p2,p2,p2>,<-p2,-p2,p2>,<p
2,-p2,p2>,<p3,0,p>,<-p3,0,p>,<p,p3,0>,<-p,p3,0>,<-p,-p3,0>,<p,-p3,0>,<p3
,0,-p>,<-p3,0,-p>,<p2,p2,-p2>,<-p2,p2,-p2>,<-p2,-p2,-p2>,<p2,-p2,-p2>,<0
,p,-p3>,<0,-p,-p3>}
#local
TInd=array[36]{<0,1,3><1,3,7><1,7,4><0,2,8><0,8,9><0,9,3><2,6,12><2,12,1
4><2,14,8><3,7,13><3,13,15><3,15,9><0,1,5><0,5,6><0,6,2><1,5,11><1,11,10
><1,10,4><7,13,16><7,16,10><7,10,4><9,8,14><9,14,18><9,18,15><5,6,12><5,
12,17><5,17,11><12,14,18><12,18,19><12,19,17><10,11,17><10,17,19><10,19,
16><13,15,18><13,18,19><13,19,16>}


#declare Dodecahedron=mesh{
#local Len=vlength(Vert[0]);
    #local I=0;
    #while(I<36)
      triangle{Vert[TInd[I].x]/Len,
Vert[TInd[I].y]/Len,Vert[TInd[I].z]/Len}
      #local I=I+1;
    #end
    inside_vector y
    rotate<31.75,0,0>
    }

#declare Jewel=merge {object {Dodecahedron} object {Icosohedron}
bounded_by {sphere {<0,0,0>,1.09}}}

#declare Crystal=material {texture {pigment {color
rgbf<0.98,0.98,0.98,0.9>} finish {ambient 0.1 diffuse 0.1 specular 0.8
roughness 0.003 phong 1 phong_size 400 reflection 0.15 conserve_energy}}
interior {ior 1.5 dispersion 1.1 dispersion_samples 100}}


light_source {<10,10,15> color rgb<1,1,1> area_light <1,0,0>,<0,1,0>,3,3
adaptive 1 jitter circular orient photons {refraction on reflection on
area_light}}
camera {location <2,2,-5> look_at <0,0,0>}

object {Jewel material {Crystal} translate <0,1.088,0> photons {target
reflection on refraction on collect off}}

box {<-20,0,-20>,<20,20,20> pigment {bozo color_map {[0 color
rgb<0.4,0.4,0.4>] [0.25 color rgb<0.4,0.45,0.5>] [0.5 color
rgb<0.5,0.5,0.5>] [0.75 color rgb<0.5,0.45,0.4>] [1 color
rgb<0.4,0.4,0.4>]} turbulence 0.2 scale 4} hollow}


Post a reply to this message


Attachments:
Download 'test.jpg' (19 KB)

Preview of image 'test.jpg'
test.jpg


 

From: Andrew
Subject: Re: Crystal with photons
Date: 19 Dec 2001 19:48:08
Message: <3c213548@news.povray.org>
And as someone pointed out earlier, the caustics are much too bright
because of the dispersion bug.  Here is the same image without
dispersion...


Post a reply to this message


Attachments:
Download 'test.jpg' (8 KB)

Preview of image 'test.jpg'
test.jpg


 

From: Sven Heinzel
Subject: Re: Crystal with photons
Date: 20 Dec 2001 03:33:14
Message: <Xns917D611947B67Sirius666atgmxnet@sirius666.de>
"Andrew" <ast### [at] hotmailcom> wrote:

> And as someone pointed out earlier, the caustics are much too bright
> because of the dispersion bug.  Here is the same image without
> dispersion...

I hope this bug will ever be fixed... it is not that complicated, just
remove the statement
    	brightness *= dispersion_samples;
or add
    	brightness /= dispersion_samples;
:-)

Regards
Sven


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Crystal with photons
Date: 20 Dec 2001 06:07:41
Message: <3c21c67d@news.povray.org>
> And as someone pointed out earlier, the caustics are much too bright
> because of the dispersion bug.  Here is the same image without
> dispersion...

I think I like the dispersion bug :)


--

Rick

Kitty5 WebDesign - http://Kitty5.com
POV-Ray News & Resources - http://Povray.co.uk
TEL : +44 (01270) 501101 - FAX : +44 (01270) 251105 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

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