| 
  | 
Hello.
I wrote a program that export geometry to POV file and I have a problem.
POV-Ray want something like that:
#declare Red = texture {
    pigment { color rgb<1.0, 0.0, 0.0> }
    finish { ambient 0.2 diffuse 0.5 }
  } 
mesh {
   triangle {<0, 0, 0>, <0, 10, 0>, <10, 0, 0>
   texture { Red }
  }  
 texture {
  pigment { color rgb<0.9, 0.9, 0.9> }
  finish { ambient 0.2 diffuse 0.7 }
 }}
and I don't like this becouse that mean I must know color of my triangle BEFORE i
create geometry. What I wana do is somthing similar to OpenGL commands:
glBegin(GL_TRIANGLES);
 glColor3f(something...);glNormal3f(something...);glVertex3f(something...);
 glColor3f(something...);glNormal3f(something...);glVertex3f(something...);
 glColor3f(something...);glNormal3f(something...);glVertex3f(something...);
glEnd(); 
Which mean I have color, and normal vector assigned to each vertex. How to do
something like that in POV-Ray? If someone can give me simple answer (witch mean
simple code :-) ) I be greatful.
Yansen.
PS Sorry for may poor english skill...
 Post a reply to this message 
 | 
  |