#version 3.8; global_settings {assumed_gamma 1.0} #include "colors.inc" #include "functions.inc" /* #declare Zoom = 1; // this many pixels will cover 1 pov unit #declare Height = 100; #declare Camera = camera { orthographic location <0, Height, 0> right x*image_width/Zoom up y*image_height/Zoom look_at <0, 0, 0> } camera {Camera} */ background {White} #declare EdgeDetection = array [3][3] { {-1, -1, -1}, {-1, 8, -1}, {-1, -1, -1}, } #declare EdgeDetection2 = array [3][3] { { 1, 0, -1}, { 0, 0, 0}, {-1, 0, 1}, } #declare EdgeDetection3 = array [3][3] { { 0, 1, 0}, { 1, -4, 1}, { 0, 1, 0}, } #declare Sharpen = array [3][3] { { 0, -1, 0}, {-1, 5, -1}, { 0, -1, 0}, } #declare Emboss = array [3][3] { {-2, -1, 0}, {-1, 1, 1}, { 0, 1, 2}, } #declare _N = 1/9; #declare BoxBlur = array [3][3] { {_N, _N, _N}, {_N, _N, _N}, {_N, _N, _N}, } #declare Filter = EdgeFilter; #declare Picture = pigment {image_map {"/home/oem/Documents/POV-Ray-3.8/PovLogo.png"}} #declare Resolution = max_extent (Picture); #declare PictureScale = (Resolution + <0, 0, 1>); camera {location } background {Gray50} light_source { color White} #declare Screen = 1; #declare Panel = union { //difference { //object {PerfMap} #declare GraphX = 0; #for (PosY, Resolution.y-1, 1, -Screen) #for (PosX, 1, Resolution.x-1, Screen) //#declare Norm = <0, 0, 0>; //#declare Start = ; //#declare Pos = trace (PerfMap, Start, z, Norm); #local Value = <0, 0, 0>; #for (OY, -1, 1) #for (OX, -1, 1) #local M = Filter [OY+1][OX+1]; #declare Shade = eval_pigment (Picture, <(PosX+OX)/Resolution.x, (PosY+OY)/Resolution.y, 0>); #declare Value = Value + *M; #end #end //#debug concat ( "Pos = ", vstr (3, , ", ", 3, 0), " \n") //#debug concat ( "Shade = ", vstr (3, Shade, ", ", 3, 3), " \n") //#debug concat ( "Value = ", vstr (3, Value, ", ", 3, 3), " \n") box {0, 1 translate -0.5 pigment {rgb } translate } /*cylinder {, , 0.5 pigment {rgb } // texture {BalticBirch} }*/ // end cylinder //sphere { Screen/4 pigment {Green}} //#declare GraphX = GraphX + 1; #end #end } // end difference object {Panel} /* #declare BottomPosition = min_extent (Object); #declare TopPosition = max_extent (Object); #declare Range = 1/(TopPosition.y - BottomPosition.y); #debug concat ("Range = ", str (Range, 3, 3), " \n") #declare Base = min_extent (Object).y; #declare Height = max_extent (Object).y; #declare Span = Height - Base; #debug concat ("Base = ", str (Base, 3, 3), " \n") #debug concat ("Height = ", str (Height, 3, 3), " \n") #debug concat ("Span = ", str (Span, 3, 3), " \n") #declare HalfHeight = image_height/2; #declare HalfWidth = image_width/2; #for (Z, -HalfHeight, HalfHeight) #for (X, -HalfWidth, HalfWidth) #declare Norm = <0, 0, 0>; #declare Start = ; #declare Inter = trace (Object, Start, <0, -1, 0>, Norm); #if (vlength(Norm)!=0) #declare Color = rgb <1, 1, 1>*Inter.y*Range; //#debug concat ("Intersection = <", vstr (3, Inter, ", ", 3, 3), "> Color = <", vstr (3, Color, ", ", 3, 3), "> \n") box {0, 1 translate -0.5 texture {pigment {rgb <1, 1, 1>*Inter.y*Range} finish {ambient 1 emission 0}} translate } // convert depth to a shade of black #else box {0, 1 translate -0.5 texture {pigment {rgb <1, 1, 1>} finish {ambient 1 emission 0}} translate } // white (0 depth) #end // end if #end // end for X #end // end for Z //#debug concat ("Range = ", str (Range, 3, 3), " \n") */