Programs for generating segments of a cut cylinder.

Please also see the powerful option for users to use their own equations to define electrode shapes.

Program 26 generates the segments of a cylinder that has an end cut at an angle, for insertion into a data file for CPO3D.

See also program 31, program for generating segments of a cut cone.

It is assumed that:

(1) the z axis is the axis of the cylinder

(2) the cut end starts at (x,y,z) = (-r,0,0), where r is the radius of the cylinder

(3) the cut end finishes at (x,y,z) = (r,0,zm)

(4) the xz plane is a plane of reflection symmetry, so therefore only the segments that have y >= 0 will be generated

At the edge of the cut this program will generate triangles of the type 'end conical or cylindrical triangles'. The relevant cone will be given an opening angle of 1/s and its pointed end will be put at z = s, where s = r*1.E8, which effectively turns the cone into a cylinder. (Note that 'end cylindrical triangles' are not included in CPO3D.)

These triangles have the property that when they are subdivided the resulting triangles have sides that continue to lie along the cut edge.

The parts of the cylinder that do not touch the cut end are rectangular and are subdivided into rectangular segments.

If ns (see above) is non-zero then the program will maintain n-fold symmetry about the axis, where n = 4*ns. So for 8-fold or 6-fold symmetry put ns = 2 or 3 respectively.

The uncut part of the cylinder is not included, but can be added by the user.

If the xz plane is not a plane of reflection symmetry then the segments that have y <= 0 can be generated by reflection, using the 'transform' option of the CPO3D program.

The cut cylinder can be scaled and/or shifted and/or reflected and/or rotated by the using the 'transform' option of the CPO3D program.

(1) Copy prog26.dat to tempin.dat

(2) Edit tempin.dat

(3) Use the command prog26 (or in some other way call prog26.exe)

(4) Copy the contents of tempout.dat and paste them into a suitable data file for CPO3D

(5) Add the remaining uncut part of the cylinder

(6) If the y=0 plane is not a plane of reflection symmetry then add the segments at y < 0 by using the 'reflect' option of the 'transform' option

(7) Use the 'transform' option to scale and/or shift and/or reflect and/or rotate the object.

The files prog26.f90, prog26.exe and prog26.dat are included with the CPO package.

The source file prog26.f90 can of course be edited to modify or extend it.

Here is an example of a data file that can be used with program 25:

1. ! =radius of sphere (called r below)

0.5 ! =highest z of cut cylinder (called zm below)

0 ! =subdivision number around axis (called ns below)

50 ! =approximate total number of segments

1 ! =number of the applied voltage

This data has been used to create the electrodes of the ‘shape’ file shap3d25.dat.