How to implicitplot3d multiple functions with different colors

248 Views Asked by At

I need to plot 2 surfaces and a plane (two surfaces and the osculating plane to their complete intersection curve). When I use

f := x*w - z
g := -z^2-w+x+2*z-1
Op := 5*x-4-4*z+3*w
implicitplot3d({f, g, Op}, x = 0..2, z = 0..2, w = 0..2)

in Maple it is very difficult to differentiate between them. So I would like to plot f, g and Op using different color schemes or something. Any ideas on how to do this?

1

There are 1 best solutions below

1
On BEST ANSWER

Maple programming questions are better suited to stackoverflow.com or www.mapleprimes.com .

You can play around with the options for color, transparency, etc.

restart;
f := x*w - z:
g := -z^2-w+x+2*z-1:
Op := 5*x-4-4*z+3*w:

A := map(solve, [f=0, g=0, Op=0], w);

      A := [z/x, -z^2+x+2*z-1, 4/3-5*x*(1/3)+4*z*(1/3)]

S1:=solve(A[1]=A[3]):
C1 :=eval([x,z,A[1]], S1);

      C1 := [x, x*(5*x-4)/(4*x-3), (5*x-4)/(4*x-3)]

S2 := solve(A[2]=A[3]):
C2 :=eval([x,z,A[2]], S2);

      C2 := [3/8*(z^2)-(1/4)*z+7/8, z, -5/8*(z^2)+7/4*z-1/8]

plots:-display(
  plot3d(A[1], x=0..2, z=0..2, view=0..2, plotlist, color = red,
         transparency=0.8),
  plot3d(A[2], x=0..2, z=0..2, view=0..2, plotlist, color = blue,
         transparency=0.8),
  plot3d(A[3], x=0..2, z=0..2, view=0..2, plotlist, color = "#909090",
         transparency=0.2, style=surface),
  plots:-spacecurve( C1, x=0..2, color="#b00000", thickness=3),
  plots:-spacecurve( C2, z=0..2, color="#0000b0", thickness=3),
  lightmodel=none,
  view=[0..2,0..2,0..2]
);

enter image description here