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.

Computational mesh,which is constituent of voxels, situated 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.

Voxels location. Template

Picture 1– Voxel location template

Table 1 shows geometric parameters of a sheet with voxels.

Table 1 — Parameters of sheet with voxels

Symbol
Description
w
Sheet length
h
Sheet width
\Delta_h_o_r
Horizontal offset between two voxels, situated in one row
\Delta_v_e_r_t
Vertical offset between two voxels, situated in one row
r_b
Radius of one voxel base
h_b
The height of one voxel

BOUNDARY PARAMETERS FOR A CYLINDER SHAPED MESH

Consider natural constraints, put on the listed parameters:

(1)   \begin{equation*} \Delta_h_o_r\dots 2r_b \end{equation*}

    \[ \Delta_v_e_r_t\dots 2r_b\]

    \[ \sqrt{\Delta^2_h_o_r+\Delta^2_v_e_r_t}\dots 4r_b\]

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 R. Section, orthogonal to the axis of cylinder, is shown in picture 2 (red color figure).

The location scheme of cylinder and section, orthogonal to the cylinder axis

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)   \begin{equation*} \rho(\varphi)=R+(\frac{h_b}{2\pi})\varphi \end{equation*}

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 P on the sheet is set by (x,y), coordinates, and it is necessary to compute corresponding 3D coordinates (x_s,y_s,z_s). Assuming that the axis of cylinder coincides with O_z, axis and the lower base of cylinder is situated on the O_x_y surface. According to some specifications made, the equality (congruence) z_s=y takes place.

In order to compute the other two spatial coordinates, as it follows from formula (2), it is necessary to know \varphi_P angle. To compute this angle let us calculate the distance from point P to the axis of cylinder. Analyzing the point on the surface we will find out that the distance to the axis is x. If we consider P 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)   \begin{equation*} \int_{0}^{\varphi_P}\sqrt{(\frac{h_b}{2\pi})^2+(R+\frac{h_b}{2\pi}\varphi)^2}d\varphi \end{equation*}

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

    \[ x=\frac{h_b}{4\pi}((\frac {2\pi}{h_b}R+\varphi_P)\sqrt{1+(\frac{2\pi}{h_b}R+\varphi_P)^2}+\ln((\frac{2\pi}{h_b}R+\varphi_P)+\]

(4)   \begin{equation*} +\sqrt{1+(\frac {2\pi}{h_b}R+\varphi_P)^2}))-\frac{h_b}{4\pi}(\frac{2\pi}{h_b}R\sqrt{1+(\frac{2\pi}{h_b}R)^2}+\end{equation*}

    \[ +\ln(\frac{2\pi}{h_b}R+\sqrt{1+(\frac{2\pi}{h_b}R)^2}))\]

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

After we have found \varphi_P angle, coordinates x_s and y_s are found by formulas

(5)   \begin{equation*} \ x_s=(R+\frac {h_b}{2\pi}\varphi_P)\cos(\varphi_P), y_s=(R+\frac {h_b}{2\pi}\varphi_P)\sin(\varphi_P) \end{equation*}

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>