|
|
The problem I've got it's that I compute my points in a C++ program that I
made. In fact, my program always output p1, p2, p3... in the same order.
The vertices got always the same distances in each other.. but, there is
two vertices that rotate around the third one. When it reach certain
degree.. the texture flip. However, because I output always p1, p2, p3...
in the same order for a specific triangle... I thought it should be
okay..!?
sprintf(strPovRay, "triangle {<%.4f, %.4f, %.4f>, <%.4f, %.4f, %.4f>, <%.4f,
%.4f, %.4f> texture{pigment{color rgb <%.4f, %.4f, %.4f>}}
interior_texture{pigment{color rgb <%.4f, %.4f, %.4f>}} transform {rotate
<%.4f, %.4f, %.4f> translate <%.4f, %.4f, %.4f>} }n",
x[i1], y[i1], z[i1],
x[i2], y[i2], z[i2],
x[i3], y[i3], z[i3],
m_dColorRedC[0+i/2], m_dColorGreenC[0+i/2], m_dColorBlueC[0+i/2],
m_dColorRedC[6+i/2], m_dColorGreenC[6+i/2], m_dColorBlueC[6+i/2], m_rotX,
m_rotY, m_rotZ, m_transX, m_transY, m_transZ);
The solution I saw to my problem.. would be to create in my C++ program..
triangles with always the same coordinate and then use POV-RAY
transformation to place it in space. I wanted to avoid that because I
wanted to avoid having too much transformation in my .pov file... Right
now, the transformation output by my program allow each object to move in
the 3D space.
regards,
Impress
Post a reply to this message
|
|