Dear soya-users,

Below is an even simpler script to demonstrate the bug. The difference
between the bug-free and buggy behaviour is this:

if show_the_bug:
    sf=soya.Face(triangle,[p0,p2,p1])
else:
    sf=soya.Face(triangle,[p0,p1,p2])

i.e., the difference is in the orientation of the vertices making up
the face.

The complete script is below.

Regards,

Rory

==snip============================================================

import sys, os, os.path, soya

show_the_bug=0

soya.init()

scene = soya.World()

light = soya.Light(scene)
light.diffuse=(1,1,1,1)
light.set_xyz(0.5, 0.0, 2.0)

line=soya.World(scene)

v1=soya.Vertex(scene,0.0,0.0,0.0)
v2=soya.Vertex(scene,0.0,1.0,0.0)
v1.diffuse=(1,0,0,1)
v2.diffuse=(1,0,0,1)

soya.Face(line,
          [ v1,
            v2 ])

line.set_xyz(2,0,1)

triangle=soya.World(scene)

p0=soya.Vertex(triangle,-0.5,0,0)
p1=soya.Vertex(triangle,0.5,0,0)
p2=soya.Vertex(triangle,0,0.5,0)


if show_the_bug:
    sf=soya.Face(triangle,[p0,p2,p1])
else:
    sf=soya.Face(triangle,[p0,p1,p2])

sf.double_sided=1

triangle.z = -2

camera = soya.Camera(scene)
camera.z = 2.0

soya.set_root_widget(camera)
soya.Idler(scene).idle()

==snip============================================================

Reply via email to