### Costa-Hoffman-Meeks Minimal Surface

This was a real challenge to do in plain PoV.
As a starting point I used the Mathematica parametrization
developed by Alfred Gray et al. It should be noted
that this only works with mma 3.0 or later. I do not have this, so
the following is untested by me.
c=189.07272;
e1=6.87519;
costa1[u_,v_]:= (1/2) Re[-WeierstrassZeta[u+I v,{c,0}] +Pi u +
Pi^2/(4 e1)+(Pi/(2 e1)) (WeierstrassZeta[u+I v-1/2,{c,0}]-
WeierstrassZeta[u+I v-I/2,{c,0}])]
costa2[u_,v_]:= (1/2) Re[-I*WeierstrassZeta[u+I v,{c,0}] +Pi v +
Pi^2/(4 e1)-(Pi/(2 e1))*(I*WeierstrassZeta[u+I v-1/2,{c,0}]-
I*WeierstrassZeta[u+I v-I/2,{c,0}])]
costa3[u_,v_]:=(Sqrt[2 Pi]/4) Log[Abs[(WeierstrassP[u+I v,{c,0}]-e1)/
(WeierstrassP[u+I v,{c,0}]+e1)]]
costa[u_,v_]:={costa1[u,v],costa2[u,v],costa3[u,v]}
costaplot80=ParametricPlot3D[costa[u,v],{u,0.001,1.001},
{v,0.001,1.001},PlotPoints->80]
selectgraphics3d[graphics3dobj_,bound_,opts___]:=
Show[Graphics3D[Select[graphics3dobj,
(Abs[#[[1,1,1]]] < bound && Abs[#[[1,1,2]]] < bound &&
Abs[#[[1,1,3]]] < bound && Abs[#[[1,2,1]]] < bound &&
Abs[#[[1,2,2]]] < bound && Abs[#[[1,2,3]]] < bound &&
Abs[#[[1,3,1]]] < bound && Abs[#[[1,3,2]]] < bound &&
Abs[#[[1,3,3]]] < bound && Abs[#[[1,4,1]]] < bound &&
Abs[#[[1,4,2]]] < bound && Abs[#[[1,4,2]]] < bound
)&]],opts]
dip[ins_][g_]:=$DisplayFunction[Insert[g,ins,{1,1}]]
selectgraphics3d[costaplot80[[1]],8,
Boxed->False,ViewPoint->{2.9,-1.4,1.2},
PlotRange->{{-4,4},{-4,4},{-2,2}},
DisplayFunction->dip[EdgeForm[]]]

As the Weierstrass P and Zeta functions are absent from PoV, I developed
a parmetrization using only functions supported in PoV.

The Weierstrass P function is implemented with economized polynomials.
And the Weierstrass Zeta function is realized with Theta functions.
The resulting x,y and z functions are ugly and unilluminating but I
only aimed for a working scheme.

In this instance the source is rolled up in a zip file. It works in
dos, but I get errors with Linux. The PoV expression parser is
probably a bit streched.

If anybody is deeply interested in a blow
by blow account on how this was done, send me a note.
Here is the (pkzipped) PoV3-source I used

Back