|
|
So here's what I was starting with - and I just can't seem to spot what the
fundamental problem (with the code ;) is:
#version 3.7;
global_settings {assumed_gamma 1.0}
#include "colors.inc"
#include "functions.inc"
#declare Picture = pigment {image_map {png "Image.png"}}
#declare Resolution = max_extent (Picture);
#declare PictureScale = (Resolution + <0, 0, 1>);
camera {location <Resolution.x/2, Resolution.y/2, -max(Resolution.x,
Resolution.y)*1.5>}
background {Gray50}
light_source {<Resolution.x, Resolution.y, -1000> color White}
#declare Screen = 2;
#declare Panel = union {
#declare GraphX = 0;
#for (PosY, Resolution.y, 0, -Screen)
#for (PosX, 0, Resolution.x, Screen)
#declare Shade = eval_pigment (Picture, <PosX, PosY, 0>);
#declare Value = (Shade.red + Shade.green + Shade.blue)/3;
#debug concat ( "Pos = ", vstr (3, <PosX, PosY, 0>, ", ", 3, 0), " \n")
#debug concat ( "Shade = ", vstr (3, Shade, ", ", 3, 3), " \n")
#debug concat ( "Value = ", vstr (3, Value, ", ", 3, 3), " \n")
cylinder {<PosX, PosY, -0.01>, <PosX, PosY, PictureScale.z*1.1>, 0.5
pigment {rgb <Shade.x, Shade.y, Shade.z>} // texture {BalticBirch}
} // end cylinder
sphere {<GraphX/25, (Value*1000)-100, 0> Screen/4 pigment {Green}}
#declare GraphX = GraphX + 1;
#end
#end
} // end difference
object {Panel}
Post a reply to this message
|
|