|
|
camera { location <10, 15, 15> look_at <0, 1, 0> angle 15 }
light_source { <2, 15, 5> color rgb <1, 1, 1> }
plane { +y, 0 pigment { rgb <1, 1, 1> } }
sor { 4, <2, -1> <2, 0> <2, 2> <2, 3> pigment { checker } }
If the camera is at <10, 10, 15>, it is low enough that we don't see any
problems (sor-lowcamera.png). When we move the camera to <10, 15, 15>,
however, a strange hole appears in the SOR (sor-hole.png). It looks like the
rays are tested for intersection as if the SOR was open, but pixels are
colored as if it was closed. And the SOR is definately closed, since adding
the open keyword generates a completely different picture (sor-open.png).
Here's a macro I wrote to temporarily workaround the problem; it generates a
correct image (sor-workaround.png):
#macro SorFix (P)
#local n = dimension_size(P, 1); #local i = 0;
intersection {
sor { n+2 P[0] #while (i < n) P[i] #local i = i+1; #end P[n-1] }
plane { -y, -P[1].v } plane { y, P[n-2].v }
}
#end
camera { location <10, 15, 15> look_at <0, 1, 0> angle 15 }
light_source { <2, 15, 5> color rgb <1, 1, 1> }
plane { +y, 0 pigment { rgb <1, 1, 1> } }
// sor { 4, <2, -1> <2, 0> <2, 2> <2, 3> pigment { checker } }
object {
SorFix ( array[4] { <2, -1>, <2, 0>, <2, 2>, <2, 3> } )
pigment { checker }
}
Post a reply to this message
Attachments:
Download 'sor-hole.png' (8 KB)
Download 'sor-lowcamera.png' (8 KB)
Download 'sor-open.png' (8 KB)
Download 'sor-workaround.png' (8 KB)
Preview of image 'sor-hole.png'
Preview of image 'sor-lowcamera.png'
Preview of image 'sor-open.png'
Preview of image 'sor-workaround.png'
|
|