|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I am trying to use a file read to both position an object as well as
establishing the objects color..
The positioning is displaying correct as expected but the color is only
displaying as white.
#fopen DAT_File "C:\IMGdat.dat" read
#while (defined(DAT_File))
#read (DAT_File, C1,C2,C3)
sphere { <C1,C2,C3> 2 pigment{color rgb <C1, C2, C3>}}
#end
Can somebody suggest what may cause the problem.
David
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
David Vincent-Jones <geo### [at] galaxynetcom> wrote:
> The positioning is displaying correct as expected but the color is only
> displaying as white.
That's probably because C1, C2 and C3 are larger than 1.
You have to divide them with a value which scales them into the range
0-1 in order to get a color.
--
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi David,
I've checked your code with
Windows 2000 Professional
POV-Ray 3.5.icl.win32
using the following IMGdat.dat file:
1, 0, 0,
0, 1, 0,
0, 0, 1,
1, 1, 1,
This gave four overlapping spheres with the expected colors: red, green,
blue, and white. The only reason for your error I can think of is "color
overflow": are you sure all your C1, C2, C3 are >=0 and <=1?
Sputnik
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|