Plotting a one dimensional curve in Maple with implicitplot3d

I want to plot in Maple the solutions to the equation (x-y)^2+(1-z)^2=0.

However, implicitplot3d is not able to plot them, at least using the default arguments. Any recommendations?

I know a priori that the set of solutions is going to be a curve contained in a plane, because I want to plot solutions of equations of the form 'f(x,y)^2+(z-1)^2=0'. Where 'f(x,y)' is a polynomial.

Upvotes: 1

Views: 238

Answers (1)

acer
acer

Reputation: 7271

If x, y, and z are all real then those two squares must both equal zero, and thus z=1.

In that case you can simply utilize the implicitplot command for a 2-D plot of f(x,y)=0, and if you wish you can transform that to a 3-D plot with z=1.

restart;
with(plots,display): with(plots,implicitplot):
with(plottools,transform):

eqn := (x-y)^2+(1-z)^2 = 0:
P2D := implicitplot(eval(eqn,z=1)):
display(transform((x,y)->[x,y,1])(P2D),
        labels=[x,y,z]);

enter image description here

eqn := (x^2-y)^2+(1-z)^2 = 0:
P2D := plots:-implicitplot(eval(eqn,z=1)):
display(transform((x,y)->[x,y,1])(P2D),
       labels=[x,y,z]);

enter image description here

Upvotes: 2

Related Questions