POV-Ray : Newsgroups : povray.bugreports : Triangle bug? : Triangle bug? Server Time
24 Jun 2024 08:35:22 EDT (-0400)
  Triangle bug?  
From: Zoltan G  Toth
Date: 10 Sep 1999 11:33:23
Message: <37D9254E.FA4CE0D1@tigris.klte.hu>
Dear Povray folk,

I wanted to create constructions built from triangle primitives
and spheres at the vertices of the triangles. The spheres have
the same coordinates as the vertices. The rendering by Povray 3
looks odd: the spheres and the vertices of the triangles do not
appear in the same place, especially if they are near the border.

Other problems appeared too. Try the two examples attached.
Any suggestion? Or is it a bug in POV-Ray?
regards

Tamas Gunda
tam### [at] tigriskltehu



----------------------------------------------------------------------
//  First example.
//  The vertices of the triangle primitives have the same coordinates
//  as the spheres. However, their place is different.

//  Thu 9 Sep 1999 19:24:50

#version 3.0
global_settings {assumed_gamma 1.2}
#include "colors.inc"
#include "textures.inc"



camera {location <  1.45,  -0.11, -110>
       direction <0, 0,  7.67>
       look_at <  1.45,  -0.11,  1 >}
light_source {<0, 20,-50> color White shadowless}




//left:
sphere {< -6.127,  3.180,  3.026>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {< -4.795,  1.678,  2.942>  0.1
           texture {pigment {MandarinOrange} finish {Shiny}}}
sphere {< -7.248,  2.135,  3.171>  0.1
           texture {pigment {White} finish {Shiny}}}

triangle {< -6.127,  3.180, -3.026>,< -4.795,  1.678, -2.942>, <
-7.248,  2.135,  3.171> pigment{ rgb<.75,.75,.7>}}


//middle:
sphere {<  1.067, -0.437, -2.805>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {<  1.398, -1.938, -2.888>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {<  0.106, -1.398, -3.529>  0.1
           texture {pigment {White} finish {Shiny}}}

triangle {<  1.067, -0.437,  2.805>,<  1.398, -1.938,  2.888>,<  0.106,
-1.398, -3.529> pigment{ rgb<.75,.75,.75>}}


//right:
sphere {<  9.211, -3.391, -2.592>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {< 10.153, -2.976, -3.737>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {< 10.014, -1.501, -3.316>  0.1
           texture {pigment {White} finish {Shiny}}}
sphere {<  9.072, -1.916, -2.171>  0.1
           texture {pigment {Red} finish {Shiny}}}

triangle {<  9.211, -3.391,  2.592>,< 10.153, -2.976,  3.737>,<  9.613,
-2.446,  2.954> pigment{ rgb<.65,.65,.65>}}
triangle {< 10.153, -2.976,  3.737>,< 10.014, -1.501,  3.316>,<  9.613,
-2.446,  2.954> pigment{ rgb<.95,.75,.75>}}
triangle {< 10.014, -1.501,  3.316>,<  9.072, -1.916,  2.171>,<  9.613,
-2.446,  2.954> pigment{ rgb<.75,.95,.75>}}
triangle {<  9.072, -1.916,  2.171>,<  9.211, -3.391,  2.592>,<  9.613,
-2.446,  2.954> pigment{ rgb<.75,.75,.95>}}



background { colour <0, 0, .55> }

//======================================================================================

/*Second example

// In this case the rendering of the triangle primitive looks odd,
// some transparency problem,
// as if the cylinders would be partly opaque, partly transparent.

// On the other hand, if the union is rotated, only the triangle
primitive rotates.
// Without the triangle primitive the cylinders are rotated OK.

//  Thu 9 Sep 1999 20:06:57

#version 3.0
global_settings {assumed_gamma 1.0}
#include "colors.inc"
#include "textures.inc"


camera {location < -0.23,  -0.13, -32.16>
       direction <0, 0,  7.57>
       look_at < -0.23,  -0.13,  1 >}
light_source {<0, 0,-16.08> color White shadowless}

union {



cylinder {<  0.469,   0.254,   0.213>, <  0.498,  -0.921,  -0.773>,
0.15 open
          pigment {White} finish {Shiny} }
cylinder {< -0.967,   0.667,   0.560>, <  0.469,   0.254,   0.213>,
0.15 open
          pigment {White} finish {Shiny}}
cylinder {< -0.967,   0.667,   0.560>, <  0.498,  -0.921,  -0.773>,
0.15 open
          pigment {White} finish {Shiny}}



sphere {<  0.498, -0.921, -0.773>  0.15
           texture {pigment {White} finish {Shiny}}}
sphere {<  0.469,  0.254,  0.213>  0.15
           texture {pigment {White} finish {Shiny}}}
sphere {< -0.967,  0.667,  0.560>  0.15
           texture {pigment {White} finish {Shiny}}}


 triangle {<  0.498, -0.921,  0.773>,<  0.469,  0.254, -0.213>,<
-0.967,  0.667, -0.560> pigment{ rgbt<.65,.85,.65,0.2>} }

 // if you activate rotate, only the triangle is rotated!
 // rotate <30,0,0>
}


 sky_sphere {
    pigment {
      gradient y
      color_map {
        [ -1  color Scarlet ]
        [ 1 color NavyBlue ]
      }
      scale .1

    }
  }
*/


Post a reply to this message

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