|
|
Nope:
You don't put the function in the light_source definition, you define a pigment
pattern based on the function, and apply that to your shape.
http://wiki.povray.org/content/Reference:Function_Pattern
==============================================================
#version 3.71;
global_settings {
assumed_gamma 1
}
#include "colors.inc"
#include "textures.inc"
#declare xC = 50;
#declare yC = 0;
#declare zC = -50;
#declare xL = -50;
#declare yL = 0;
#declare zL = -50;
camera {
perspective
up <0,1,0>
right x*image_width/image_height
location <xC, yC, zC>
look_at <0, 0, 0>
}
light_source {
<xL, yL, zL>
fade_distance 1
fade_power 0
media_interaction off
media_attenuation off
}
//plane {y, -20 texture {pigment {White}} }
#declare Scale = 0.02;
#declare FnDist = function (x,y,z) {sqrt(x*x + y*y + z*z)*Scale}
#declare Fn =
function (x,y,z) {
FnDist (x-xC, y-yC, z-zC) +
FnDist (x-xL, y-yL, z-zL)
}
cone {<0, 0, 0>, 10, <0, 0, -30>, 0
texture {
pigment {function {Fn (x, y, z)}}
}
}
Post a reply to this message
|
|