POV-Ray : Newsgroups : povray.general : How to define the normal on a single triangle? (new pov-ray user) : Re: How to define the normal on a single triangle? (new pov-ray user) Server Time
2 Aug 2024 20:17:41 EDT (-0400)
  Re: How to define the normal on a single triangle? (new pov-ray user)  
From: Impress
Date: 23 Jul 2004 13:15:01
Message: <web.4101469520205b2df3cbb6c30@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.