(* warped catenoid cousins in explicit form *)

l=2;
d=1;
b=0.5;

xsteps = 33;
ysteps = 32;
xstepsize = -0.05;
ystepsize = 1.57075/16;
xbegin = ( 4 l Sqrt[1+b^2]/(-d^2+l^2) )^(1/l); (* x is r *)
Print["initial z point is ",xbegin];
xend = xbegin-1.65; 
ybegin = 0.0; (* y goes from 0 to 2pi *)
yend = 6.283/2;

aa = (Sqrt[(d d-l l)/d]/(l-d)) xbegin^((d-l)/2);
bb = ((d-l) Sqrt[(d d-l l)/d]/(4 l)) xbegin^((d+l)/2) - b aa;
cc = (Sqrt[(d d-l l)/d]/(l+d)) xbegin^((-d-l)/2);
dd = ((-l-d) Sqrt[(d d-l l)/d]/(4 l)) xbegin^((-d+l)/2) - b cc; 
adjust=((cc^2+dd^2)/(aa^2+bb^2))^(1/4);

j=0;Do[{i=0;j=j+1;
Print["next y = ",y];
Do[ 
{i=i+1;
z=x Exp[I y];
v[i,j,1] = adjust (Sqrt[(d d-l l)/d]/(l-d)) z^((d-l)/2);
v[i,j,2] = adjust ((d-l) Sqrt[(d d-l l)/d]/(4 l)) z^((d+l)/2) - b v[i,j,1];
v[i,j,3] = (1/adjust) (Sqrt[(d d-l l)/d]/(l+d)) z^((-d-l)/2);
v[i,j,4] = (1/adjust) ((-l-d) Sqrt[(d d-l l)/d]/(4 l)) z^((-d+l)/2) - b v[i,j,3]; 

(* Now convert to SL(2,C) model for H3.  *)
f11 = (v[i,j,1])*Conjugate[v[i,j,1]] + (v[i,j,2])*Conjugate[v[i,j,2]];
f12 = (v[i,j,1])*Conjugate[v[i,j,3]] + (v[i,j,2])*Conjugate[v[i,j,4]];
f21 = (v[i,j,3])*Conjugate[v[i,j,1]] + (v[i,j,4])*Conjugate[v[i,j,2]];
f22 = (v[i,j,3])*Conjugate[v[i,j,3]] + (v[i,j,4])*Conjugate[v[i,j,4]];

(* Now convert to Minkowski model for H3.  *)
t = (f11 + f22)*(0.5);
x1 = (f12+f21)*(0.5);
x2 = (f12-f21)*(-0.5 I);
x3 = (f11-f22)*(0.5);

(* Now convert to Poincare model for H3.  *)
v[i,j,13] = Re[x1/(1+t)];
v[i,j,14] = Re[x2/(1+t)];
v[i,j,15] = Re[x3/(1+t)]; 
w[i,j,13] = Re[x1/(1+t)];
w[i,j,14] = Re[x2/(1+t)];
w[i,j,15] = -Re[x3/(1+t)]; 

},{x, xbegin, xend, xstepsize} ];},
{y, ybegin, yend, ystepsize} ];

(* Now we make the graphics.*)

forjavaview=Show[Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[v[i,j,k],{k,13,15}],Table[v[i+1,j,k],
  {k,13,15}],Table[v[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[v[i+1,j,k],{k,13,15}],Table[v[i+1,j+1,k],
  {k,13,15}],Table[v[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[w[i+1,j,k],{k,13,15}],Table[w[i,j,k],
  {k,13,15}],Table[w[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[w[i+1,j+1,k],{k,13,15}],Table[w[i+1,j,k],
  {k,13,15}],Table[w[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  PlotRange -> {{-1,1},{-1,1},{-1,1}}, Boxed -> False];
  
(*forjavaview=Show[Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[v[i,j,k],{k,13,15}],Table[v[i+1,j,k],
  {k,13,15}],Table[v[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  Table[Graphics3D[{EdgeForm[ ],Polygon[{Table[v[i+1,j+1,k],{k,13,15}],Table[v[i+1,j,k],
  {k,13,15}],Table[v[i,j+1,k],{k,13,15}]}]}],{i,1,xsteps},{j,1,ysteps}],
  Graphics3D[{PointSize[0],Point[{v[1,1,13],v[1,1,14],v[1,1,15]}]}],
  ParametricPlot3D[{Cos[t],Sin[t],0},{t,0,2 Pi}],
  ParametricPlot3D[{Sqrt[3] Cos[t]/2,Sqrt[3] Sin[t]/2,1/2},{t,0,2 Pi}],
  ParametricPlot3D[{Sqrt[3] Cos[t]/2,Sqrt[3] Sin[t]/2,-1/2},{t,0,2 Pi}],
  ParametricPlot3D[{Cos[t],0,Sin[t]},{t,0,2 Pi}],
  ParametricPlot3D[{0,Cos[t],Sin[t]},{t,0,2 Pi}],
  PlotRange -> {{-1,1},{-1,1},{-1,1}}, Boxed -> False];*)

<< JavaView`RunThrough`

RunJavaView[forjavaview]