|
![](/i/fill.gif) |
/* This will at least create a correct Indigo sphere definition :) Note that the
color name in the macro is in quotes. This is because Indigo requires a name for
its materials. I could have used a dummy, but what the heck. */
#version 3.6;
#include "colors.inc"
camera {
location <0, .5, -4>
look_at 0
}
light_source {
<0, 10, -20>
color White
}
#macro Sphere (X,Y,Z, Radius, Pigment,R,G,B)
sphere {
<X,Y,Z>,
Radius
pigment {rgb <R,G,B>}
}
#fopen File "Testfile.txt" write
#write ( File,
"<sphere>
<material> <name>", Pigment,"</name>
<diffuse>
<colour>",R,",",G,",",B,"</colour>
</diffuse>
</material>
<center>", ,X,",",Y,",",Z, "</center>
<radius>",Radius,"</radius>
</sphere>")
#end
Sphere (0,0,0,1,"Red",1,0,0)
Post a reply to this message
|
![](/i/fill.gif) |