|
|
There is a possible problem if the variable Thickness is set to zero.
Here a slightly revised code to take care of that possiblility:
> Maybe /I/ adapted the code some time ago, I don't remember. Here is the
> electric macro working under version 3.7:
>
media {
samples M_samples
emission color rgb 1
density {
spherical
poly_wave 1.5
color_map{
[0.00 color rgb 0 ]
#ifdef(Thickness)
#if(Thickness = 0) // To be used with Thickness = 0
[0.80 color rgb ElectricColor(ValueM)*Brightness*2 ]
[0.90 color rgb <1,1,1>*Brightness*75 ]
[1.00 color rgb <1,1,1>*Brightness*200 ]
//or this? (Alain)
#else // To be used whenever Thickness have been set to a
non-zero value
[0.80 color rgb
ElectricColor(ValueM)*Brightness/Thickness ]
[0.90 color rgb <1,1,1>*Brightness/Thickness ]
[1.00 color rgb <1,1,1>*Brightness/Thickness ]
#end
#else // Fallback if Thickness was not defined
[0.80 color rgb ElectricColor(ValueM)*Brightness*2 ]
[0.90 color rgb <1,1,1>*Brightness*75 ]
[1.00 color rgb <1,1,1>*Brightness*200 ]
#end
}
}
}
}
Alain
Post a reply to this message
|
|