## Algorithms and Mathematical Notes of Creating Cylinder Shaped Voxel Meshes

** In the range of applied problems for various industries, for example, architecture, fine arts, animation (movies), meshes of complex configuration may be of great demand. Let us show, how it is possible to describe a configurationally complex computational mesh, consisted of voxels (bubble shaped), which are located on a sheet and twisted into cylinder. **

Let us describe a mathematical model used at the design of algorithms of cylinder shaped voxel meshes.

**INITIAL DATA FOR CREATING VOXEL MESH**

There is a sheet with voxels (bubbles of cylinder shape) located on its surface. Then, it is assumed that voxels are situated on the sheet according to the template, demonstrated in the picture 1.

**Picture 1– Voxel location template**

Table 1 shows geometric parameters of a sheet with voxels.

**Table 1 — Parameters of sheet with voxels**

**BOUNDARY PARAMETERS FOR A CYLINDER SHAPED MESH**

Consider natural constraints, put on the listed parameters:

(1)

Let’s analyze a cylinder that constitutes a finite computational mesh with voxels. Without loss of generality we consider that the height of the cylinder coincides (or agrees with) with the sheet width, and cylinder radius is . Section, orthogonal to the axis of cylinder, is shown in picture 2 (red color figure).

**Picture 2 – Geometric parameters of a cylinder**

**2D MODELING OF COMPUTATIONAL MESH**

The use of the computational mesh at the modeling of physical processes, for example, in building industry, may impose on voxels and cylinder additional physical parameters, such as sheet stretching, and also possible deformations of voxels. In order to minimize physical influence, it is supposed to twist the sheet not around the cylinder, but around the part of a spiral line (integration of blue and red elements in pic.2). Due to this approach we may consider with more precision that the sheet after twisting will be Archimedian spiral shaped. The projection of the spiral on the section, orthogonal to the axis of cylinder in polar coordinates, is determined by the following formula:

(2)

Henceforth, if not to say the opposite, cylinder is a figure with the section as shown in pic. 2.

To develop the algorithm of transferring the surface of the object into voxels it is necessary to perform the transformation of 2D coordinates of a point on the sheet into 3D coordinates, which will appertain to the point after wrapping the sheet around the cylinder.

**3D MATHEMATICAL MODEL**

Let us develop formulas of transformation of 2D coordinates into 3D. Let the point on the sheet is set by , coordinates, and it is necessary to compute corresponding 3D coordinates . Assuming that the axis of cylinder coincides with , axis and the lower base of cylinder is situated on the surface. According to some specifications made, the equality (congruence) = takes place.

In order to compute the other two spatial coordinates, as it follows from formula (2), it is necessary to know angle. To compute this angle let us calculate the distance from point to the axis of cylinder. Analyzing the point on the surface we will find out that the distance to the axis is . If we consider as the point on Archimedian spiral, and applying formula of computing the length of curve, set in polar coordinates, we obtain the result that the distance along the curve to the axis is

(3)

Computing the integral in formula (3), we obtain the equation for computing the polar angle

(4)

Equation (4) is solved by numerical methods, for example, by Newton method.

After we have found angle, coordinates and are found by formulas

(5)

**CONCLUSIONS**

As can be seen from the above, we have described a mathematical model of the development of configurationally complex computational mesh, consisted of voxels that are situated on a sheet and twisted into cylinder.