Question: plot3d color function

I want to use a color function with RGB-values in plot3d. Can somebody explain why

Optionen := style=patchnogrid, scaling=constrained, orientation=[-90,0]:
farbe1 := proc(x,y)
   local b;
   b := evalb(x<1/2);
   if b=true then
      1
   elif b=false then
      0
   else
      'farbe1'(x,y)
   end if;
end proc; 
plot3d(0, x=0..1, y=0..1, color=[farbe1(x,y),0,0], Optionen);
 

is working, but

farbe3 := proc(x,y)
   local b;
   b := evalb(x<1/2);
   if b=true then
      [1,0,0]
   elif b=false then
      [0,0,0]
   else
      'farbe3'(x,y)
   end if;
end proc; 
plot3d(0, x=0..1, y=0..1, color=farbe3(x,y), Optionen);
 

produces just a red square.

Thanks.

Please Wait...