[Gmsh] Ellipsoid

Carlo Bencivenni cbencivenni at hotmail.com
Thu Dec 9 17:38:34 CET 2010

I need to mesh half ellipsoid laying in the XY plane on the minor axis a with major axis along the positive Z.
Based on the demo of the sphere I substitued the circular arcs in the Z direction with elliptic arc. (below the code)
Unfortuantely the result is not the expected one as the circular section in the XY cuts along Z are not preserved.
Seems that while for all circular arcs the ruled surface returns an actual quarter of a sphere, substituting with ellipses the resutling shape it's deformed.
Do you have any ideas for addressing this?
Thank you,
Point(100) = {0, 0, LensH, cellSize};   //Sphere center
Point(101) = {LensA, 0, LensH, cellSize};  //Sphere X radius
Point(102) = {0, LensA, LensH, cellSize};  //Sphere y radius
Point(103) = {0, 0, LensH+LensB, cellSize};  //Sphere z radius
Circle(110) = {101, 100, 102};    //Sphere XY arc
Ellipse(111) = {101, 100, 103, 103};   //Sphere XZ arc
Ellipse(112) = {102, 100, 103, 103};   //Sphere YZ arc
Line Loop(199) = {110, 112, -111} ;  //Sphere slice edge 
Ruled Surface (1) = {199};    //Sphere slice surface

t1[] = Rotate {{0,0,1},{0,0,0},Pi/2} {Duplicata{Surface{1};}}; 
t2[] = Rotate {{0,0,1},{0,0,0},Pi} {Duplicata{Surface{1};}}; 
t3[] = Rotate {{0,0,1},{0,0,0},3*Pi/2} {Duplicata{Surface{1};}}; 
Surface Loop(100)={1,t1[0],t2[0],t3[0]};  		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20101209/6f6e79b1/attachment.html>