List Archives > 
Maple User Group List Archive > 
Archive by date > 
This Month By Date > 
This Month By Topic
[MUG] Question about texturing using Maple
| [MUG] Question about texturing using Maple |
|
Author: Bguerrieri
Posted: Thu, 16 May 2002 09:54:45 -0400
|
>> From: "bguerrieri"
Dear MUG:
If your time permits, please consider the following statement:
> plot3d({cos(x)*sin(y), 0},x=-Pi..Pi,y=-Pi..Pi,color=cos(x*y);
which shows a section of the x-y plane as well as its "transform"
under f:=(x,y)->cos(x)*cos(y), both shaded according to the law g :=
(x,y)->x*y;
I seem to run into difficulty when I attempt to "design" my own
coloring function, admittedly an "ugly" one such as
g := proc(x,y)
local a;
if (x>=-evalf(Pi) and x<0) then a := 1: fi:
if (x>=0 and x<=evalf(Pi)) then a := 2: fi:
RETURN(a);
end:
The call
plot3d(0,u=-Pi..Pi,v=-Pi..Pi,color=g(u,v)); generates the following:
Error, (in g) cannot evaluate boolean: ...
My goal is to eventually use the "designer" color function g and
"texture" it over any surface of my choice.
I hope I am not overlooking something trivial.
Sincerely,
Bruno Guerrieri
"bguerrieri"
|
[View Complete Thread]
Previous by date: [MUG] DLL, Bguerrieri
Next by date: [MUG] Re: Coupled, nonlinear ODEs., Robert Israel
Previous thread: [MUG] external calling fortran on windows, Theodore Kolokolnikov
Next thread: [MUG] Coupled, nonlinear ODEs., Anders Ballestad
|