In [22]:
from sage.plot.plot3d.plot3d import axes
l = axes(1, 0.25)
L=line([(0,0,0),(sin(pi/12)*cos(pi/4),sin(pi/12)*sin(pi/4),cos(pi/12))],linestyle=' - - - ')
L+=line([(0,0,0),(sin(pi/6)*cos(pi/4),sin(pi/6)*sin(pi/4),cos(pi/6))],linestyle=' - - - ')
L+=line([(0,0,0),(sin(pi/12)*cos(pi/3),sin(pi/12)*sin(pi/3),cos(pi/12))],linestyle=' - - - ')
L+=line([(0,0,0),(sin(pi/6)*cos(pi/3),sin(pi/6)*sin(pi/3),cos(pi/6))],linestyle=' - - - ')
r, phi, theta = var('r phi theta')
S = Spherical('inclination', ['radius', 'azimuth'])
ST = Spherical('azimuth' , ['radius', 'inclination'])
SR = Spherical('radius' , ['inclination', 'azimuth'])

dphi = [ pi/12, pi/6]
P1 = [plot3d( a, (r,0.8,1), (theta, pi/4, pi/3), transformation=S, opacity=0.5,color='red') for a in dphi]
dtheta = [ pi/4, pi/3]
P2 = [plot3d( b, (r,0.8,1), (phi, pi/12, pi/6), transformation=ST, opacity=0.5,color='blue') for b in dtheta]
drho = [ 0.8, 1]
P3 = [plot3d( c, (phi,pi/12,pi/6), (theta, pi/4, pi/3), transformation=SR, opacity=0.5,color='green') for c in drho ]
show(sum(P1+P2+P3)+l+L, aspect_ratio=1,frame=False)
In [7]:
t,r, phi, theta = var('t r phi theta')
SP = Spherical('inclination', ['radius', 'azimuth'])
angles = [pi/18, pi/12, pi/6]
P2 = [plot3d( a, (r,0,3), (theta, 0, 2*pi), transformation=SP, opacity=0.85,color='red') for a in angles]
p3=polar_plot(3*sin(pi/6),(t,0,2*pi),fill=True)
show(sum(P2)+p3, aspect_ratio=1)
In [10]:
t,r, phi, theta = var('t r phi theta')
SR = Spherical('radius' , ['inclination','azimuth'])
rho = [1, 2, 3]
P2 = [plot3d( a, (phi,0,pi/4), (theta, 0, 2*pi), transformation=SR, opacity=0.85,color='green') for a in rho]
p3=polar_plot(3*sin(pi/4),(t,0,2*pi),fill=True)
show(sum(P2)+p3, aspect_ratio=1)
In [15]:
t,r, phi, theta = var('t r phi theta')
ST = Spherical('azimuth' , ['radius','inclination' ])
theta1 = [0, pi/2, pi,3*pi/2]
P2 = [plot3d( a, (r,0,3), (phi, 0, pi/4), transformation=ST, opacity=0.85,color='blue') for a in theta1]
p3=polar_plot(3*sin(pi/4),(t,0,2*pi),fill=True)
show(sum(P2)+p3, aspect_ratio=1)
In [ ]: