Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

3d plot with restricted range

Can someone please give me a helping hand with plot3d?

I want to plot the GammaCondor-function:

def condor(x, y):
    e = gamma(y+1)
    a = gamma(1/2*y-1/2*x+1/2)
    b = gamma(-1/2*x+1/2*y+1)
    c = gamma(1/2*x+1/2*y+1/2)
    d = gamma(1/2*x+1/2*y+1)

    alpha = cos(pi*(y-x))
    beta  = cos(pi*(y+x))

    return log(e)+log(a)*((alpha-1)/2)+log(b)*((-alpha-1)/2) \
    +log(c)*((beta-1)/2)+log(d)*((-beta-1)/2)

With Maple this is easy (note the restriction for x):

plot3d(condor(x, y), x = -y..y, y = 0..8, 
       orientation = [-145, -105], axes = BOXED, grid = [64,64]);

What this looks like can be seen here: http://luschny.de/math/asy/ElCondorYElGamma.html
Or as a dynamic pdf with an Adobe Reader (v10 or later): http://luschny.de/math/asy/Condor.pdf

var('x, y')
g = plot3d(condor(x, y), (x, -y, y), (y, 0, 8))
show(g)

gives a TypeError.

var('x, y')
g = plot3d(condor(x, y), (x, -8, 8), (y, 0, 8))
show(g)

shows an empty frame. Plotting was tried on cloud.sagemath.

click to hide/show revision 2
tag cloud.sagemath added

3d plot with restricted range

Can someone please give me a helping hand with plot3d?

I want to plot the GammaCondor-function:

def condor(x, y):
    e = gamma(y+1)
    a = gamma(1/2*y-1/2*x+1/2)
    b = gamma(-1/2*x+1/2*y+1)
    c = gamma(1/2*x+1/2*y+1/2)
    d = gamma(1/2*x+1/2*y+1)

    alpha = cos(pi*(y-x))
    beta  = cos(pi*(y+x))

    return log(e)+log(a)*((alpha-1)/2)+log(b)*((-alpha-1)/2) \
    +log(c)*((beta-1)/2)+log(d)*((-beta-1)/2)

With Maple this is easy (note the restriction for x):

plot3d(condor(x, y), x = -y..y, y = 0..8, 
       orientation = [-145, -105], axes = BOXED, grid = [64,64]);

What this looks like can be seen here: http://luschny.de/math/asy/ElCondorYElGamma.html
Or as a dynamic pdf with an Adobe Reader (v10 or later): http://luschny.de/math/asy/Condor.pdf

var('x, y')
g = plot3d(condor(x, y), (x, -y, y), (y, 0, 8))
show(g)

gives a TypeError.

var('x, y')
g = plot3d(condor(x, y), (x, -8, 8), (y, 0, 8))
show(g)

shows an empty frame. Plotting was tried on cloud.sagemath.