KR101767143B1 - Apparatus, method and computer program for vector drawing - Google Patents

Apparatus, method and computer program for vector drawing Download PDF

Info

Publication number
KR101767143B1
KR101767143B1 KR1020150104937A KR20150104937A KR101767143B1 KR 101767143 B1 KR101767143 B1 KR 101767143B1 KR 1020150104937 A KR1020150104937 A KR 1020150104937A KR 20150104937 A KR20150104937 A KR 20150104937A KR 101767143 B1 KR101767143 B1 KR 101767143B1
Authority
KR
South Korea
Prior art keywords
value
alpha
patch
seed
seed particles
Prior art date
Application number
KR1020150104937A
Other languages
Korean (ko)
Other versions
KR20170011751A (en
Inventor
이택희
Original Assignee
(주)에프엑스기어
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by (주)에프엑스기어 filed Critical (주)에프엑스기어
Priority to KR1020150104937A priority Critical patent/KR101767143B1/en
Publication of KR20170011751A publication Critical patent/KR20170011751A/en
Application granted granted Critical
Publication of KR101767143B1 publication Critical patent/KR101767143B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Image Generation (AREA)

Abstract

A vector drawing apparatus includes a seed generating module configured to generate at least one patch that is a unit drawing unit area corresponding to a user input and generate seed particles in each patch; A color and alpha determination module configured to determine one or more of a hue value or an alpha value of each seed particle using a random number; And a rendering module configured to render the seed particles contained in the one or more patches as an image by applying a determined color value and an alpha value. The vector drawing device can naturally implement a virtual paint tool such as an airbrush or a pencil through rendering based on the particle representation, and can be easily applied to GPU (Graphic Processing Unit) -based vector graphics Can be utilized.

Description

TECHNICAL FIELD [0001] The present invention relates to a vector drawing apparatus, a method and a computer program,

The present invention relates to a vector drawing apparatus and method and a computer program for the same, and more particularly to a vector drawing apparatus and a computer program therefor, and more particularly, to a paint tool such as an airbrush or a pencil through a particle- For example.

Vector graphics create digital images through points, straight lines, curves, polygons, and other objects based on a series of instructions or mathematical expressions to draw shapes placed in a given two- or three-dimensional space. In vector graphics, data about the shape to be rendered is created and stored in the form of a series of vector description statements. For example, vector graphics data includes locations of a series of points to be connected, instead of storing each bit for drawing a line, such as a conventional raster graphic, resulting in a smaller file size.

In order to implement a paint tool that fills the inside of an area such as an airbrush or a pencil using a vector graphic, a method of filling a unit drawing area with continuous pixels having a predetermined alpha value, A method of applying a texture to a region or a method of determining an alpha value of a pixel based on a distance from the center of the unit drawing region through a simple circle equation or the like has been used.

However, in the case of the above-described conventional art, there is a problem that a region where the unit drawing regions are overlapped is formed and a discontinuous region is generated. In order to solve the problem of the overlap area while using the vector graphics, a very large number of unit drawing areas must be overlapped, which increases the amount of calculation and deteriorates the performance.

Japanese Patent Application Laid-Open No. 10-2013-0106556

According to an aspect of the present invention, there is provided a computer program product capable of implementing a paint tool such as an airbrush or a pencil by a particle representation based on a programmable pipeline of a GPU (Graphic Processing Unit) A drawing apparatus and method, and a computer program therefor.

A vector drawing apparatus according to an exemplary embodiment includes a seed generation module configured to generate at least one patch that is a unit drawing unit area corresponding to a user input and generate seed particles in each patch; A color and alpha determination module configured to determine one or more of a hue value or an alpha value of each seed particle using a random number; And a rendering module configured to render the seed particles included in the one or more patches as an image by applying a determined color value and an alpha value.

In one embodiment, the user input is a sequential input with directionality, and the seed generation module is configured to generate a plurality of patches that are successively arranged along the direction of the user input. At this time, the plurality of patches may at least partially overlap with each other.

The vector drawing apparatus according to one embodiment further comprises a filter application module configured to apply a filter to each patch before modifying the seed particles to modify the alpha value of the seed particles in each patch. In this case, the user input may be a continuous input having directionality, and the filter application module may be configured to apply a filter having a directionality corresponding to the direction of the user input. In addition, the filter may be a circular or elliptical filter.

In one embodiment, the user input comprises a brush size value or a pressure value, and the seed generation module may be configured to determine the size of each patch based on the brush size value or the pressure value.

In one embodiment, the hue and alpha determination module includes a random number generator for generating a random number, and the random number may be used to determine one or more of the hue or alpha values of the seed particles.

In one embodiment, the user input comprises a concentration value or pressure value, and the color and alpha determination module is configured to determine a weight value for adjusting the alpha value based on the concentration value or the pressure value, Section.

In one embodiment, the hue and alpha determination module generates a normal vector corresponding to the seed particles, determines a reflection parameter corresponding to each of the seed particles using the normal vector and a predetermined illumination vector And a reflection application unit configured to adjust a color value of the seed particles using the reflection parameter.

The vector drawing method according to one embodiment can be performed using the vector drawing apparatus according to the embodiments.

The vector drawing method according to an exemplary embodiment includes generating at least one patch that is a unit drawing region corresponding to a user input; Generating seed particles in each patch; Determining at least one of a hue value or an alpha value of each seed particle by using a random number; And rendering the seed particles included in the one or more patches as an image by applying a determined color value and an alpha value.

In one embodiment, the user input is a sequential input with directionality, and wherein generating the seed particles comprises generating a plurality of patches that are successively arranged along the direction of the user input. At this time, the plurality of patches may at least partially overlap with each other.

The vector drawing method according to an embodiment further includes the step of applying a filter to each patch to modify the alpha value of the seed particles in each patch before rendering the seed particles to an image. In this case, the user input may be a continuous input having directionality, and the step of modifying the alpha value of the seed particles may include applying a filter having a directivity corresponding to the direction of the user input. In addition, the filter may be a circular or elliptical filter.

In one embodiment, the user input comprises a brush size value or pressure value, and wherein generating the seed particles comprises determining the size of each patch based on the brush size value or the pressure value do.

In one embodiment, the user input comprises a concentration value or a pressure value, and wherein determining at least one of a hue value or an alpha value of each seed particle comprises determining the alpha value And determining a weight for adjusting the weight.

In one embodiment, determining at least one of a hue value or an alpha value of each seed particle comprises: generating a normal vector corresponding to the seed particles; Determining a reflection parameter corresponding to each of the seed particles using the normal vector and a predetermined illumination vector; And adjusting the color value of the seed particles using the reflection parameter.

A computer program in accordance with one embodiment may be written to a medium to execute the vector image drawing method in combination with hardware.

A vector drawing apparatus, a method, and a computer program therefor according to an aspect of the present invention use a random number for particle representation, use a value inside a pipeline as a seed value, Use the color value as the particle's own color. Accordingly, the embodiments of the present invention can solve the problem that the image synthesis is well matched in dot units and the discontinuous areas are shaded as in the conventional art, and the airbrush or pencil , And can be easily utilized in GPU (Graphic Processing Unit) based vector graphics.

1 is a schematic block diagram of a vector drawing apparatus according to one embodiment.
2 is a conceptual diagram showing a patch which is a unit drawing region generated according to an embodiment.
Figure 3a is an image of a patch comprising particles with random alpha values.
3B is an image showing that a plurality of patches are superimposed on each other along a user input direction.
3C is an image showing the result of applying a filter to a patch.
FIG. 3D is an image showing that a plurality of patches to which a filter is applied are superimposed on each other along a user input direction.
4A is an image for explaining a specific form of a filter applied to a patch.
4B is an image for explaining a process of rendering a filter to which a patch is applied.
5A is a conceptual diagram of an airbrush to be implemented by a vector drawing apparatus according to an embodiment.
5B is a graph showing the relationship between the brush size of the user input and the nozzle angle of the airbrush.
5C is a graph showing the relationship between the pressure of the user input and the distance between the airbrush-canvas.
5D is a graph showing the relationship between the distance between the air brush-canvas and the size of the spray area.
5E is a graph showing the relationship between the particle density and the alpha value of the seed particle.
6A is a conceptual diagram of a pencil to be implemented by a vector drawing apparatus according to an embodiment.
6B is a graph showing the relationship between the brush size of the user input and the patch size.
6C is an image for explaining the process of adjusting the alpha value of particles in the patch according to user input.
6D is a graph showing the relationship between the pressure of the user input and the threshold value for adjusting the alpha value of the particles in the patch.
6E is an image for explaining a Blinn model for reflection.
6F is an image for explaining a process of applying reflection parameters to particles in a vector drawing apparatus according to an embodiment.

Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

1 is a schematic block diagram of a vector drawing apparatus according to one embodiment.

Referring to FIG. 1, a vector drawing apparatus 1 according to the present embodiment includes a seed generation module 10, a color and alpha determination module 20, and a rendering module 40. In one embodiment, the vector drawing device 1 further comprises a filter application module 30. In one embodiment, the color and alpha determination module 20 also includes a random number generator 21. In one embodiment, the hue and alpha determination module 20 may further include a weight determination section 22 and / or a reflection application section 23.

The vector drawing device 1 according to embodiments may be entirely hardware, or may have aspects that are partially hardware and partly software. The terms "unit," " module, "and" device "and the like are used herein to refer to a combination of hardware and software driven by that hardware. The hardware may be a data processing device including a GPU (Graphic Processing Unit) or another processor. Also, the software may refer to a running process, an object, an executable, a thread of execution, a program, and the like. That is, the vector drawing device 1 may be referred to as hardware that has data processing capability and software that can receive the user input and generate the corresponding vector graphic data. For example, the vector drawing device 1 may be a smartphone or tablet computer having a touchscreen and receiving user input and processing vector graphics, But is not limited thereto.

Each module 10, 20, 30, 40 constituting the vector drawing device 1 according to embodiments is not necessarily intended to refer to a separate component that is physically distinct. 1, the seed generation module 10, the color and alpha determination module 20, the filter application module 30, and the rendering module 40 are shown as separate blocks separated from each other, The color and alpha determination module 20, the filter application module 30, and the rendering module 40 may be integrated into one and the same device. Further, each of the modules 10, 20, 30, and 40 does not necessarily mean a separate device that is separate from each other, although it is a functionally distinguishing device according to the operation performed by the computing device in which they are implemented. However, in other embodiments, one or more of the seed generation module 10, the color and alpha determination module 20, the filter application module 30, and the rendering module 40 are physically separate from other modules . ≪ / RTI > For example, each module 10, 20, 30, 40 may be components communicatively coupled to one another in a distributed computing environment.

The seed generation module 10 generates one or more patches corresponding to the user input to the vector image drawing device 1 and generates seed particles in each patch. As used herein, the term "patch " means a unit drawing area of an image to be drawn corresponding to a user input on a work area that is a virtual canvas. For example, when a user draws a picture on a touch screen of a smartphone or a tablet computer using a hand or a touch pen, the user divides the trajectory of the picture drawn by the user into a plurality of patches having a unit size. The term "seed particle" in the present specification is intended to transform a corresponding trajectory into a vector image by being distributed along a trajectory drawn by the user and rendering the trajectory.

2 is a conceptual diagram showing a patch generated by a seed generation module of a vector image drawing apparatus according to one embodiment.

Referring to FIGS. 1 and 2, the seed generation module 10 generates a patch whose size is determined according to the brush size set by the user regardless of the resolution of the virtual canvas. Figure 2 shows an exemplary form of a patch in which the patches are created on the xy plane and the coordinates (x, y) of the four vertices 201-204 are (0.f, 1.f), (1.f , 1.f), (0.f, 0.f) and (1.f, 0.f). Where f is any value whose length on one side of the patch has a real value between 0 and 1. In one embodiment, the magnitude of the f value is set by user input. For example, the user may input a virtual brush size value to be used on the drawing software, and the seed generation module 10 may determine the magnitude of the f value, and thus the size of the patch, based on the brush size value of the user input.

The seed generation module 10 generates a plurality of seed particles 200 in a rectangular patch. The coordinates of the seed particles 200 can be obtained by bilinear interpolation of the coordinates of the four vertexes 201-204 described above with respect to the seed particles 200. [ The seed particle 200 thus generated is used as one of input values of a function for random number generation in the color and alpha determination module 20. [

The color and alpha determination module 20 randomly determines the hue and alpha values of the seed particles generated by the seed generation module 10 based on the random number. To this end, the color and alpha determination module 20 includes a random number generator 21 for generating random numbers. The random number generating unit 21 uses the coordinates of the seed particle as one of the input values for the random number generating function so that a different value is given to each seed particle. For example, the random number generation function can be constructed as shown in Equation (1) below.

[Equation 1]

Figure 112015072073357-pat00001

In Equation (1), RandValue is a random number between 0.0 and 1.0 as a generated random number, fract is a function that leaves only the decimal part excluding the integer part, and Seed2D represents the coordinates of the seed particle. vec2 is a function that creates a structure with two elements (x, y) used inside a shader, which is a function for determining the position and color of a pixel. The numbers 13.6797 and 83.917 input to the vec2 function in Equation (1) are exemplary numbers for generating a random number, and the values of the numbers may be different for each random number generation to randomize the result value RandValue. For example, 13,6797 and 83,917 can be multiplied by different values for each random number generation and used as input values of the vec2 function. However, the function for generating a random number may have any other form, and is not limited by Equation (1).

The color and alpha determination module 20 determines the color value and / or alpha value of each seed particle using the random number generated as described above. For example, the color and alpha determination module 20 can apply the result of random number generation as the alpha value of each seed particle. At this time, the color value of each seed particle can be designated in advance by user input. For example, if a user designates a color to be used in the drawing software tool, the color value of each seed particle can be designated with the corresponding color. In addition, the color and alpha determination module 20 may further adjust the alpha and / or color values of each seed particle by applying a predetermined weight or light reflection model according to user input characteristics.

In one embodiment, the user may determine a brush size value or concentration value (i.e., particle density) by a virtual tool that he or she wishes to use when drawing an image. The touch screen may also be configured to sense pressure by the user's hand or touch pen with respect to the touch screen. In this case, the seed generation module 10 may adjust the size of the patch by the brush size value and / or the pressure value. Further, the color and alpha determination module 20 may include a weight determination section 22 that determines a weight for adjusting the alpha value of each seed particle based on the concentration value and / or the pressure value. This will be described in detail later.

In one embodiment, the color values and / or alpha values of the seed particles may be adjusted so that the seed particles can be simulated as reflected by light on the result of the rendering. For this purpose, the color and alpha determination module 20 may include a reflection application portion 23. The reflection applying section 23 generates a normal vector corresponding to the seed particles, and determines a reflection parameter corresponding to each of the seed particles using a normal vector and a predetermined illumination vector. The reflection parameter is used to adjust the color value of the seed particles. The specific operation of the reflection applying section 23 will be described later in detail.

FIG. 3A is an image of a patch including particles having a random alpha value, and FIG. 3B is an image showing that a plurality of patches are superimposed on each other along a user input direction.

Referring to FIG. 3A, random alpha values are given to the seed particles in the patch 300, so that the effect that the patch 300 is irregularly existed can be obtained in the patch 300. By arranging the patches 300 continuously along the direction in which the user draws, as shown in FIG. 3B, a virtual airbrush can be realized in which the points are scattered along the user's input. In addition, since the graphite powder is separated from the pencil and scattered on the paper if the pencil is examined in detail, a virtual pencil can be realized by the above-described method.

3B, the alpha value of each patch 300 is not the same, and the patch 300 of a specific region has a high alpha value, and the patch 300 of another specific region has alpha The value can be lowered. This will be described in detail later.

The patch generated by the above-described process has a rectangular shape centering on a point where the user touches the touch screen by the hand or the touch pen. However, the touch input is not applied to the rectangular area at the same time but is applied to one point, and when the rectangular patch is connected, a discontinuous area is generated.

In order to solve the above problem, in one embodiment, the vector image drawing device 1 includes a filter application module 30. The filter application module 30 applies a filter to each patch to adjust the alpha value of the seed particles around the touch input point so that the density of the particles around the touch input point forms a natural distribution, .

FIG. 3C is an image showing a result of applying a filter to a patch, and FIG. 3F is an image showing that a plurality of patches to which a filter is applied are superimposed on each other along a user input direction.

3C and 3D, it is possible to obtain a patch 300 'to which a filter is applied by applying a circular filter around the center of a quadrangle (i.e., a touch input position) in a rectangular patch. The seed particles adjacent to the touch input position in the patch 300 'to which the filter is applied have a relatively high alpha value, and the alpha value of the seed particles may gradually decrease as the distance from the touch input position increases. As a result, the particles are scattered intensively at the touch input position, which enables natural expression and eliminates discontinuous regions between the patches.

4A is an image for explaining a specific form of a filter applied to a patch.

Referring to FIG. 4A, the position of the seed particle is (X, Y) in a rectangular patch having vertices of (0, 0), (1, 0), (0, 1) (CostX, costY) is applied to the alpha value to adjust the alpha value of the seed particle. The cosine function is used to add weight to the horizontal axis. By adjusting the value of t, the patch can be displayed as a horizontally elongated whole.

Referring again to FIG. 1, the rendering module 50 renders the seed particles to which the color value and the alpha value are applied, as an image, according to the above-described process. At this time, as shown in FIG. 4B, the rendering module 50 can adjust the x-axis direction of the patch to coincide with the x-axis direction of the stroke. Here, the stroke means that the user input is a sequential input with directionality. The patch generated by the seed generation module 10 is generated on the basis of the fixed x and y axes fixed on the virtual canvas. When rendering by the rendering module 50, each patch And performs rendering on the seed particles in the rotated patch. The detailed rendering process for the vector graphic is well known in the technical field of the present invention, so a detailed description will be omitted for clarifying the gist of the invention.

In the vector graphics, the operation by the vector image drawing apparatus according to the present embodiment is performed again every time the scale of the image is changed. The seed generation module 10 generates a patch depending on the brush size regardless of the current resolution, and when the scale of the image to be viewed by the user changes, the patch and particles are regenerated and rendered. Therefore, as the conventional raster graphics are enlarged or reduced, there is no problem that the pixel boundaries are seen as distorted or the quality of the original image is degraded. In addition, since the vector image drawing apparatus according to the present embodiment determines the color value and / or the alpha value of the seed particles by generating a random number again when the scale of the image is changed, the particles are uniformly arranged No visible phenomenon occurs, and a drawing pattern in which particles are scattered naturally regardless of resolution can be obtained.

The vector drawing apparatus according to the embodiments described above can naturally implement a virtual paint tool such as an airbrush or a pencil through rendering based on the particle representation.

5A to 5E are conceptual diagrams illustrating characteristics of an airbrush to be implemented by the vector drawing apparatus according to an embodiment.

Referring to FIG. 5A, the airbrush may be modeled such that ink and air are injected into the airbrush and injected into the virtual canvas 500 through the nozzles. At this time, the ejection area and the density of the ink particles may vary depending on the distance between the nozzle and the virtual canvas 500.

Referring to FIG. 5B, the user can determine the brush size he or she wants to use on the drawing software. In proportion to the brush size determined by the user, the nozzle angle of the virtual airbrush implemented by the vector drawing apparatus according to the embodiments is determined. The larger the nozzle angle, the wider the area in which the ink particles are ejected by the airbrush, which is reflected in an increase in the size of the patch in the vector drawing apparatus. As a result, as the size of the brush designated by the user becomes larger, the area where the particles are drawn on the drawing software becomes wider. Specifically, the input for determining the nozzle angle may be a real value between 0.f and 1.f, and this input follows an input value of a predetermined user interface. The nozzle angle for determining the size of the patch to grind the current particle can be calculated by multiplying the input value by a preset maximum nozzle angle.

Referring to FIG. 5C, the user input by the hand or the touch pen on the touch screen may have a predetermined pressure value. In the vector drawing apparatus according to the embodiments, the distance between the virtual air brush and the canvas can be determined in inverse proportion to the pressure value. A reduction in the distance between the virtual airbrush and the canvas is reflected in increasing the alpha value of the seed particles, and consequently, as the user applies greater pressure, the result is a more intense particle drawn in the drawing software. The adjustment of the alpha value by the pressure value is performed by determining the weight according to the pressure value in the weight determination section 22 of the color and alpha determination module 20, multiplying the alpha value of each seed particle determined by the random number by a weight, And the alpha value of each seed particle is reflected through the process of calculating the alpha value.

5D, the size of the region where the ink particles are sprayed by the virtual air brush is determined in proportion to the square of the distance between the virtual air brush and the canvas. The increase in the size of the area in which the ink particles are sprayed is reflected as an increase in the size of the patch in the vector drawing apparatus. 5C and 5D, as the user applies a lower pressure, particles are drawn in a wider area with a lighter color, and as the user applies higher pressure, a particle is drawn in a narrower area with a darker color . Specifically, the area size change with pressure can be determined by the aforementioned nozzle angle and the pressure of the current user input (e.g., the pen pressure). The pen pressure may be a real value between 0.f and 1.f as an output value of the stylus mounted on the user equipment. The distance between the imaginary nozzle and the canvas can be calculated by multiplying the output value by a preset maximum distance. That is, as the output value approaches 1.f, the distance between the virtual nozzle and the canvas approaches the minimum distance, and as the output value approaches 0.f, the distance between the virtual nozzle and the canvas approaches the maximum distance.

Referring to FIG. 5E, the user can determine the concentration of the airbrush he or she intends to use on the drawing software. The concentration determined by the user can be reflected to the vector drawing device in the form of the density of the ink particles 501 sprayed through the virtual air brush. As shown, as the density of the particles increases, the alpha value of the seed particles increases, so that when the user designates a higher concentration, the darker particles are drawn. 5C, the density of the ink particles 501 can be reflected in the alpha value of the seed particle through the weight determined by the weight determination section 22 of the color and alpha determination module 20 .

In one embodiment, the alpha value of the particles in the patch is also affected by the density of the particles being drawn in the patch, and the density of the patches is affected by the speed at which the user input is moving. Specifically, the basic number of particles to be sprayed per unit time can be set in advance by a virtual air brush, and the density can be calculated by dividing the value obtained by multiplying the number of spray particles by the time the user input is in the spray area, have. The density may be converted to an alpha value through a ratio relative to a preset reference alpha value. For example, the reference alpha value when 50000 particles are sprayed by a virtual air brush in a patch having a length of 1 cm in each of the length and width can be set to 1.0. If more than 50000 particles are sprayed with a long hand or touch pen in the patch, the final alpha value increases by more than 1.0, and conversely, the user places the hand or touch pen in the patch for only a short time, If less particles are sprayed, the final alpha value is less than 1.0. By multiplying the final alpha value determined by the density by the random number corresponding to each seed particle, the alpha value of each seed particle is finally determined.

6A to 6D are conceptual diagrams illustrating the characteristics of a pencil to be implemented by the vector drawing apparatus according to an embodiment.

Referring to FIG. 6A, a pencil may be modeled such that graphite corresponding to a pencil lead is buried in the form of particles 601 on a virtual canvas 600.

Referring to FIG. 6B, the user can determine the brush size he or she intends to use on the drawing software. In proportion to the brush size determined by the user, the size of the patch in the vector drawing apparatus according to the embodiments is increased. As a result, as the size of the brush designated by the user becomes larger, the area where the particles are drawn on the drawing software becomes wider. Unlike an airbrush, the size of the patch is unaffected by the pressure value and continues to be drawn with the determined brush size.

Referring to FIG. 6C, the user can determine the concentration (i.e., increase) of the pencil he or she intends to use on the drawing software. The concentration determined by the user may be reflected through the number of seed particles generated by the vector drawing device. Specifically, the seed particles in the patch have randomly determined alpha values, wherein seed particles having an alpha value below a predetermined threshold value can be made invisible by adjusting the alpha value of the seed particles to zero. Thus, by increasing or decreasing the threshold, the number of seed particles seen in the patch can be adjusted. For example, as the threshold value is higher, a smaller number of seed particles are drawn. 5C and 5E, the number of seed particles can be reflected in the alpha value of the seed particle through the weight determined by the weight determining section 22 of the hue and alpha determining module 20. [ Also, in one embodiment, seed particles having an alpha value higher than a threshold value may be scaled to an alpha value of the particles, but the present invention is not limited thereto.

Referring to FIG. 6D, not only when the user selects to zoom in the pencil, but also according to the pressure applied by the user, the above-described threshold value can be changed. The stronger the pressure is applied by the user, the lower the threshold value, resulting in a larger number of particles being drawn. Therefore, even when using the same gentle pencil, the stronger the pressure, the darker the effect can be obtained.

On the other hand, in the case of pencil, graphite is used by the principle that it is drawn by crushing on paper. In case of graphite, it reflects light and has a characteristic of glittering. In order to reflect these characteristics in the vector graphics, the vector drawing apparatus according to an embodiment can modify the color values of the seed particles to apply reflection parameters to the seed particles generated by the vector drawing apparatus. The above operation can be performed by the reflection application portion 23 of the color and alpha determination module 20 described above with reference to FIG.

6E is an image for explaining a Blinn model for reflection.

Referring to FIG. 6E, the reflection parameters at any one point on the object surface in the blind model include the normal vector N of the point, the vector V from the point to the observer, the vector L from the point to the illumination, the half- angle) vector H. The half-angle vector H is a vector having a direction bisecting the angle between the vector V from the point to the observer and the vector L from the point to the illumination, that is, H = (L + V) / 2.

6F is an image for explaining a process of applying reflection parameters to particles in a vector drawing apparatus according to an embodiment.

Referring to FIG. 6F, the particles 601 generated by the vector drawing apparatus have a position vector P. At this time, the vector drawing device gives an arbitrary normal vector N to each particle 601. When the position vector of the observer is denoted by E and the position vector of illumination is denoted by L, the vector V = E - P from each seed particle 601 to the observer is obtained. In addition, the reflection parameter includes the coloring vector A and the scattering color vector D of each seed particle. The peri color vector A is predetermined. Further, the scattering color vector is different for each seed particle, and is determined by using the predetermined basic scattering color vector Dm of the particle material, the illumination vector L, and the normal vector N of each seed particle as follows.

&Quot; (2) "

Figure 112015072073357-pat00002

The max function in Equation (2) serves to output the larger one of L * N and 0.

At this time, the hue value I of each seed particle 601 reflecting the reflection parameter is expressed by the following equation (3) as a vector sum of the perineal color vector A, the scattered color vector D, and the half-angle vector H.

&Quot; (3) "

Figure 112015072073357-pat00003

The vector S in the above equation (3) is defined as the following formula (4) using the predetermined basic reflection color vector Sm of the particle material, the vector V from each seed particle 601 to the observer and the half-angle vector H. do.

&Quot; (4) "

Figure 112015072073357-pat00004

Figures 6e and 6f illustrate the process of applying reflection parameters to seed particles with reference to the case of a pencil. However, this is exemplary and in other embodiments airbrushes or other different types of tools may be modeled to apply the reflection parameters, which is within the scope of the present invention.

The vector drawing method according to the embodiments may be performed using the vector drawing apparatus according to the above-described embodiments, and the configuration of the vector drawing apparatus according to the embodiments may be applied to the vector drawing method in a time-series manner.

The vector drawing method according to an exemplary embodiment includes generating at least one patch that is a unit drawing region corresponding to a user input; The vector drawing apparatus comprising: generating seed particles in each patch; The vector drawing apparatus comprising: determining at least one of a hue value or an alpha value of each seed particle by using a random number; And the vector drawing device applying the determined color value and alpha value to render the seed particles contained in the at least one patch as an image.

The operations according to the vector drawing apparatus and method according to the embodiments described above can be at least partially implemented in a computer program and recorded in a computer-readable recording medium. The computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer is stored. Examples of the computer-readable recording medium include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. The computer readable recording medium may also be distributed over a networked computer system so that computer readable code is stored and executed in a distributed manner. In addition, functional programs, codes, and code segments for implementing the present embodiment may be easily understood by those skilled in the art to which this embodiment belongs.

While the invention has been shown and described with reference to certain embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. However, it should be understood that such modifications are within the technical scope of the present invention. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.

Claims (20)

A seed generation module configured to generate at least one patch that is a unit drawing region along the trajectory in response to a user input defining a continuous trajectory and generate seed particles arranged in each patch with coordinates respectively;
A color and alpha determination module configured to determine one or more of a hue value or an alpha value of each seed particle using a random number; And
And a rendering module configured to apply the at least one of the determined color values or alpha values to render the seed particles contained in the at least one patch as an image,
Wherein the color and alpha determination module comprises:
A random number generator for generating a random number and is configured to determine at least one of a color value or an alpha value of the seed particles by using a random number generated by using coordinates of the seed particle as an input value to the random number generator,
And a weight determining unit configured to determine a weight for adjusting the alpha value based on a pressure value or a velocity value corresponding to the user input.
delete The method according to claim 1,
Wherein the plurality of patches are at least partially overlapping each other.
The method according to claim 1,
Further comprising a filter application module configured to apply a filter to each patch to modify the alpha value of the seed particles in each patch before rendering the seed particles.
5. The method of claim 4,
Wherein the user input is a sequential input having directionality,
Wherein the filter application module is configured to apply a filter having a directionality corresponding to a direction of the user input.
5. The method of claim 4,
Wherein the filter is a circular or elliptical filter.
The method according to claim 1,
Wherein the user input comprises a brush size value or a pressure value,
Wherein the seed generation module is configured to determine a size of each patch based on the brush size value or the pressure value.
delete The method according to claim 1,
Wherein the user input comprises a concentration value,
Wherein the weight determining unit is further configured to determine a weight for adjusting the alpha value based on the density value.
The method according to claim 1,
Wherein the color and alpha determination module generates a normal vector corresponding to the seed particles and determines a reflection parameter corresponding to each of the seed particles using the normal vector and a predetermined illumination vector, Further comprising a reflection applying unit configured to adjust a color value of the seed particles using the seed particles.
Generating at least one patch that is a unit drawing region along the trajectory corresponding to a user input defining a continuous trajectory;
The vector drawing apparatus comprising the steps of: generating seed particles having coordinates respectively and arranged in each of the patches;
The vector drawing apparatus comprising: determining at least one of a hue value or an alpha value of each seed particle by using a random number; And
Wherein the vector drawing device applies one or more of the determined color values or alpha values to render the seed particles contained in the one or more patches as an image,
Wherein determining at least one of a hue value or an alpha value of each seed particle comprises:
Determining at least one of a hue value or an alpha value of the seed particles by using a random number generated by using coordinates of the seed particle as an input value to a random number generator; And
And adjusting the alpha value using a weight determined based on a pressure value or a velocity value corresponding to the user input.
delete 12. The method of claim 11,
Wherein the plurality of patches are at least partially overlapped with each other.
12. The method of claim 11,
Wherein the vector drawing apparatus further comprises the step of applying a filter to each patch to modify the alpha value of the seed particles in each patch before rendering the seed particles to an image.
15. The method of claim 14,
Wherein the user input is a sequential input having directionality,
Wherein modifying the alpha value of the seed particles comprises applying a filter having a directionality corresponding to a direction of the user input.
15. The method of claim 14,
Wherein the filter is a circular or elliptical filter.
12. The method of claim 11,
Wherein the user input comprises a brush size value or a pressure value,
Wherein generating the seed particles comprises determining the size of each patch based on the brush size value or the pressure value.
12. The method of claim 11,
Wherein the user input comprises a concentration value,
Wherein determining at least one of a hue value or an alpha value of each seed particle further comprises determining a weight for adjusting the alpha value based on the density value.
12. The method of claim 11,
Wherein determining at least one of a hue value or an alpha value of each seed particle comprises:
Generating a normal vector corresponding to the seed particles;
Determining a reflection parameter corresponding to each of the seed particles using the normal vector and a predetermined illumination vector; And
And adjusting the color value of the seed particles using the reflection parameter.
A computer program stored on a recording medium for executing a vector drawing method in combination with hardware,
In the vector drawing method,
Generating at least one patch corresponding to a user input defining a continuous trajectory, the patch being a unit drawing region along the trajectory;
Generating seed particles disposed in each patch with respective coordinates;
Determining at least one of a hue value or an alpha value of each seed particle by using a random number; And
Applying the at least one of the determined color values or alpha values to render the seed particles contained in the at least one patch as an image,
Wherein determining at least one of a hue value or an alpha value of each seed particle comprises:
Determining at least one of a hue value or an alpha value of the seed particles by using a random number generated by using coordinates of the seed particle as an input value to a random number generator; And
And adjusting the alpha value using a weight determined based on a pressure value or a velocity value corresponding to the user input.
Computer program.
KR1020150104937A 2015-07-24 2015-07-24 Apparatus, method and computer program for vector drawing KR101767143B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020150104937A KR101767143B1 (en) 2015-07-24 2015-07-24 Apparatus, method and computer program for vector drawing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020150104937A KR101767143B1 (en) 2015-07-24 2015-07-24 Apparatus, method and computer program for vector drawing

Publications (2)

Publication Number Publication Date
KR20170011751A KR20170011751A (en) 2017-02-02
KR101767143B1 true KR101767143B1 (en) 2017-08-11

Family

ID=58151820

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020150104937A KR101767143B1 (en) 2015-07-24 2015-07-24 Apparatus, method and computer program for vector drawing

Country Status (1)

Country Link
KR (1) KR101767143B1 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101347178B1 (en) 2012-03-20 2014-01-07 인크로스 주식회사 Apparatus and method for drawing vector image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Particle Systems A Technique for Modeling a Class of Fuzzy Objects, ACM Transactions on Graphics 2.2(1983)*

Also Published As

Publication number Publication date
KR20170011751A (en) 2017-02-02

Similar Documents

Publication Publication Date Title
JP6903183B2 (en) Changes in effective resolution based on screen position in graphics processing by approximating the projection of vertices on a curved viewport
CN108351864B (en) Concave geometric dense paving
US7446778B2 (en) Dynamically adjusted brush for direct paint systems on parameterized multi-dimensional surfaces
KR102101626B1 (en) Gradient adjustment for texture mapping for multiple render targets with resolution that varies by screen location
US8854342B2 (en) Systems and methods for particle-based digital airbrushing
US7289119B2 (en) Statistical rendering acceleration
US6226000B1 (en) Interactive image editing
US8760438B2 (en) System and method for simulating stiff bristle brushes using stiffness-height parameterization
US8111264B2 (en) Method of and system for non-uniform image enhancement
US8605095B2 (en) Generating vector output from a physical simulation of a bristle brush
US7714866B2 (en) Rendering a simulated vector marker stroke
US8379047B1 (en) System and method for creating stroke-level effects in bristle brush simulations using per-bristle opacity
US20080246760A1 (en) Method and apparatus for mapping texture onto 3-dimensional object model
US7777745B2 (en) Edge effect
US11164343B1 (en) Synthesizing brush strokes based on user-defined strokes
Pastor et al. Real-time animated stippling
JP2003256865A (en) Method and program for generating two-dimensional image with cartoon-like expression from stereoscopic object data
DiVerdi et al. A lightweight, procedural, vector watercolor painting engine
KR101767143B1 (en) Apparatus, method and computer program for vector drawing
CN115803782A (en) Augmented reality effect of perception geometry with real-time depth map
Murakami et al. Multiple illuminated paper textures for drawing strokes
JPH06236440A (en) Image processing method
Benjamin et al. Painting with triangles
JP7429496B2 (en) Image processing device and image processing method
Lee et al. Real-time 3D artistic rendering system

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant