|
![](/i/fill.gif) |
I tried to use a component from a vector and pass it to a function in an
isosurface, and the parser returned an error. Se minimal scene below. The
parser seems to confuse the notations k.u (component of a vector) and x
(variable for the isosurface). Is this a "feature" or a bug? Or have I
misunderstood something?
***Minimal scene***
#declare Function = function(u, v) {u*v}
#declare k = <1, 1>;
isosurface {
function {y-Function(k.v*x, k.u*z)}
}
***Output***
isosurface {
function {y-Function(k <----ERROR
Parse Error: Expected 'operand', uv vector identifier found instead
Returned from renderer with error status
***
The workaround I figured out was to declare the vector components to
variables:
#declare ku = k.u;
#declare kv = k.v;
and then everything works fine:
isosurface {
function {y-Function(kv*x, ku*z)}
}
--
light_source{20*y,1}#macro _(M,X,Y,P)#macro L(N,D)#if(N)#declare
P=P+D;box{-
0.5,0.5translate z*mod(9*P.gray,4)pigment{rgb P}rotate 45*x+clock*y
translate
P}L(N-1,D)#end#end#if(M)L(mod(M,8)<mod(X,3)mod(Y,3)1>-1)_(div(M,8)div(X,3)div
(Y,3)P)#end#end _(2301603551,12850,60365,20*z-5*x)plane{y,-9pigment{rgb 1}}
Post a reply to this message
|
![](/i/fill.gif) |