Trying to draw a half sphere I came across an unexpected graphic with the following command:
plotfunc(sqrt(9-x**2-y**2),[x,y])
I can plot a half-sphere with plotparam() command, but the graph from the previous command isn't what I expected. Is this a bug?
Another question is with the following command:
plot(x**(1/3),x=-5..5)
Only the first quadrant is graphed. Is this the expected result? Or is it a bug?
Thanks in advance.
Some graphics with plot and plotfunc
Modérateur : xcasadmin
Re: Some graphics with plot and plotfunc
There is indeed something strange with the 2d plot, the imaginary part should be in another color, like for
plotfunc(i*sqrt(9-x**2-y**2),[x=-4..4,y=-4..4])
plotfunc does "4-d" plots, that is a 3-d plot of the modulus, with a color depending on the argument.
I will have a look.
For x^(1/3) this is expected, because for negative x, x^(1/3) is a complex number. Try plot(surd(x,3)) instead.
plotfunc(i*sqrt(9-x**2-y**2),[x=-4..4,y=-4..4])
plotfunc does "4-d" plots, that is a 3-d plot of the modulus, with a color depending on the argument.
I will have a look.
For x^(1/3) this is expected, because for negative x, x^(1/3) is a complex number. Try plot(surd(x,3)) instead.
Re: Some graphics with plot and plotfunc
I see the different color in the graph. And it occurred to me for a moment that this was the imaginary part, but the help doesn't say anything about this (at least the Spanish help).
For plot(x**(1/3),x) I imagined that xcas took 3 as a real number, but I couldn't find a way to tell it to take it as an integer. plot(surd(x,3)) works, thanks.
Regards.
For plot(x**(1/3),x) I imagined that xcas took 3 as a real number, but I couldn't find a way to tell it to take it as an integer. plot(surd(x,3)) works, thanks.
Regards.