|
![](/i/fill.gif) |
Zoly,
Here's my suggestion:
>>> snip >>>
#local U = 0;
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));
#local Uinc = abs(vlength(<x2(a_i),a_i,z2(a_i)>-<x2(i),i,z2(i)>));
triangle {
<x1(a_i),a_i,z1(a_i)> <x2(a_i),a_i,z2(a_i)> <x1(i),i,z1(i)>
uv_vectors <U,z1(a_i)> <U,z2(a_i)> <U+Uinc,z1(i)>
}
#debug concat("T1: ",vstr(3,<x1(a_i),a_i,z1(a_i)>,",",0,5))
#debug concat(" - ",vstr(3,<x2(a_i),a_i,z2(a_i)>,",",0,5))
#debug concat(" - ",vstr(3,<x1(i),i,z1(i)>,",",0,5),"\r")
triangle {
<x2(a_i),a_i,z2(a_i)> <x1(i),i,z1(i)> <x2(i),i,z2(i)>
uv_vectors <U,z2(a_i)> <U+Uinc,z1(i)> <U+Uinc,z2(i)>
}
#debug concat("T2: ",vstr(3,<x2(a_i),a_i,z2(a_i)>,",",0,5))
#debug concat(" - ",vstr(3,<x1(i),i,z1(i)>,",",0,5))
#debug concat(" - ",vstr(3,<x2(i),i,z2(i)>,",",0,5),"\r\r")
#local U = U + Uinc;
#end
texture {
uv_mapping
pigment {
brick rgb 0.15 rgb 0.2
scale 0.04
rotate 90*z
}
}
>>> snip >>>
I hope this helps, or at least gets you going in the right direction.
Kyle
Post a reply to this message
|
![](/i/fill.gif) |