Ask Your Question
0

Plot periodic minimal surface from Weierstrass representation

asked 2016-09-18 03:04:22 -0500

Hao Chen gravatar image

I want to plot the Schwarz P-(rimary) surface using its Weierstrass representation. Here is the code:

var('rho,a,w')
R=(w*(w^6+7/4*sqrt(2)*w^3-1))^(1/2)
# R=-I*w^2
theta=0

Phi_1=((1-w^2)/R).integrate(w)
Phi_2=(I*(1+w^2)/R).integrate(w)
Phi_3=(2*w/R).integrate(w)
def FF1(rho,a):
  return real_part(exp(I*theta)*Phi_1(w=rho*exp(I*a)))
def FF2(rho,a):
  return real_part(exp(I*theta)*Phi_2(w=rho*exp(I*a)))
def FF3(rho,a):
  return real_part(exp(I*theta)*Phi_3(w=rho*exp(I*a)))

parametric_plot3d([FF1,FF2,FF3],(rho,0.001,1),(a,0.001,pi/3-0.001))

The range of plot is chosen to avoid any singular points, otherwise there will be a division-by-zero error. The commented line is a test for helicoid, which works very well. However, for P-surface, it returns the following warning:

.../sage/local/lib/python2.7/site-packages/sage/repl/rich_\
output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_
while displaying object:
'sage.rings.complex_double.ComplexDoubleElement' object has no attribute
'variables'
  RichReprWarning,
Graphics3d Object

And no graphics displayed.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-09-20 14:22:36 -0500

eric_g gravatar image

The problem does not come from the plotting function but from the fact that your functions FF1, FF2, FF3 cannot return numerical values because Phi_1, Phi_2 and Phi_3 contain unevaluated integrals:

Phi_1
-2*integrate((w^2 - 1)/sqrt((4*w^6 + 7*sqrt(2)*w^3 - 4)*w), w)

You should probably use numerical_integral instead of integrate and specify some integration bounds.

The case of the commented line worked because SageMath was capable to find an explicit primitive:

R=-I*w^2
Phi_1=((1-w^2)/R).integrate(w)
Phi_1
-I*w - I/w
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-18 03:04:22 -0500

Seen: 68 times

Last updated: Sep 20 '16