|
| 1 | +// POV-Ray 3.8 Scene File "dither_showcase.pov" |
| 2 | +// author: Christoph Lipka |
| 3 | +// date: 2018-09-30 |
| 4 | +// |
| 5 | +//-------------------------------------------------------------------------- |
| 6 | +#version 3.8; |
| 7 | + |
| 8 | +#ifndef (Glow) |
| 9 | + #declare Glow = on; |
| 10 | +#end |
| 11 | +#ifndef (Brightness) |
| 12 | + #declare Brightness = 4.0; |
| 13 | +#end |
| 14 | + |
| 15 | +global_settings { |
| 16 | + max_trace_level 5 |
| 17 | + assumed_gamma 1.0 |
| 18 | + radiosity { |
| 19 | + pretrace_start 0.08 |
| 20 | + pretrace_end 0.01 |
| 21 | + count 150 |
| 22 | + nearest_count 20 |
| 23 | + error_bound 0.5 |
| 24 | + recursion_limit 2 |
| 25 | + low_error_factor .5 |
| 26 | + gray_threshold 0.0 |
| 27 | + minimum_reuse 0.015 |
| 28 | + brightness 1 |
| 29 | + adc_bailout 0.01/2 |
| 30 | + } |
| 31 | +} |
| 32 | + |
| 33 | +#default { |
| 34 | + texture { |
| 35 | + pigment {rgb 1} |
| 36 | + finish { |
| 37 | + ambient 0.0 |
| 38 | + diffuse 0.8 |
| 39 | + specular albedo 1.0 roughness 0.001 |
| 40 | + reflection { 1.0 fresnel on } |
| 41 | + conserve_energy |
| 42 | + fresnel on |
| 43 | + } |
| 44 | + } |
| 45 | +} |
| 46 | + |
| 47 | +// ---------------------------------------- |
| 48 | + |
| 49 | +#local TestRed = <1.0,.03,.03>; |
| 50 | +#local TestGreen = <.03,1.0,.03>; |
| 51 | +#local TestBlue = <.03,.03,1.0>; |
| 52 | + |
| 53 | +#local CameraFocus = <0,1,1>; |
| 54 | +#local CameraDist = 8; |
| 55 | +#local CameraDepth = 3.0; |
| 56 | +#local CameraTilt = 5; |
| 57 | + |
| 58 | +camera { |
| 59 | + location <0,0,0> |
| 60 | + direction z*CameraDepth |
| 61 | + right x*image_width/image_height |
| 62 | + up y |
| 63 | + translate <0,0,-CameraDist> |
| 64 | + rotate x*CameraTilt |
| 65 | + translate CameraFocus |
| 66 | +} |
| 67 | + |
| 68 | +#macro LightSource(Pos,Color) |
| 69 | + light_source { |
| 70 | + Pos |
| 71 | + color Color |
| 72 | + area_light x*vlength(Pos)/10, y*vlength(Pos)/10, 9,9 adaptive 1 jitter circular orient |
| 73 | + } |
| 74 | + |
| 75 | +#end |
| 76 | + |
| 77 | +LightSource(<-500,500,-500>, rgb Brightness) |
| 78 | + |
| 79 | +// ---------------------------------------- |
| 80 | + |
| 81 | +plane { |
| 82 | + y, 0 |
| 83 | + texture { pigment { color rgb 0.2 } } |
| 84 | + interior { ior 1.5 } |
| 85 | +} |
| 86 | + |
| 87 | +#macro TestSphere(Pos,Radius,TargetColor,Hole) |
| 88 | + #if (Hole) |
| 89 | + union { |
| 90 | + #local Th = 20; |
| 91 | + #local R = 0.05; |
| 92 | + #local SinTh = sin(Th*pi/180); |
| 93 | + #local CosTh = cos(Th*pi/180); |
| 94 | + difference { |
| 95 | + sphere { <0,0,0>, 1 } |
| 96 | + cylinder { y, y*(1-R)*CosTh, SinTh } |
| 97 | + cylinder {-y,-y*(1-R)*CosTh, SinTh } |
| 98 | + cylinder { y,-y,(1-R)*SinTh-R } |
| 99 | + } |
| 100 | + torus { (1-R)*SinTh, R translate y*(1-R)*CosTh } |
| 101 | + torus { (1-R)*SinTh, R translate -y*(1-R)*CosTh } |
| 102 | + #else |
| 103 | + sphere { <0,0,0>, 1 |
| 104 | + #end |
| 105 | + texture { pigment { color TargetColor } |
| 106 | + finish { emission Glow * Brightness * 0.5 } |
| 107 | + } |
| 108 | + interior { ior 1.5 } |
| 109 | + rotate z*30 |
| 110 | + rotate y*clock*360 - y*45 |
| 111 | + scale Radius |
| 112 | + translate Pos + y*Radius |
| 113 | + } |
| 114 | +#end |
| 115 | + |
| 116 | +TestSphere(<-2,0,1>, 1, TestRed, false) |
| 117 | +TestSphere(< 0,0,1>, 1, TestBlue, true) |
| 118 | +TestSphere(< 2,0,1>, 1, TestGreen, false) |
0 commit comments