|
![](/i/fill.gif) |
Kyle <hob### [at] gate net> wrote:
> Maybe some code and/or a sample image might help...
>
>
> Kyle
I'm posting a small scene that reproduces the problem. It is not very
easibly readable but you can cut and paste and have a look at the image.
Thanks,
Zoly
//--- VAULT CONSTRUCTION
#macro Vault(P01,r1,a1,n1,P02,r2,a2,n2,h)
#local dd=0.00001;
#local dl=0.1;
#local h1=r1*sqrt(2*n1-1);
#local h2=r2*sqrt(2*n2-1);
#local x01=P01.x;
#local x02=P02.x;
#local z01=P01.z;
#local z02=P02.z;
#local fr1=function(y) {
(y>h-h1)*(-r1*(n1-1)+sqrt(pow(r1*n1,2)-(y>h-h1)*pow(y-(h-h1),2)))+(y<=h-h1)*r1
}
#local fr2=function(y) {
(y>=h-h2)*(-r2*(n2-1)+sqrt(pow(r2*n2,2)-pow(y-(h-h2),2)))+(y<=h-h2)*r2
}
#local x1=function(y) {x01+fr1(y)*cos(radians(a1))}
#local x2=function(y) {x02+fr2(y)*cos(radians(a2))}
#local z1=function(y) {z01-fr1(y)*sin(radians(a1))}
#local z2=function(y) {z02-fr2(y)*sin(radians(a2))}
mesh {
#local i=h;
#while (i>0)
#local a_i=i;
#local i=i-dl/sqrt(1+pow((fr1(i)-fr1(i-dd))/dd,2));
triangle {
<x1(a_i),a_i,z1(a_i)> <x2(a_i),a_i,z2(a_i)> <x1(i),i,z1(i)>
uv_vectors <x1(a_i),z1(a_i)> <x2(a_i),z2(a_i)> <x1(i),z1(a_i)>
}
triangle {
<x2(a_i),a_i,z2(a_i)> <x1(i),i,z1(i)> <x2(i),i,z2(i)>
uv_vectors <x2(a_i),z2(a_i)> <x1(i),z1(i)> <x2(i),z2(i)>
}
#end
texture {
uv_mapping
pigment {
brick rgb 0.15 rgb 0.2
scale 0.08
rotate 90*z
}
}
}
#end
//--- MAIN OBJECT
object {Vault(<0,5,-3.59>,3.555,0,1.2,<0,5,0>,5,40,1,5)}
object {Vault(<0,5,-3.59>,3.555,0,1.2,<0,5,0>,5,40,1,5) scale <-1,1,1>}
//--- SECONDARY STAFF
light_source {<0,0,0> 2}
light_source {<50,50,-50> 5}
camera {location <4,2,-10> look_at <0,2,1> rotate <0,-10,0>}
plane {y, 0 pigment {rgb <0.08,0.02,0>}}
sky_sphere {pigment {rgb <0.04,0.04,0.2>}}
Post a reply to this message
|
![](/i/fill.gif) |