Научная статья на тему 'Ray tracing synthesis of spatial curve images built by the spherical interpolation method'

Ray tracing synthesis of spatial curve images built by the spherical interpolation method Текст научной статьи по специальности «Компьютерные и информационные науки»

CC BY
53
12
i Надоели баннеры? Вы всегда можете отключить рекламу.
Ключевые слова
ОБРАТНОЕ ТРАССИРОВАНИЕ / ПРОЕКЦИОННЫЙ ЛУЧ / МОДЕЛИРОВАНИЕ КРИВЫХ И ПОВЕРХНОСТЕЙ / КВАДРИК / СФЕРИЧЕСКАЯ ИНТЕРПОЛЯЦИИ / RAY TRACING / PROJECTION RAY / MODELING OF CURVES AND SURFACES / QUADRICS / SPHERICAL INTERPOLATION

Аннотация научной статьи по компьютерным и информационным наукам, автор научной работы — Gusiatin Vladimir, Gusiatin Maksim, Mikhal Oleg

The problem of visualization by ray tracing of spatial curves specified by interpolation points and smoothed by the method of spherical interpolation was solved. The method of spherical interpolation was developed mainly for interpolation of a triangulated surface with the purpose of further visualization of this surface by the method of ray tracing. This method is universal and enables the construction of flat and three-dimensional smooth curves drawn through arbitrarily set points. The paper presents analytical relationships for realization of each stage of construction of a spatial curve by this method. To visualize a spatial curve, an iterative process (IP) was developed for calculation of a point in the projection ray (PR) closest to some point of a mathematical spatial curve. To establish correspondence of the curve point to a pixel in a computer monitor screen, position of this point was determined relative to the space region bounded by the pyramid of pixel visibility. The proposed IP has a potential of wide parallelization of computations. An algorithm for constructing points of a spatial curve was developed with its step coinciding with the step of the iterative calculation process, which allows one to perform visualization algorithm and plot a curve point in a single pass of the IP. To this end, the point in the PR and the direction vector of the curve lie in the same plane perpendicular to the interpolated segment in each iteration step. This approach enables determination of the directing vector modulus for the subsequent stage of this iteration step. The proposed interpolation algorithm is based on the simplest algebraic surface, sphere, and does not use algebraic polynomials of the third and higher degrees. The results of the studies were confirmed by simulation of the visualization process using the Wolfram Mathematica software package. The problem of combining new methods for constructing smooth geometric shapes of spatial curves defined by straight lines and the method of ray tracing which on the whole will increase realism of the synthesized scenes in computer graphics was solved.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Синтез обратным трассированием изображений пространственных кривых, сформированных методом сферической интерполяции

Решается задача визуализации обратным трассированием пространственных кривых, заданных точками интерполяции, и сглаженных методом сферической интерполяции. Приведены аналитические соотношения для реализации каждого этапа построения и визуализации таких кривых. Особенностью решения задачи является совмещение метода сферической интерполяции и синтеза изображения пространственной кривой методом обратного трассирования за один проход. Такой подход позволяет повысить реалистичность изображений сцен

Текст научной работы на тему «Ray tracing synthesis of spatial curve images built by the spherical interpolation method»

H MATHEMATICS AND CYBERNETICS

:::::::::::: i-

-□ □-

Виршуеться задача вiзуалiзацii зворотним трасу-ванням просторових кривих, заданих точками ттер-поляци, i згладжених методом сферичноi ттерполя-ци. Наведено аналтичш спiввiдношення для реалiзацii кожного етапу побудови i вiзуалiзацii таких кривих. Особлив^тю ршення задачi е поеднання методу сфе-ричноi штерполяци i синтезу зображення просторовоi кривоi методом зворотного трасування за один прохгд. Такий пiдхiд дозволяе тдвищити реал^тичтсть зобра-жень сцен

Ключовi слова: зворотне трасування, проекцшний промть, моделювання кривих i поверхонь, квадрж, сфе-

рична ттерполящя

□-□

Решается задача визуализации обратным трассированием пространственных кривых, заданных точками интерполяции, и сглаженных методом сферической интерполяции. Приведены аналитические соотношения для реализации каждого этапа построения и визуализации таких кривых. Особенностью решения задачи является совмещение метода сферической интерполяции и синтеза изображения пространственной кривой методом обратного трассирования за один проход. Такой подход позволяет повысить реалистичность изображений сцен

Ключевые слова: обратное трассирование, проекционный луч, моделирование кривых и поверхностей, квадрик, сферическая интерполяции -□ □-

UDC 004.925

|DOI: 10.15587/1729-4061.2017.103975

RAY TRACING SYNTHESIS OF SPATIAL CURVE IMAGES BUILT BY THE SPHERICAL INTERPOLATION METHOD

V. G usi ati n

PhD, Professor* Е-mail: [email protected] M . G u s i a t i n

Engineer* Е-mail: [email protected] О. Mikhal

Doctor of Technical Science, Professor, Head of Department* Е-mail: [email protected] *Department of Electronic Computers National University of Radio Electronics Nauky ave., 14, Kharkiv, Ukraine, 61166

1. Introduction

The main trend in modern computer graphics consists in strengthening realism of synthesized scenes [1]. Meeting the requirement of high realism is an important factor, for example, in designing visualization systems (VS) for simulators of a variety of vehicles (e. g., aviation training simulators) or those used in film making with the use of computer graphics, etc. One possible way to cope with this problem is to apply the ray tracing method in solving problems of image synthesis [2].

The ray tracing method has been actively developing in recent years. It enables synthesis of images of analytically described surfaces without their preliminary triangulation, which significantly increases realism of the synthesized images of objects. At the same time, the base of models of objects and software accumulated in the computer graphics are oriented to the curves set by straight line segments and triangulated surfaces. In the classical computer graphics, this representation is necessary to synthesize curves and surfaces by the rasterization method.

Combination of the ray tracing method with the accumulated base of object models and software should be realized preserving features of high realism of the method.

Solution of this problem is greatly simplified if the method of spherical interpolation is used to interpolate curves and surfaces.

Therefore, study of capabilities of synthesis by ray tracing of images of smooth spatial curves constructed by the method of spherical interpolation is a crucial issue.

2. Literature review and problem statement

The methods for constructing curves and surfaces that interpolate points set in space largely determine complexity of the algorithm for synthesizing images of objects and realism of the synthesized scene. Comparison of various ways of describing curves and surfaces in solving problems of image synthesis by the method of ray tracing is given hereinafter. Objects with a triangulated surface without smoothing are used alongside the method of ray tracing in [3]. A method was proposed for finding the point of intersection of a projection ray (PR) with a triangle. At the same time, this approach significantly worsens realism of synthesized objects since the surface geometry is violated and physically correct illumination cannot be calculated.

One of convenient mathematical methods for describing curvilinear forms of objects consists in their representation with the help of pieces of parametric curves, surfaces or splines. Finding the point of intersection of a PR with such surfaces is not an easy task. An algorithm for finding point of intersection of a PR with NURBS splines was proposed in

[4]. This algorithm is based on the well-known Bzier's clipping method. The author proposed to transform the NURBS surface into rational Bezier regions at the stage of preliminary preparation of the algorithm to work which requires additional computational costs. A complex approach is presented in

[5]. Parametrically free surface forms and the most suitable for them way of visualization by the ray tracing method are studied there. In general, analysis of works [4, 5] makes it possible to note that the use of NURBS and other parametric curves and surfaces significantly lengthens time of rendering the scene by the ray tracing method. This makes it difficult to use standard algorithms for image synthesis with the help of the ray tracing method. This feature of parametric description has made the researchers resort to algebraic curves and surfaces. A method for approximating a given set of ordered data points using biarc interpolation was proposed in [6]. There is no complex approach: construction of surfaces by this method and visualization by the ray tracing method are not considered. Construction of spherical splines for interpolation is discussed in [7]. In view of complexity, it is proposed to use this method for solving problems arising in geophysics and for a realistic description of the Earth's geopotential. Local mixing of radially basic functions was proposed in [8] to construct surfaces. When using this approach, difficulties with boundary bonding arise in interpolation of triangulated surfaces. The interpolation surface for a triangle was constructed in [9] by mixing two algebraic surfaces of the second and third order. To increase variety of forms of the interpolation surface, it was proposed to blend two algebraic surfaces of the second and third order. Disadvantage of this approach consists in complexity of calculation of such surfaces. The lack of an algorithm for finding point of intersection of a PR with the surface makes it difficult to use this method in constructing VS. It was proposed in [10] to use an algebraic surface of the second order as perturbation functions but an initial triangulation net of high detail is required for interpolation. Besides, formation of such a surface is multi-stage and the time of image synthesis increases if the surface geometry alters. According to the author of this method, it can be used in systems of interactive volumetric oriented geometric modeling. It was proposed in [11] to apply the method of spherical interpolation which is based on the use of the simplest quadric, sphere. An example of construction of a spatial curve was considered. With this approach, the following problems can be solved. Restoration of a smooth surface is possible using an existing model base with a triangulated surface. In this case, there is no need to interpolate illumination according to Gouraud or Phong shading. When calculating glare, there is no need to calculate bidirectional reflectance distribution function (BRDF) and perspective is taken into account when calculating illumination. An undistorted by faces shadow shape is obtained in mapping. It is easier to apply a texture and much more. An example of constructing a curve by the method of spherical interpolation and its visualization by ray tracing is considered in [12].

Thus, there is a problem in computer graphics related with combining highly realistic image synthesis by the method of ray tracing with the accumulated base of model objects having triangulated surfaces and linearly interpolated curves. The first part of this problem solution consists in necessity of further studies of the interpolation methods based on algebraic surfaces, quadrics. It is necessary that this method be uniform (universal) both for constructing curves and surfaces. The second part of the problem solution is elaboration of the main stages (algorithms) of visualization by t e method

of ray tracing of arbitrary curves and surfaces constructed using algebraic surfaces. These surfaces make it possible to perform operation of tracing PR in a simplest way. This work is part of such studies. The work presents a complex solution for constructing spatial curves by the method of spherical interpolation and synthesis of such curve image by ray tracing based on the proposed iterative process.

3. The aim and objectives of the study

This work objective was to develop stages of image synthesis by ray tracing of spatial curves constructed by the method of spherical interpolation.

To achieve this objective, the following tasks were accomplished:

- for visualization, construct an iterative process (IP) of calculation of the point in the PR nearest to some point in the mathematical spatial curve;

- elaborate stages of the construction of points in the spatial curve that would coincide with the step of the iterative calculation process which allows one to perform visualization algorithm and plot the curve point in one IP pass.

4. The main stages of synthesis of the spatial curve image

4. 1. Features of construction of the projection ray

The process of synthesizing images of spatial mathematical curves by the method of ray tracing is complicated by the fact that there is no size of this object (for example, the size of the cross section of such a curve). In accordance with the method of ray tracing, it is necessary to find the intersection point of the projection ray (PR) with the object (it has no size in this case). In order to "capture" such an object, introduce the concept of pixel visibility pyramid (PVP). This approach makes it possible to estimate whether the mathematical point in the curve falls into the region of space allocated to PVP, that is, to verify the "capture" operation. In this case, the minimum widths of the line of the synthesized image in a screen are limited by the pixel dimensions. Basic relationships for construction of PVP are shown below. Fig. 1 presents geometric elements of the problem.

Fig. 1. Geometric elements of the problem

The right coordinate system XYZ is shown here (the z axis is directed upwards). The geometric scheme realizes centroprojective transformation of the synthesized spatial curve image onto the screen. In the scene bounded by a cube in Fig. 1, points (p1-p12) connected by straight lines present the initial data for the synthesized smooth curve. These initial data are supplemented with unit normals at each point n1{n1x, n1y, n1z}-n12 [11]. A flat screen is shown: (ps1-ps4) are set in XYZ coordinate system. Assume that the screen pixel is a square with vertices set by points (pxj-px4) in XYZ coordinate system. In this case, the four planes forming the PVP can be determined for three points. One point, the center of projection h, is common for all planes. Two more points for each of the four planes are determined at the pixel vertices. For definiteness, denote these planes fpi-fp4 by the numbers of the first points (of two) denoting the pixel vertices:

fp1 (x, y, z); fp2 (x, y, z); fp3 (x, y, z); fp4 (x, y, z). (1)

Relationships (1) will be used to perform "capture" test.

4. 2. Interpolation region. Sphere of greatest curvature

According to [11], the method of spherical interpolation makes it possible to construct a smooth curve, both locally for an individual segment and as a whole for all segments. Therefore, in outlining of the main synthesis, the process of calculations for a local (individual) segment will be considered. Since hereinafter, vector quantities will be mainly written in relationships, they will not be denoted by an arrow. It is also important to note here that the points specified in XYZ coordinate system can be defined as the radius-vector of these points.

The following notation was adopted in Fig. 1: h is the radius-vector of the projection center; v is the observation vector connecting the point h with an arbitrary pixel in the screen. By analogy with [12], allocate a region of interpolation for each segment. To do this, construct a sphere of greatest curvature for the chosen segment. This sphere limits the space in such a way that any spatial curve constructed in a segment, e. g. pi, p2, will be inside this sphere. Define the radius-vector c0 for the middle of segment pj, p2 in which center of the sphere of greatest curvature is located

c0 =(Pl + P2 )/2

p (t) = h + v ■ t, where t is parameter, scalar,

v = Pxi + Px3 _ h

Write down equation of the plane passing through the center of the sphere of greatest curvature and perpendicular to the observation vector

(r _ Co )■ v = 0.

(5)

Find a joint solution of equations (4) and (5) with respect to t and substitute the obtained value in (4). Thus, the radius-vector p(t0) is obtained which determines, for a given value of t0, position of the point of intersection p0(x, y, z) of the projection ray with surface (5), p0 henceforth. Write down distance l0 of the point p0 from the center c0 of the sphere of greatest curvature:

l0=|p0-c0|.

To evaluate the test, calculate the predicate:

predl =

1,l0 < R _ count, 0, background color.

(6)

(2)

Write the equation for the sphere of greatest curvature in a vector form:

|r - c0| - R = 0, (3)

where r is radius-vector specifying a point in the surface.

4. 3. Test for checking transition of the projection beam in the interpolation region

Write in a parametric form the equation of straight line (projection ray is PR hereinafter) which coincides with the observation vector

If predj=0, a background color is assigned to the pixel, otherwise count for this projection ray continues. This approach allows one to reduce counting time since there is a lot of background space between the interpolation regions.

4. 4. Relationships for construction of reference spheres

To simplify notation, assume that the segment p1, p2 is chosen in the previous step.

The vector field of the guides in which, properly, points of the interpolating curve constructed by the method of spherical interpolation will actually lie are defined as the straight lines perpendicular to the straight line connecting two consecutive points pj, p2 in the interpolation region [11]. The main feature of the method of spherical interpolation is the use of such quadric as a sphere for constructing a spatial curve of arbitrary shape between two points. The presence of normals to the future curve at each point through which it passes allows one to obtain, along with connectivity (C0), continuity of the first derivative, i.e. smoothness (C1) of the synthesized curve [1, 11]. In the process of synthesizing image of the curve, perform the following geometric constructions. Draw two spheres (so-called reference spheres) through the ends of a segment of each straight line, for example, through the points pj, p2. In this case, the center o1 of one sphere must be located in the line passing through the point p1 and coinciding with the vector n of the normal at this point. The center o2 of the second sphere must be in the straight line passing through the point p2 and coinciding with the vector of the normal n2.

The relationships for the equations of these lines have the form:

po1 = p1 + n1 ■ t; po2 = p2 + n2 ■ t.

(7)

(4)

Introduce notation and write the equation for the plane passing through the point (2) perpendicular to this segment

f0 (r) = (r _ c0 )(p2 _ p1 ).

(8)

Find joint solution of equations (7) for each straight line and (8) relative to t and substitute the obtained values in (7). Thus, radius-vectors for the centers oi, o2 of the reference spheres are obtained.

Write down the scalar values of the radii for the reference spheres:

R1 = |Pi - °i|;R2 = |P2 - °21.

Write down final equations for the reference spheres in a vector form:

|r - oj - R1 = 0;|r - o2| - R2 = 0. (9)

The reference spheres do not change during the curve synthesis.

4. 5. Relationships for constructing spatial curve

All steps of constructing spatial curve by the method of spherical interpolation are described in detail in [11]. Write the equation of the straight line parallel to the vector of the segment p2-p1 and passing through, e. g. the p1 point:

p (t) = pi + (p2 - pi )■ t. (10)

Construct vector field of the guides [11]. Write down vectors for each reference sphere:

vo1 = c0 -o1, vo2 = c0 -o2. (11)

Next, write down for each reference sphere equations of the lines passing through arbitrary points p(t) in segment p1, p2 of the straight line (10) and parallel to the corresponding vectors (11):

l1 = p(t) + vo1 ■ to, l2 = p(t) + vo2 ■ t0. (12)

Substitute (12) into the equations of spheres (9) and find values of t0 at which intersection of the lines (12) with the spheres (9) respectively is done. Let they be t^, t°2 for the first sphere and t21, t^2. for the second sphere. Substitute these values into equation (12) and obtain values of coordinates XYZ for each point of intersection. There are two intersection points for each sphere. Let they be (p^p^), (plj1,plj2) for the first and second sphere, respectively. Make use of [11] for a correct choice of roots. Let they be, for example, p^ and p21. Further, according to [11], write down relations for the directing vectors:

S11 = p°1 - p (t);S21 = p21 - p (t).

Finally, expression for the radius-vector specifying a point in the constructed curve, e. g. in the segment between points p1, p2, is written as relationship:

s(t) = p(t) + (sH (1-t) + s21 ■ t), (13)

where t is a parameter that varies from zero to one in segment p1, p2. The second term in equation (13) forms the vector field of the guides in which points of the interpolating curve actually lie. When parameter t is changed, linear interpolation of vectors s11, s21 is performed. As a result, a certain ruled surface is formed in which directing vectors

perpendicular to the segment p1, p2 lie as it follows from relations (11), (12).

4. 6. Construction of the iterative process

In a case if the test (6) yields pred1=1, find segment of PR which fell into the region of interpolation. To this end, solve the system of equations (3), (4) relative to the t parameter. In a general case, solution of intersection with the sphere gives two roots: - t1, t2. Substitute these roots in equation (4) and obtain coordinates of the points of intersection with coordinate system XYZ. Let these be points p(t1), p(t2). Write down the equation of straight line for a part of the PR segment with its ends at these points. Then equation for this straight line coinciding with the PR has the form:

pr (t) = p(t1 ) + (p (t2)-p(t1 ))■ t. (14)

In a general case, it is necessary to find at least one point in line (14) which closest approaches the constructed curve (13). Calculate these points using an iterative algorithm that determines n1 orders of the unknown number in each iteration step. In this case, the number of iterations will be equal to:

K = n/n1, (15)

where n is the number of orders of the unknown number. Assume that n and n1 are multiples.

Hereinafter, to construct an iteration process (IP), refer to the work of one of the authors of this article [13] in which it is proposed to represent parameter t as:

tk = tk-1 + n A, (16)

where k is the step number of iterations, ke{1, 2, ...,K}; 5k is the quantum of the k-th step of iterations, 5k=2-n1k; nk is a positive coefficient determining the number of quanta used in the k-th step of iterations.

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

The goal of each k-th step is definition of a segment in the line (14) (hereinafter, selected segment) within the boundaries of which the result of joint solution of equations (13), (14) can be found. It is important to note that the selected segment (SS) decreases in 2n1 in each next step of IP. In this case, joint solution is understood as finding a region of space in which curve (13) and straight line (14) are located most closely (in a particular case, they coincide). Main stages of computation performed in the k-th step of iterations of IP are considered below.

Stage 1. Substitute parameter value in equation (14) in this form:

pr (tk-1 + jA), (17)

where tk-1 is the parameter calculated in a general case in the previous step of IP. Since consideration is started from k=1, tk-1=t0=0 is obtained. Assume that the t parameter in (14) specifies length of segment p(t2)-p(t1) in relative units. At this stage, this segment and all subsequent selected segments are divided into 2n1 equal segments. Denote the radius-vectors of the end points of these equal segments at the k-th step taking into account (14) with prk, where j index is introduced for numbering of points bounding equal segments prk, where

j e{0,1,2, ... J},J = 2"1.

In this case, the quantum value 5k=2"n1 for k=1. Taking into account (14), agree that j index will be counted in a direction from point p(t1) to point p(t2).

Stage 2. Draw planes perpendicular to the segment, e. g. p1, p2, for which joint solution of equations (13), (14) is searched through points prr1 of the ends of equal segments. Write down equation of these planes for the k-th step:

(18) 4. 7. The test of performance of the "capture" operation

To determine whether a particular point of the interpolating curve belongs to the corresponding PR, perform a test to know whether this point was got in the PVP. As a test point, the curve (13) point can be taken which corresponds e. g. to the initial index of the selected segment in the PR in the last algorithm step. Let this be in accordance with (20): s(t0k). To perform the test, substitute the value px= =(pxj+px3)/2 in (1) and obtain a set of 4 numbers:

fjk (r) = (r _ pj )(p2 _ p1 ).

(19)

fp1 (p4 fp2 (p4 fp3 (p4 fp4 (px).

(24)

Next, find joint solutions for equations (10) and (19) relative to t for each j at k=1. Denote these solutions as t0,t1,...tJ. In total, j+1 solutions are obtained. Substituting these solutions in (13) and taking into account relationships (7)-(12), coordinates for j+1 corresponding points in the interpolating curve of segment p1, p2 are obtained. Denote the radius-vectors for the computed points of the interpolating curve (with k=1) as follows:

s(ti ),s (t1 ), ...,s (tJ ).

(20)

Select signs of numbers in (24) and form a set of "standard signs" for the region of space bounded by PVP:

f=

sign1

= {signfp1 (px),signfp2 (px ),signfp3 (px), signfp4 (px)}. (25)

Use relationships (1) and (25) to identify position of any point of the interpolating curve relative to the region of space bounded by PVP. In analogy with (25), write the sign function for a point s(t°) closest to the selected segment in the PR: 0

f=

sign2

Stage 3. Define the selected segment. To do this, find

differences between the radius-vectors (17) and (20) for r , ,

all j. Denote the newly obtained difference vectors as ={signfp1 (s(to )),signf follows:

p2 Is (tK

,signfp3 (s (tK

,signfp

p4(s(tK

))}. (26)

d0,d1,.„IdJ.

(21)

To evaluate the test, calculate the predicate using relations (25) and (26):

Next, find modules md°l of the resulting vectors (21) and sum them in pairs for each j-th segment. Denote these sums as follows:

pred2 =

1,fsign2 = fsign1 _ pixel color

0, background color.

sdk = mdk + mdk+1,

(22)

where subscripts j and j+1 are initial and final indices, respectively.

Find minimal sum in the resulting set of sums (22). In a general case, such sums can be more than one. Then choose a sum with a minimum j value. The segment in the line (14) with minimal j value and with minimum sum (22) is defined as the selected segment. In the given k-th step (or iteration), this segment is the closest to some point of the interpolating curve.

Stage 4. Define scalar factor nk for relationship (16)

nk = ( j)k,

(23)

where (j)k is value of the initial index of the selected segment at the previous stage of the k-th step.

Stage 5. Calculate parameter tk in the iterative equation (16) taking into account nk=ni determined at the previous stage. Initial conditions at k=1 for the IP are tk-i=t0=0. The obtained value of the parameter in this step of iteration when substituted in (14) makes it possible to calculate radius-vector of the initial point of the selected segment in coordinate system XYZ.

Calculation of all IP steps for stages 1-5 are continued until k=K. In the last step of the algorithm, a selected segment is obtained in the PR. All points of this segment are closest to a certain point of the interpolating curve with an accuracy determined by the number of steps of the IP.

Items 4.1-4.7 are performed for each PR. The process of image construction can be materially accelerated if classification of the points of the initial data (pi-pi2) is carried out in advance, by analogy with [12].

5. Discussion of the results: simulation of synthesis of the spatial curve image

Simulation was performed using Wolfram Mathematica mathematical software package. Fig. 2 shows the result obtained in simulation of the image synthesis by ray tracing of the spatial interpolating curve drawn through points pi-pi2 (Fig. 1) taking into account the order of their assignment and constructed in accordance with the method of spherical interpolation.

Fig. 2. Simulation results

The simulation task consisted of checking provisions stated in the theoretical part, namely:

- verification of correctness of work of the visualization algorithm based on the studied iterative process of calculating the point in the projection ray closest to a certain point in the mathematical spatial curve;

- verification of the algorithm for constructing points of a spatial curve with its step coinciding with the step of the iterative calculation process which makes it possible to perform the visualization algorithm and plot a curve point in a single pass of the IP.

The simulation results fully confirmed correctness of all theoretical positions set forth in the paper.

The obtained results differ from the known data in such aspects:

- application of the simplest quadric, sphere, for interpolation of spatial curves. The obtained curves satisfy the condition of connectedness of the curve, C0, and the condition of continuity of the first derivative, C1. When constructing a spatial curve passing through arbitrarily taken points, it is not necessary to use algebraic polynomials of the third and higher degree;

- the proposed iterative process for visualization has a potential of wide parallelling of computations. In the IP algorithm, it is possible to adjust the number of orders of the unknown number determined in a single step, which is limited just by hardware.

As a disadvantage, it should be noted that a rather high performance of computing facilities is necessary for realization of this method, especially when constructing surfaces. This method of synthesis of spatial curve images is the result of earlier studies. It is supposed that further research will be aimed at development of image synthesis by ray tracing of surfaces constructed by the method of spherical interpola-

tion as well as reduction of the counting time. The performed studies can be applied in various areas of computer graphics, e. g., in designing visualization systems (VS) for training simulators of vehicles for various purposes, such as aviation training simulators, etc., in making art films using computer graphics, etc.

6. Conclusions

1. To visualize the spatial curve, an iterative process (IP) was developed for calculating a point in the projection ray closest to some point in a mathematical spatial curve. To establish correspondence of a curve point to a pixel in a computer monitor screen, position of this point was evaluated relative to the region of space bounded by the pyramid of pixel visibility. The proposed IP has potentials for a wide parallelization of computations.

2. An algorithm for constructing points in a spatial curve was developed with its step coinciding with the step of the iterative calculation process which makes it possible to perform visualization algorithm and plot a curve point in one pass of the IP. To this end, the point in the PR and the direction vector of the curve at each step of iteration lie in the same plane perpendicular to the interpolated segment. This approach allows one to determine modulus of the directing vector for a subsequent stage of this iteration step. The proposed interpolation algorithm is based on the simplest algebraic surface, sphere, and does not use algebraic polynomials of the third and higher degrees.

Thus, feasibility of image synthesis by ray tracing of spatial curves constructed by the method of spherical interpolation has been demonstrated.

References

1. Hughes, F. J. Computer Graphics (principles and practice) [Text] / F. J. Hughes, A. van Dam, M. McGuire, D. F. Sklar, J. D. Foley, S. K. Feiner, K. Akeley. - Addison-Wesley Publishing Company, Inc., 2014. - 1209 p.

2. Hurley, J. Ray Tracing Goes Mainstream [Text] / J. Hurley // Understanding the Platform Requirements of Emerging Enterprise Solutions. - 2005. - Vol. 9, Issue 2. doi: 10.1535/itj.0902.01

3. Schmittler, J. Realtime ray tracing of dynamic scenes on an FPGA chip [Text] / J. Schmittler, S. Woop, D. Wagner, W. J. Paul, P. Slusallek // Proceedings of the ACM SIGGRAPH/EUROGRAPHICS conference on Graphics hardware - HWWS '04. doi: 10.1145/1058129.1058143

4. Efremov, A. Robust and numerically stable Bezier clipping method for ray tracing NURBS surfaces [Text] / A. Efre-mov, V. Havran, H.-P. Seidel // Proceedings of the 21st spring conference on Computer graphics - SCCG '05. - 2005. doi: 10.1145/1090122.1090144

5. Sisojevs, A. An Efficient Approach to Direct NURBS Surface Rendering for Ray Tracing [Text] / A. Sisojevs, A. Glazs // The 19th International Conference on Computer Graphics, Visualization and Computer Vision WSCG'2011 proceedings. - Plzen: University of West Bohemia, 2011. - P. 9-12.

6. Song, X. Circular spline fitting using an evolution process [Text] / X. Song, M. Aigner, F. Chen, B. Juttler // Journal of Computational and Applied Mathematics. - 2009. - Vol. 231, Issue 1. - P. 423-433. doi: 10.1016/j.cam.2009.03.002

7. Baramidze, V. Spherical Splines for Data Interpolation and Fitting [Text] / V. Baramidze, M. J. Lai, C. K. Shum // SIAM Journal on Scientific Computing. - 2006. - Vol. 28, Issue 1. - P. 241-259. doi: 10.1137/040620722

8. Pang, M. Smooth Approximation to Surface Meshes of Arbitrary Topology with Locally Blended Radial Basis Functions [Text] / M. Pang, W. Ma, Z. Pan, F. Zhang // Computer-Aided Design and Applications. - 2006. - Vol. 3, Issue 5. - P. 587-596. doi: 10.1080/16864360.2006.10738412

9. Shi, H. Blending of Triangular Algebraic Surfaces [Text] / H. Shi, Y. Sun // MM Research Preprints. - MMRC, AMSS, Academia, Sinica, Beijing, 2002. - Issue 21. - P. 200-206.

10. Vyatkin, S. I. Modeling of complex surfaces using perturbation functions [Text] / S. I. Vyatkin // Autometry. - 2007. - Vol. 43, Issue 3. - P. 40-47.

11. Gusiatin, V. M. Construction of a spatial curve by the method of spherical interpolation in problems of computer graphics [Text] / V. M. Gusiatin, M. V. Gusiatin // News of the Sumy State University. Series: Technical sciences. - 2013. - Issue 2. - P. 23-30.

i Надоели баннеры? Вы всегда можете отключить рекламу.