File:Pov ray media and glass sphere sample 1 r 1.png
Original file (1,600 × 1,200 pixels, file size: 1.16 MB, MIME type: image/png)
Captions
Summary
[edit]DescriptionPov ray media and glass sphere sample 1 r 1.png |
English: POV-Ray media and glass sphere sample |
Date | |
Source | Own work |
Author | Merikanto |
POV-Ray source code
#include "shapes.inc"
#include "colors.inc"
- include "textures.inc"
- include "stones.inc"
#include "glass.inc"
- include "consts.inc" // Index of refraction constants
- include "skies.inc"
// global_settings { assumed_gamma 1 }
#declare Rad_Quality = 0;
global_settings {
assumed_gamma 1.0
- switch (Rad_Quality)
#case (1)
radiosity { // --- Settings 1 (fast) ---
pretrace_start 0.08
pretrace_end 0.02
count 50
error_bound 0.5
recursion_limit 1
}
#break
#case (2)
radiosity { // --- Settings 2 (medium quality) ---
pretrace_start 0.08
pretrace_end 0.01
count 120
error_bound 0.25
recursion_limit 1
}
#break
#case (3)
radiosity { // --- Settings 3 (high quality) ---
pretrace_start 0.08
pretrace_end 0.005
count 400
error_bound 0.1
recursion_limit 1
}
#break
#case (4)
radiosity { // --- Settings 4 (medium quality, recursion_limit 2) ---
pretrace_start 0.08
pretrace_end 0.005
count 350
error_bound 0.15
recursion_limit 2
}
#break
#end
}
/*
global_settings
{ photons
{ count 20000
media 100
}
}
- /
- default {finish{ambient 0}}
camera {
// location <20,10,-10> *2
location <0,0,-10> *15
look_at 0
angle 7
}
// background { color rgb <1/2,1/2,1> }
background { color rgb 0 }
light_source{ <1, 1, 100>*1000*1000*1000 Gold*2 }
// light_source{ <15, -15, 100>*1000*1000*1000 Red }
// light_source{ <-15, -15, 100>*1000*1000*1000 Blue }
/*
fog {
distance 500
color rgbt<1,1,1,0.9>
}
*/
- declare ross1= union {
box {<-1,-2,-2>,<1,2,2> scale x*10 scale 0.1 translate y*0}
box {<-2,-1,-2>,<2,1,2> scale y*10 translate y*0 scale 0.1}
rotate z*45
// pigment { color Black}
// finish { phong 1 metallic specular 0.5}
}
- declare wall1= object {
box {<-100,-100,-1/2>,<100,100,1/2>}
//scale <100,1,100>
//texture { pigment { color rgb Tan }
texture {
T_Stone2
//T_Grnt3
normal { agate scale 0.1 bump_size 1}
finish {reflection 0 diffuse 0.2}
}
}
- declare crosswall1=difference {
object {wall1}
- declare xx=0;
- for (yy,-5,5)
- for (xx,-5,5)
object {ross1 scale z*5
translate <xx*2.5,yy*2.5,0>
scale 1.5
}
#end
#end
}
- declare GlassSphere =
intersection {
sphere { <0, 0, 0>, 1 }
interior{ior Flint_Glass_Ior}
texture {
T_Glass3
finish {
reflection 0
}
}
scale 2
}
object { GlassSphere
scale 3
rotate y*90
translate z*-5
translate y*0.29
translate x*4
}
- declare PearlescentGlass =
material {
texture {
pigment { rgb 0 transmit 1 }
finish {
reflection { .01, .95 fresnel } conserve_energy
//big fat phong highlight, to give ethereal sheen to the material.
//make phong fade with angle, using pov's metallic effect on black
//(because there's no fresnel for phong)
phong 30 phong_size 20 metallic 1
specular 50 roughness .0004 //layer a sharp highlight on top.
}
}
interior {
ior 1.5
fade_colour <1,.25,.0>
fade_distance .5
fade_power 2
}
}
- declare xobject1=object {
ross1
scale 3
translate z*-4
texture {
pigment {granite }
}
// interior{ior Flint_Glass_Ior}
//texture {
//T_Glass3
// T_Glass_Ruby
material {
PearlescentGlass
//finish {
//reflection 0 // Over-ride reflection
//}
}
scale 1.75
rotate <20,30,40>
}
object {
crosswall1
}
object {
wall1
translate z*-199
}
object {wall1
rotate x*90
translate y*-99
translate z*-100
scale z*2
}
object {wall1
rotate x*90
translate y*99
translate z*-100
scale z*2
}
object {wall1
rotate y*90
translate x*99
translate z*-100
scale z*2
}
object {wall1
rotate y*90
translate x*-99
translate z*-100
scale z*2
}
#declare media1= box
{ -50,50 pigment { rgbt 1 } hollow
interior
{ media
{
samples 200,300
intervals 1
scattering { 1, 0.01 extinction 0.01 }
}
}
}
object {media1}
Licensing
[edit]- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 08:58, 15 July 2023 | 1,600 × 1,200 (1.16 MB) | Merikanto (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
PNG file comment |
|
---|---|
File change date and time | 08:51, 15 July 2023 |
Software used |