Drawing program, drawing device, control method, and recording medium

JPWO2024150415A5Active Publication Date: 2025-09-11LIVE2D
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2024569983
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-01-13
Filing Date
2023-01-13
Publication Date
2025-09-11
Estimated Expiration
2043-01-13

AI Technical Summary

Technical Problem

Existing digital illustration methods struggle to maintain homogeneous texture expression when line segments are deformed, leading to calculation inefficiencies and visual instability in animations, particularly due to changes in arrangement density and flickering effects.

Method used

A drawing program that generates and arranges textures for line segments based on predefined length patterns, ensuring consistent particle distribution and frequency, allowing for seamless transitions and reduced computational load by selecting appropriate textures according to the line segment's length, and combining textures for longer lengths.

Benefits of technology

Enables the creation of line segments with desired texture expressions while minimizing computational overhead, ensuring stable and uniform texture representation across deformations and animations.

✦ Generated by Eureka AI based on patent content.
Patent Text Reader

Abstract

This drawing program causes a computer that draws line segments accompanied by textural expression to execute: an acquisition process for acquiring a plurality of textures that include a reference texture having a reference length, and that have mutually different lengths and exhibit a common textural expression; a selection process for selecting at least one of the plurality of textures acquired by the acquisition process, in accordance with the length of a line segment to be drawn; a drawing process for positioning the texture selected through the selection process and drawing the line segment; and a process for accepting a change in the length of the line segment, wherein the drawing program is characterized in that, when a change in the length of the line segment is accepted, a second texture corresponding to the length of the line segment after the change is selected, in lieu of a first texture that was selected in the selection process before the change, and when the length of the second texture is a prescribed integral multiple of the reference length, a prescribed integral number of pieces of the reference texture are selected in lieu of the second texture.
Need to check novelty before this filing date? Find Prior Art

Description

Drawing program, drawing device, control method, and recording medium

[0001] The present invention relates to a drawing program, a drawing device, a drawing method, and a recording medium, and more particularly to a technique for drawing lines that involve texture expression.

[0002] Digital illustration, also known as computer illustration, is a technique for creating electronic illustrations using an information processing device such as a tablet. Digital illustration applications are configured to add various texture effects to line segments (base lines or outlines) input using a pointing device such as a stylus or mouse, in order to achieve drawing expressions similar to those achieved by hand-drawn illustrations. These texture effects include, for example, expressions that mimic so-called brush strokes, such as those created using a writing implement such as a pencil or paintbrush.

[0003] In vector-based digital illustrations, the texture of a line segment representing a brush stroke is expressed by arranging a number of texture-forming elements (unit elements for forming texture, elements with a unique image pattern that matches the texture to be expressed; so-called sprites) according to the length of the base line. In other words, a line segment representing a brush stroke is expressed by arranging multiple texture-forming elements of an image pattern defined for the brush in accordance with the shape and length of the line segment.

[0004] However, texture representation using such a method may not be suitable for applications in which animation is generated by transforming a two-dimensional image of a created illustration. More specifically, a method of arranging texture-forming elements according to the shape and length of a line segment after transformation may not ensure continuity of the arrangement between the texture-forming elements arranged on the line segment before transformation, and may result in a lack of uniformity. For example, when a reference line changes (extends) as shown in Figures 14A to 14D, arranging texture-forming elements according to the length may result in changes in the arrangement density and flickering during the transition, as shown in Figures 15A to 15D. As a result, animations that connect two-dimensional images before and after transformation may result in an appearance that hinders stable viewing.

[0005] Patent Document 1 discloses a line segment drawing method that ensures uniform texture expression even when a reference line is deformed.

[0006] Patent No. 6663066

[0007] However, in the drawing method described in Patent Document 1, the placement position of the texture-forming element is determined according to the length of the reference line, the size and transparency of the texture-forming element are set, and the texture-forming element is placed on the reference line and drawn, so the amount of calculation increases as the reference line becomes longer.In other words, when generating animation by transforming a two-dimensional image in real time, the amount of calculation becomes excessive, which can cause delays in processing and hinder optimal viewing.

[0008] The present invention has been made in consideration of the above-mentioned problems, and aims to provide a drawing program, drawing device, drawing method, and recording medium that draw line segments with desired texture expression while avoiding an increase in the amount of calculation.

[0009] In order to achieve the above-mentioned object, the drawing program of the present invention causes a computer that draws a line segment with texture expression to execute the following steps: an acquisition process to acquire multiple textures that each have different lengths and exhibit a common texture expression, including a reference texture having a reference length; a selection process to select at least one of the multiple textures acquired by the acquisition process depending on the length of the line segment to be drawn; a drawing process to arrange the texture selected by the selection process and draw the line segment; and a process to accept a change in the length of the line segment; wherein, when a change in the length of the line segment is accepted, in the selection process, a second texture that corresponds to the changed length of the line segment is selected in place of a first texture that was selected before the change, and if the second texture is a texture whose length is a predetermined integer multiple of the reference length, the predetermined integer number of the reference textures are selected in place of the second texture.

[0010] With this configuration, the present invention makes it possible to draw line segments with a desired texture representation while avoiding an increase in the amount of calculation.

[0011] Other features and advantages of the present invention will become apparent from the following description taken in conjunction with the accompanying drawings, in which the same or similar elements are designated by the same reference numerals.

[0012] The accompanying drawings are incorporated into and constitute a part of the specification, illustrate embodiments of the present invention, and together with the description, are used to explain the principles of the present invention.Block diagram illustrating the hardware configuration of a PC 100 according to an embodiment and a modification of the present invention.A diagram for explaining the drawing of a line segment with texture expression using a texture.A diagram for explaining the drawing of a line segment with texture expression using a texture.A diagram illustrating texture forming elements (particles).A diagram for explaining the distribution of particles of a reference texture according to an embodiment and a modification of the present invention.A diagram for explaining a reference texture according to an embodiment and a modification of the present invention.A diagram for explaining a coupled texture according to an embodiment and a modification of the present invention.A diagram for explaining particle correspondence according to an embodiment and a modification of the present invention.Another diagram for explaining particle correspondence according to an embodiment and a modification of the present invention.Further another diagram for explaining particle correspondence according to an embodiment and a modification of the present invention.A first classification according to an embodiment and a modification of the present invention. FIG. 1 is a diagram illustrating particles. FIG. 2 is a diagram illustrating a first particle of the second category according to an embodiment and a modification of the present invention. FIG. 3 is a diagram illustrating a second particle of the second category according to an embodiment and a modification of the present invention. FIG. 4 is a diagram for explaining the placement frequency of particles in an extended intermediate texture according to an embodiment and a modification of the present invention. FIG. 5 is a diagram for explaining a shortened intermediate texture according to an embodiment and a modification of the present invention. FIG. 6 is a diagram for explaining a shortened intermediate texture according to an embodiment and a modification of the present invention. FIG. 7 is a diagram for explaining the placement frequency of particles in a shortened intermediate texture according to an embodiment and a modification of the present invention.Flowchart illustrating a drawing process for drawing a line segment using a line segment drawing texture. Diagram for explaining drawing of a line segment with texture representation in the prior art. Diagram for explaining drawing of a line segment with texture representation in the prior art. Diagram for explaining drawing of a line segment with texture representation in the prior art. Diagram for explaining drawing of a line segment with texture representation in the prior art. Diagram for explaining change in appearance in drawing of a line segment with texture representation in the prior art. Diagram for explaining change in appearance in drawing of a line segment with texture representation in the prior art. Diagram for explaining change in appearance in drawing of a line segment with texture representation in the prior art.

[0013] [Embodiments] Hereinafter, embodiments will be described in detail with reference to the accompanying drawings. Note that the following embodiments do not limit the scope of the invention as claimed, and not all combinations of features described in the embodiments are necessarily essential to the invention. Two or more of the features described in the embodiments may be combined in any desired manner. Furthermore, identical or similar configurations will be assigned the same reference numerals, and redundant descriptions will be omitted.

[0014] In the embodiment described below, an example of the present invention is applied to a PC, as an example of a rendering device, capable of generating textures that represent textures and drawing lines that represent textures using the textures. However, the present invention can be applied to any device that can generate textures that represent textures or draw lines that represent textures using the textures.

[0015] <Configuration of PC 100> FIG. 1 is a block diagram showing the hardware configuration of a PC 100 according to an embodiment of the present invention.

[0016] The control unit 101 is a control device such as a CPU, and controls the operation of each block of the PC 100. Specifically, the control unit 101 reads out programs stored in the storage device 102, such as a program related to an operating system and a program related to an illustration editing application that includes drawing lines with texture representation, and loads them into the memory 103 and executes them, thereby controlling the operation of each block.

[0017] The storage device 102 is, for example, a nonvolatile memory such as a rewritable ROM, or an information storage device such as a HDD detachably connected to the PC 100. The storage device 102 may also include a recording medium such as a disk on which a program having functions provided by an illustration editing application is recorded, which can be accessed via a predetermined read / write interface such as an optical drive. The storage device 102 stores not only the above-mentioned programs, but also information such as parameters required for the operation of each block, various data used to present drawing objects, and the like.

[0018] The memory 103 is a volatile memory such as a RAM. The memory 103 is used not only as a development area for developing programs read from the storage device 102, but also as a storage area for storing intermediate data output during the operation of each block. Alternatively, the memory 103 is used as an area for storing intermediate calculation results and calculation results during the execution of any processing.

[0019] The drawing unit 104 is a drawing device such as a GPU. The drawing unit 104 generates a screen (image) to be displayed in the display area of ​​the display unit 110. In this embodiment, the drawing unit 104 generates the screen to be displayed on the display unit 110 by drawing objects that are expanded on a two-dimensional plane and include line segments (straight lines and curved lines) with variable lengths and texture representation. The screen generated by the drawing unit 104 in connection with the illustration editing application is controlled (display updated) by the display control unit 105 to be displayed on the display unit 110.

[0020] The display unit 110 may be a display device such as an LCD. In this embodiment, the display unit 110 is described as a component included in the PC 100, but the implementation of the present invention is not limited to this. The display unit 110 does not need to have the same housing as the PC 100, and may be an external display device that is detachably connected to the PC 100.

[0021] The operation input unit 106 is a user interface included in the PC 100, such as a mouse, keyboard, pen tablet, or game controller. When the operation input unit 106 detects an operation input made to any of the interfaces, it outputs a control signal corresponding to the operation input to the control unit 101. Alternatively, the operation input unit 106 notifies the control unit 101 of the occurrence of an event corresponding to the operation input.

[0022] <<Drawing Line Segments with Texture Expression>> A method for drawing line segments with texture expression such as brush strokes in the illustration editing application of this embodiment will be described below.

[0023] As described above, in conventional illustration editing applications, texture representations are created by arranging multiple texture-forming elements along a reference line that defines the shape of a line segment. For example, the texture representation of a brush is created by arranging texture-forming elements associated with the brush in a two-dimensional area defined by the brush's line width and reference line, in accordance with the placement frequency of the texture-forming elements per unit length determined according to the thickness of the brush's paint. That is, the longer the reference line, the larger the size of the two-dimensional area becomes, and the more texture-forming elements are placed in the area. Furthermore, in an approach such as that described in Patent Document 1, in which the placement position, size, and transparency of each texture-forming element are sequentially determined to avoid flickering appearance due to deformation of the reference line, the amount of calculation required to draw the line segment increases as the reference line becomes longer.

[0024] The PC 100 of this embodiment employs a method in which textures (raster images) in which texture-forming elements are arranged in advance for a predetermined texture expression are generated for a plurality of length patterns, and line segments are drawn by arranging textures of lengths corresponding to the deformation state of the reference line (particularly the length in the longitudinal direction) on the reference line. In other words, because the texture-forming elements are already arranged on the texture, there is no need to determine the arrangement position, size, and transparency of each texture-forming element depending on the state of the reference line when drawing the line segments, and this makes it possible to reduce the amount of calculation required for the line drawing process compared to the method described in Patent Document 1.

[0025] <Texture Generation> First, we will explain how to generate textures with multiple length patterns that represent a common texture expression and are used to draw line segments. In this embodiment, the texture generation is provided as one of the functions of an illustration editing application.

[0026] As described above, in the aspect of drawing a line segment by applying a texture corresponding to the length of a reference line from among textures generated for a plurality of length patterns, it is necessary to generate textures of various length patterns for one texture expression. In other words, since it is expected that the length of the reference line will vary in various ways, in order to appropriately show the texture expression using texture, it is necessary to generate textures of various patterns with a certain degree of length resolution.

[0027] If a texture with the same length as the reference line has been generated, applying that texture to the reference line as is makes it possible to draw a line segment with the texture representation indicated by that texture. On the other hand, if a texture with the same length as the reference line has not been generated, the line segment is drawn by, for example, stretching / shortening the texture with the closest length and applying it to the reference line. In this case, the stretch / shortening ratio of the texture is determined according to the difference between the length of the texture and the length of the reference line, but if this ratio deviates significantly from 1, the texture representation of the texture will not be guaranteed in the drawn line segment.

[0028] For example, consider a case where a reference line of length L0 has a length L1, from among the length patterns for which textures have been generated, and the texture having that length is selected and extended to L0 and applied to the reference line. As shown in Figure 2A, if the closest length is length L1, which is slightly shorter than L0, and texture 201 having length L1 is extended and applied to the reference line, a line segment is drawn that retains the texture representation of texture 201 to some extent. On the other hand, as shown in Figure 2B, if the closest length is length L2, which is extremely shorter than L0 (approximately half the length in the figure), and texture 202 having length L2 is extended to L1 and applied to the reference line, a line segment is drawn that does not retain the texture representation of texture 202.

[0029] In this way, in order to draw a line segment whose length may change by adding a specific texture expression to it, it is necessary, as a prerequisite, to generate textures with multiple types of length patterns with a length resolution that is sufficient to ensure the texture expression even when the line segment is stretched or contracted.

[0030] However, in illustration editing applications, the length of a line segment is set arbitrarily depending on the purpose of the illustration, so it is not realistic to prepare textures for infinite lengths. Furthermore, given the premise that textures must be generated with a length resolution that ensures texture expression even when stretched, the number of length patterns for generating textures becomes enormous.

[0031] In particular, in cases where the length of a line segment changes continuously, such as in animation, it is necessary to select an appropriate texture according to the length and apply it to the line segment for drawing. That is, in such cases, it is necessary to load the texture of each length pattern into memory in advance, but if the number of length patterns is enormous, the memory usage will be constrained by the loaded textures, which may be a factor in reducing the calculation accuracy and efficiency of other processes.

[0032] Therefore, textures generated for rendering lines with texture representation must be generated within a limited range of lengths. In other words, textures generated for rendering lines must be generated only for certain length patterns, and line segments with lengths not included in the length patterns must be generated so that they can be rendered by combining textures of the length patterns.

[0033] Furthermore, in situations where the length of a line segment changes continuously, such as in animation, it is necessary to ensure uniform texture expression between textures of multiple length patterns regardless of the length. That is, in situations where the texture to be applied is selected depending on the length of a reference line, when the length of a line segment changes continuously, the display transitions by switching to textures of different lengths in stages. Therefore, if there is a discrepancy in the distribution of texture-forming elements (hereinafter sometimes simply referred to as particles) between the switched textures, the above-mentioned flickering appearance may occur due to changes in particle placement density, etc.

[0034] Therefore, when textures generated for rendering lines with texture representation (hereinafter sometimes referred to as line rendering textures) are switched sequentially in accordance with gradual changes in the length of the line, it is necessary to ensure continuity in the distribution of particles on the line before and after the switch. In other words, when line rendering textures with multiple length patterns are switched sequentially to textures of different lengths, the particle placement frequency must be constant, and the amount of change in the relative placement positions of particles that have the same appearance must be kept constant.

[0035] Furthermore, since lines of any length are drawn by combining limited length patterns as described above, even when multiple textures are arranged in the longitudinal direction of the line, the particle distribution pattern must be uniform, and a homogeneous texture expression must be achieved. In other words, when textures are arranged adjacent to each other, particles must be distributed in the boundary area in the same way as in other areas, ensuring seamless texture expression.

[0036] A specific method for generating a line segment rendering texture with a plurality of length patterns for one texture representation will be described below.

[0037] (Reference Texture) First, condition information is acquired that defines the rules for generating the texture representation indicated by each line rendering texture (particle placement conditions).

[0038] The texture representation of a pencil or brush cannot be achieved by uniformly coloring a two-dimensional area in which a line segment with the texture representation is drawn with a single color at a fixed density (especially in terms of shading, blurring, etc.). Therefore, as described above, the texture representation is achieved by distributing particles with a specific pixel pattern in a somewhat irregular manner. For example, by arranging particles with density (or hue, brightness, opacity, etc.) that varies irregularly (or in a specific pattern) based on random numbers, etc., a non-uniform texture representation like a pencil or brush stroke can be achieved. On the other hand, if particles are arranged completely irregularly throughout the entire line segment, the particle distribution may not be consistent, such as particles being sparsely or densely distributed in some areas, and the texture representation may not be properly achieved throughout the entire line segment.

[0039] In other words, to generate a line rendering texture that expresses a common texture, it is necessary to determine the placement conditions so that particles are distributed in a consistent manner globally, even though they are distributed irregularly locally to accommodate heterogeneous expressions. In one embodiment, the particle distribution may be determined as the frequency of particle placement per unit length (number of particles placed per unit length ≒ concentration). Alternatively, the particle distribution may be determined by the average or variance of particle hue, brightness, opacity, etc.

[0040] Therefore, the condition information defines the particle placement frequency per unit length that must be ensured when generating a line segment rendering texture for texture expression that requires its generation. In this embodiment, a texture having a specified length in the longitudinal direction (hereinafter referred to as the reference length) is generated based on the condition information, and line segment rendering textures of other length patterns are generated based on this texture. In other words, one of the line segment rendering textures to be generated is a texture having a reference length (hereinafter referred to as the reference texture), and is generated by determining particle placement positions in accordance with the condition information and arranging and drawing particles at those positions.

[0041] The condition information may be generated, for example, by a user setting various parameters related to particle type and particle placement for a desired line rendering texture. Generally, when drawing a line with texture representation, multiple types of particles are placed in the drawing area. Each particle is selected according to the desired texture representation. For example, in the case of a pencil, eight patterns of particles (raster images) as shown in FIG. 3 can be used to create a texture representation with a certain degree of heterogeneity. More specifically, by scaling, adjusting the opacity, and rotating one of the eight patterns of particles, a texture representation in which the regularity of the particle placement is less perceptible can be created. While a single type of particle may be used, it is preferable to use multiple types of particles because this increases the perception of regularity. Therefore, in this embodiment, the condition information includes information on the particle placement frequency per unit length as well as information on the particle types to be placed in the texture.

[0042] An example of generating a reference texture will be described in detail below with reference to FIG. 4. In the example shown in FIG. 4, the condition information defines an arrangement frequency of 32 particles per drawing area having a reference length in the longitudinal direction. More specifically, the condition information defines that, for the line width for generating the texture, 32 particles (specifically, a two-dimensional distribution of 8 particles in the longitudinal direction and 4 particles in the width (short) direction) are to be arranged in an area 401 having a reference length in the longitudinal direction. Note that in the example of FIG. 4, to facilitate understanding of the invention, only one type of particle (circle) is shown.

[0043] The placement positions of particles when generating the reference texture are determined by, for example, dividing the region 401 into a grid based on condition information and randomly determining the central coordinates of particles to be placed in each grid. In the example of Fig. 4, 36 grids (9 (=8 + 1) divisions in the longitudinal direction x 4 divisions in the width direction) are defined for the region 401. The grids aligned at the ends in the width direction (top and bottom) are defined with margins because, depending on the position of the central coordinates of the particles to be placed, the image of the particle may be drawn outside the grid.

[0044] In the illustration editing application of this embodiment, if the length of a line segment is longer than any of the line segment rendering textures, the line segment is rendered by arranging multiple textures adjacent to each other. Therefore, when line segment rendering textures are arranged adjacently, the particles distributed at their edges (boundaries) are configured to be consistent. Therefore, when multiple reference textures are arranged adjacently, a common particle pattern recursively appears in units of the reference length.

[0045] That is, of the lattices defined in region 401, the lattice group 402 in the leftmost column and the lattice group 403 in the rightmost column have the same particle arrangement positions. Furthermore, since lattice group 402 and lattice group 403 are configured so that only half of their area is included in region 401, the number of lattices included in region 401 is essentially 32, which is the same as the arrangement frequency per reference length defined in the condition information.

[0046] In this way, by defining the same number of lattices in the region 401 as the placement frequency defined in the condition information and placing one particle raster image in each lattice, a constant placement frequency is maintained throughout the region 401, resulting in a globally uniform texture representation. On the other hand, because the placement positions of the particles within each lattice are determined randomly, the particle distribution becomes irregular, resulting in a locally non-uniform texture representation.

[0047] The information on the particle placement positions determined for the reference texture is stored as information on the distribution of particles in the reference texture (hereinafter referred to as reference distribution information). Although the example of Figure 4 has been described assuming one type of particle, it goes without saying that if multiple types of particles are included, the distribution information will also include information specifying the type of particle to be placed at each placement position.

[0048] (Generation of Textures of Other Lengths than the Reference Length) When the reference texture is generated in this way, textures of other lengths than the line segment rendering texture are generated based on the reference texture.

[0049] As described above, the reference texture is configured to exhibit a common particle distribution pattern at its longitudinal ends, allowing for the rendering of longer line segments that exhibit a predetermined texture expression by arranging them adjacently. In other words, line segments whose lengths are an integral multiple of the reference length can be rendered using only the reference texture while ensuring a globally uniform texture expression. Here, the shortest line segment length that can be rendered using only the reference texture is the reference length, and the next longest line segment length that can be rendered using only the reference texture is twice the reference length (hereinafter referred to as double length). Therefore, the illustration editing application of this embodiment generates line rendering textures for each length determined by subdividing the range of lengths up to double length at a predetermined length resolution.

[0050] In other words, the reference texture can ensure a good texture representation when drawing line segments with a reference length, an integer multiple of the reference length, or a length that is slightly different from these lengths. However, the reference texture cannot ensure a good texture representation when drawing line segments with lengths that do not fall into these categories, i.e., line segments with lengths between 0 and the reference length and line segments with lengths between the reference length and twice the length. For this reason, the illustration editing application of this embodiment generates textures for drawing line segments with gradually varying lengths for lengths between 0 and the reference length and lengths between the reference length and twice the length.

[0051] The length pattern for generating a line rendering texture is defined as a length corresponding to each stage when the length range up to double length is divided into 32 stages, 64 stages, etc. (stage 0 is excluded because no line rendering texture needs to be allocated for length 0.) In the example shown below, the reference length is set to 64 pixels, and the double length up to 128 pixels is equally divided into 32 stages, and a line rendering texture is generated based on the reference texture for each stage excluding length 0 and the reference length.

[0052] In the following examples, the length resolution is set to 32 levels for convenience, but as mentioned above, the length resolution may be set to be finer or coarser depending on how smoothly the line segment rendering texture should be switched in response to changes in line length. Furthermore, equal division is not a required element, and the lengths for generating line segment rendering textures may be sparsely specified for some length ranges and densely specified for other length ranges.

[0053] The method for generating a texture for line drawing differs depending on the length of the texture to be generated (hereinafter referred to as the output length), so below we will explain both the side longer than the reference length (extended representation from the reference length) and the side shorter than the reference length (shortened representation from the reference length).

[0054] (1) Texture Generation for Extended Representation A line segment rendering texture whose output length is longer than the reference length, i.e., whose output length is S times the reference length (1<S≦2), is generated so that the particle arrangement is the same as when two reference textures are adjacent to each other at the double length. That is, a line segment rendering texture for extended representation is generated based on a reference texture 501 as shown in FIG. 5 , a double-length texture 502 generated by connecting two reference textures 501 in the longitudinal direction (hereinafter referred to as a concatenated texture), and the particle distribution. More specifically, a texture whose output length is S times the reference length (1<S≦2) is generated by determining the particle arrangement positions in the texture based on reference distribution information for the reference texture and information indicating the particle distribution for the concatenated texture (hereinafter referred to as concatenated distribution information).

[0055] Here, the concatenated texture 502 is a line rendering texture (32nd stage) corresponding to S=2. In this embodiment, the concatenated texture 502 is described as being generated as one of the line rendering textures. However, since the concatenated texture 502 is formed by connecting two reference textures 501, and is replaced by two reference textures 501 when drawing lines, as will be described later, generating the concatenated texture 502 is not essential to implementing the present invention.

[0056] The textures related to the extended representation are textures applied when the line segment to which they are applied is gradually extended from the reference length to double its length, and therefore, it is necessary to ensure the texture representation indicated by the reference texture 501 during this extension process. Furthermore, similarity in particle distribution patterns must be ensured so that flickering of the appearance does not occur when the applied texture is switched. In other words, the textures related to the extended representation must be configured to maintain a constant global particle placement frequency while exhibiting a certain degree of similarity between textures in terms of local particle placement positions. That is, the textures applied during the process of gradually extending the line segment from the reference length to double its length are generated by controlling the particle placement positions according to the output length so that the particle distribution pattern indicated in the reference distribution information gradually approaches the particle distribution pattern indicated in the connected distribution information.

[0057] A method for determining particle placement positions in generating a line segment rendering texture (hereinafter referred to as an extended intermediate texture) whose output length is S times the reference length (1<S<2) will be described below with reference to FIGS. 6A and 6B . In the example shown in the figure, to facilitate understanding of the invention, the particles constituting the line segment rendering texture are assumed to be of two patterns, A and B, and each particle in the figure is represented by the letter "A" or "B" for easy identification. For example, if the particles in the reference texture 601 are distributed as shown in FIG. 6A , a concatenated texture 602 corresponding to double the length is generated by concatenating two reference-length textures 601 in the longitudinal direction, resulting in a particle distribution as shown in FIG. 6B .

[0058] When generating the extended intermediate texture, first, the particles distributed in the reference texture 601 are associated with the particles distributed in the linked texture 602. Here, the association means associating particles that have the same relative positions in the texture and show the same pattern between the reference texture 601 and the linked texture 602 as the same particle.

[0059] That is, particles for which correspondence has been established are particles that are maintained at a constant relative position regardless of changes in the longitudinal length when the reference texture 601 is extended and transformed into the concatenated texture 602. In other words, particles for which correspondence has been established are particles that do not disappear in the process of extending the line segment to twice the reference length, but remain in an area where the relative position is common, and are particles that are also arranged in the same relative position in the extended intermediate texture. In other words, particles for which correspondence has been established are particles that are always arranged in an area where the relative position is common regardless of the length when the output length is longer than the reference length.

[0060] Here, the region having a common relative position may be determined based on a grid defined when the reference texture 601 was generated, as shown in Figures 7A to 7C. Consider the case where the reference texture 601 is generated by defining substantially 10 grids (5 divisions in the longitudinal direction x 2 divisions in the width direction) in the region 701 associated with the texture, as shown in Figure 7A, and placing either particle A or particle B in each grid. In this case, if the region 701 associated with the reference texture 601 is extended twice in the longitudinal direction, each grid is also extended twice in the longitudinal direction, as shown in Figure 7B. Since the region 711 in Figure 7B is the same size as the region associated with the linked texture 602, the region indicated by each grid extended twice in the longitudinal direction identifies the region in the linked texture 602 corresponding to each grid of the reference texture 601. Figure 7C shows the grid of Figure 7B superimposed on the linked texture 602. Therefore, the lattice area of ​​the reference texture 601 and the lattice area of ​​the linked texture 602, which are specified by lattice coordinates (M, N) using the lattice row number M and column number N, are areas that share a common relative position.

[0061] 7A, a particle 703 of pattern B is placed in a lattice region 702 specified by the lattice coordinates (4, 1), and in Fig. 7C, a particle 713 of pattern B is also placed in a lattice region 712 specified by the same lattice coordinates. Therefore, the particle 703 and particle 713 placed in the lattice region of the lattice coordinates (4, 1) can be associated with each other between the reference texture 601 and the linked texture 602.

[0062] On the other hand, a particle 705 of pattern A is placed in a lattice region 704 specified by lattice coordinates (3, 1) in Fig. 7A, but no particle of pattern A is placed in a lattice region 714 specified by the same lattice coordinates in Fig. 7C. Therefore, the particle 705 placed in the lattice region of lattice coordinates (3, 1) cannot be associated between the reference texture 601 and the linked texture 602. In other words, the particle 705 cannot be associated because there is no particle of the same pattern in the linked texture 602 with a small change in relative position.

[0063] Through this matching, each particle distributed in the reference texture 601 and the concatenated texture 602 is first classified into either a first category, which is particles for which matching has been achieved, or a second category, which is particles for which matching has not been achieved. That is, particles in the first category are particles shown in black in FIG. 7D , which remain positioned in a region of a fixed relative position regardless of the length of the extended intermediate texture. On the other hand, particles in the second category are particles whose position in a region of a fixed relative position changes depending on the length of the extended intermediate texture. More specifically, particles in the second category include first particles shown in black in FIG. 7E , which exist in the reference texture 601 but disappear from the region of the same relative position as the length of the extended intermediate texture increases, and second particles shown in black in FIG. 7F , which do not exist in the reference texture 601 but appear as the length of the extended intermediate texture increases.

[0064] Since the concatenated texture 602 is generated by concatenating the reference texture 601, the particles in the lattice regions at the ends of the reference texture 601 are always classified into the first category. As a result, like the reference texture 601, the particles in the extended intermediate texture do not become discontinuous at the boundary even if they are arranged adjacently on a line segment when drawing a line segment longer than double the length.

[0065] Based on the classification results of the particles distributed in the reference texture 601 and the concatenated texture 602, the placement position of each particle is determined for each length stage of the decompressed representation, and an decompressed intermediate texture is generated. In other words, in a situation where the particle distribution pattern at the reference length (reference distribution information) and the particle distribution pattern at double length (concatenated distribution information) are determined, if particles are randomly placed in the decompressed intermediate texture showing the decompression process, the continuity of the particle distribution pattern is not guaranteed, and the appearance may flicker. For this reason, only particles distributed in the reference texture 601 and the concatenated texture 602 are used to generate the decompressed intermediate texture. When determining the placement position of each particle, these particles are classified by their characteristics, and the determination method varies for each classification depending on the texture length, as follows:

[0066] For the first type of particle, there is a particle associated with both the reference texture 601 and the connected texture 602. Therefore, the placement position of the particle in the extended intermediate texture is determined based on the relative position of the particle in the reference texture 601 and the relative position of the particle in the connected texture 602.

[0067] As described above, the particles in the first category are particles that are distributed in the same pattern and in a region where the relative positions in each texture are common, so the relative positions of the particles may be different in the reference texture 601 and the connected texture 602. For example, if the X coordinate (absolute coordinate) of the left edge of each texture is defined as X=0, and the X coordinate (absolute coordinate) of particle [i] in the reference texture 601 is X=0, i In this case, the X coordinate (absolute coordinate) of the associated particle [i] in the linked texture 602 is not necessarily 2X i Instead, 2X i Close to 2X i Therefore, the relative X coordinate of the particle [i] in the extended intermediate texture is changed as the output length increases. i From X iThat is, as the output length increases, the placement position of particle [i] is determined so as to move sequentially from the relative coordinates in the reference texture 601 to the relative coordinates in the connected texture 602. Specifically, as the output length L out The X coordinate (absolute coordinate) of the arrangement position of particle [i] in the extended intermediate texture out teeth, Here, L ref is the reference length, L dub indicates double length.

[0068] It should be noted that the determination of the placement positions of the first-class particles placed at the ends of the extended intermediate texture is controlled so that they are placed at the same relative positions in both the reference texture 601 and the linked texture 602. In other words, the relative positions of the first-class particles at the ends are controlled to be the same in extended intermediate textures of any length, so no processing is performed to move the relative positions of the particles depending on the output length.

[0069] On the other hand, particles of the second category exist in either the reference texture 601 or the concatenated texture 602, but do not have corresponding particles in the other texture. Therefore, in the process of decompression, there is no need to move the placement position to a different relative position as with particles of the first category. Therefore, for first particles of the second category that are included only in the reference texture 601, the placement position in the decompressed intermediate texture is determined so as to maintain the relative position of the particle in the reference texture 601. In other words, if the X coordinate (absolute coordinate) in the reference texture 601 is Xa i The output length L of particle [i] is out X coordinate (absolute coordinate) of the placement position in the extended intermediate texture out teeth, It can be derived as:

[0070] Furthermore, for the second particle of the second category that is included only in the concatenated texture 602, the placement position in the extended intermediate texture is determined so as to maintain the relative position of the particle in the concatenated texture 602. That is, the output length L of the particle [i] whose X coordinate (absolute coordinate) is Xbi in the concatenated texture 602 is out X coordinate (absolute coordinate) of the placement position in the extended intermediate texture out teeth, It can be derived as:

[0071] Furthermore, for the second type of particles, the arrangement size is determined so that the disappearance or appearance of the particles is indicated in the decompressed intermediate texture according to the output length. That is, for the first particles, a visible arrangement size is determined for an output length close to the reference length, and an invisible arrangement size (0) is determined for an output length close to double length. For the second particles, an invisible arrangement size (0) is determined for an output length close to the reference length, and a visible arrangement size is determined for an output length close to double length. That is, the arrangement size of the first particles becomes smaller (invisible) as the output length becomes longer, and larger (visible) as the output length becomes shorter. The arrangement size of the second particles becomes larger (visible) as the output length becomes longer, and smaller (invisible) as the output length becomes shorter.

[0072] The output length and placement size of each particle can be determined according to the placement frequency of particles defined for the reference texture 601. In other words, by maintaining the placement frequency of particles per unit length of the reference texture 601, it is possible to ensure a uniform texture expression in the extended intermediate texture.

[0073] In this embodiment, maintaining the particle placement frequency means adjusting the area occupied by particles placed in each lattice region so that it is equivalent to the area of ​​one particle in the reference texture 601, assuming that a lattice of the same size as that used to generate the reference texture 601 is defined, as shown in FIG. 8 . That is, depending on the output length, multiple particle placement positions may be included in one lattice region. In this case, the placement size of each particle is adjusted to 1 (default size) or less, so that the sum of all particle sizes is 1. In other words, in this embodiment, where the placement frequency is set to one particle per lattice region, if the particle placement positions determined for the output length are included in the same lattice region, the placement frequency is not guaranteed. For this reason, the placement frequency is maintained by adjusting the particle size, including to 0.

[0074] 8 shows an example in which, within an area 801 having an output length in the longitudinal direction, it is possible to define substantially 14 lattices (specifically, a two-dimensional distribution of seven in the longitudinal direction and two in the width direction) of the same size as those defined when generating the reference texture shown in FIG. 7 . Since the lattice area 802 contains two particles 803 and 804, the arrangement sizes of the two particles are determined according to their classification. For example, if one of the particles is a particle of the first classification, the arrangement size of that particle is maintained at 1 regardless of the output length in the extended representation, and therefore the arrangement size of the other particle is determined to be 0. Furthermore, for example, if both particles are particles of the second classification, the arrangement size of the first particle is determined according to the size of (output length - reference length), and the arrangement size of the second particle is determined according to the size of (double length - output length).

[0075] While Figure 8 illustrates an example of an output length that allows an integer number of grids of the same size as those defined when the reference texture was generated to be defined in the longitudinal direction, it goes without saying that the implementation of the present invention is not limited to this. Depending on the output length, it may not be possible to define an integer number of grids in the longitudinal direction, and therefore the particle placement frequency may not necessarily be the same as that of the reference texture. In this case, the particle placement frequency of the extended intermediate texture may be controlled so that the difference from the particle placement frequency of the reference texture is below a predetermined threshold. Here, the threshold is set to an extent that no visible difference in appearance is observed between the extended intermediate texture and the reference texture.

[0076] In addition, in the present embodiment, a method of adjusting the particle arrangement size to maintain the particle arrangement frequency is used in generating the decompressed intermediate texture, but the implementation of the present invention is not limited to this. For example, the particle arrangement frequency in the decompressed intermediate texture may be maintained by adjusting the opacity of the particles. Alternatively, the particle arrangement frequency may be maintained by adjusting both the particle arrangement size and opacity.

[0077] (2) Texture Generation for Shortened Representation In contrast, a line segment rendering texture (hereinafter referred to as a shortened intermediate texture) whose output length is shorter than the reference length, i.e., whose output length is S times the reference length (0 < S < 1), does not have a texture that can serve as a specific guide for particle placement, as in a concatenated texture. Therefore, when determining the particle placement positions of a shortened intermediate texture for shortened representation, a texture (hereinafter simply referred to as a shortened texture) is generated by shortening the reference texture so that its longitudinal length is the output length, and the particle distribution pattern in this shortened texture is referenced. In other words, in an illustration editing application, the particle placement positions in a shortened intermediate texture for an output length are determined based on the reference distribution information for the reference texture and the shortened distribution information that indicates the particle distribution pattern in the shortened texture generated for that output length.

[0078] 9A illustrates a reference texture 901 and a shortened texture 902, which is the reference texture 901 shortened by half in the longitudinal direction. As illustrated, in the shortened texture 902, the particles are compressed in the longitudinal direction as a whole, and therefore the same texture representation as the reference texture 901 is not guaranteed. On the other hand, if the particle shapes were made the same as the reference texture 901, the particle arrangement density could be higher than that of the reference texture 901, as shown in FIG. 9B. In other words, if all the particles in the shortened texture 902 were made the same shape and size as the particles in the reference texture 901, the particle arrangement frequency would change. Therefore, in order to generate a shortened intermediate texture, it is necessary to adjust the particle arrangement size, as in the case of the expanded representation.

[0079] The size of the particles may be adjusted in the same manner as that for the second type of particles in the extended intermediate texture. For example, as shown in Figure 10, when a grid of the same size as that used in generating the reference texture 901 is defined for the area of ​​the shortened texture 902, the sum of the sizes of all particles placed in each grid area may be adjusted to 1.

[0080] Here, when multiple particles are arranged in a lattice region, for example, a priority (the closer to the center, the higher the priority) can be set according to the distance from the center of each lattice region, and the particle arrangement size can be determined based on this priority (particles with higher priority are made larger than particles with lower priority). This priority setting is merely an example, and other methods can also be used. The reason why such particle prioritization is necessary is because the shortened texture is generated by modifying the reference texture. In other words, since the reference distribution information and shortened distribution information referenced in generating the shortened intermediate texture are both determined based on the same reference texture, all particles can be associated with the reference texture and the shortened texture, which falls into the first category in the decompressed representation.

[0081] As with the reference texture, extended intermediate texture, and linked texture, the placement position and placement size of particles at the edges must be controlled so that when particles are placed adjacent to each other, they do not become discontinuous at the boundary. Therefore, for lattice regions corresponding to edges, the placement position of the corresponding particle is fixed so as to maintain the distribution pattern of the particles at the edges in the reference texture 901, and the placement sizes of other particles included in the lattice region where the same particle is placed are forcibly set to 0. An example of a 1 / 2 length shortened intermediate texture generated by determining the placement positions and placement sizes of particles in this manner is shown in Figure 9C.

[0082] 9C, the shortened intermediate texture with half the length has a sufficient length in the longitudinal direction of the region in which particles are arranged, so the arrangement size of the particles at the ends can be made the same as that of the reference texture 901. However, depending on the output length, the longitudinal length of the particles may exceed the output length, so for output lengths that are equal to or less than the longitudinal length of the particles, the particles may be compressed in the longitudinal direction as shown in FIG. 11 so that the texture representation does not change due to overlapping particles.

[0083] In addition, in the present embodiment, a method of adjusting the particle arrangement size to maintain the particle arrangement frequency is used in generating a shortened intermediate texture, but the present invention is not limited to this. For example, as with an extended intermediate texture, the particle arrangement frequency in a shortened intermediate texture may be maintained by adjusting the opacity of the particles. Alternatively, the particle arrangement frequency may be maintained by adjusting both the particle arrangement size and opacity.

[0084] By arranging the particles of each pattern at the arrangement positions and arrangement sizes determined in this manner, it is possible to generate textures that have a common texture representation for multiple output lengths up to double length. As will be described in detail below, the generated line segment rendering textures (reference texture, concatenated texture, extended intermediate texture, and shortened intermediate texture) can each be used to represent a uniform texture representation for line segments with lengths from 0 to double length. Furthermore, because each line segment rendering texture is configured to be able to be arranged adjacent to each other, it is possible to represent a uniform texture representation for line segments longer than double length using multiple line segment rendering textures.

[0085] In this embodiment, line segment rendering textures are generated for each length stage, which is equal division of the double length into 32 stages, and when rendering a line segment of varying length, these textures are sequentially switched and applied according to the line segment length. As will be described in detail later, when rendering a line segment of a length less than double length for which no line segment rendering texture has been generated, for example, the longest line segment rendering texture shorter than the line segment is stretched to the length of the line segment and used. Then, when the line segment is stretched to reach the next length stage, the texture for that length stage is switched to.

[0086] For this reason, it is preferable that the line segment rendering texture is configured so that the user does not perceive the change in texture applied to the drawn line segment. Therefore, it is assumed that information regarding particle arrangement is determined so that a certain degree of similarity in the particle distribution pattern is guaranteed between the line segment rendering texture of one length stage (first length) and the line segment rendering texture of the next longer length stage (second length).

[0087] More specifically, the texture of the first length (hereinafter referred to as the first texture) is extended as necessary and applied to line segments having lengths equal to or greater than the first length but less than the second length. Therefore, when the line segments are extended from the first length to the second length, the texture is switched from the first texture to the texture of the second length (hereinafter referred to as the second texture).

[0088] According to the above-described method for generating a texture for line segment rendering, the size of each particle is adjusted according to the output length so that the frequency of particle placement remains constant regardless of the output length, and the placement position of each particle is also adjusted according to the output length based on the distribution pattern in the reference texture or the linked texture so that the relative position within the texture area is maintained. Therefore, the extent to which a difference appears in the distribution pattern of particles between the first texture and the second texture, i.e., whether the change from the first texture to the second texture is easily noticeable to the user, depends on the difference in the lengths corresponding to each texture (the first length and the second length).

[0089] Furthermore, when the first texture is stretched to a length similar to that of the second texture, the shape of the particles of the first texture changes, and therefore the perceived ease of the transition from the first texture to the second texture varies depending on the extent of stretching applied immediately before the transition to the second texture. That is, the extent to which the first texture is stretched before the transition to the second texture also depends on the magnitude of the difference in the lengths corresponding to each texture.

[0090] In other words, in order to generate a line segment drawing texture that ensures a consistent texture expression and that makes the change difficult for the user to perceive, it is preferable to configure the first texture and the second texture so that their similarity when they are made equal in length is equal to or greater than a threshold. In other words, if the texture expression (appearance) formed by the distributed particles when the first texture is stretched to the second length is similar to that of the second texture, the user will not perceive a change in the line segment drawing texture during the process of stretching or shortening the line segment, and will get the impression that a seamless texture expression is guaranteed.

[0091] The following generalized explanation will be given for the case where N (N=32 in this embodiment) types of textures are generated as line rendering textures, each generated as T[m] (m is an integer such that 0≦m<N). In this case, the line rendering textures are of N types, excluding 0 times the reference length, out of N+1 textures that change in stages from 0 to Se (an integer value; Se=2 in this embodiment). Numeric values ​​from 0 to N-1 are assigned as m to these textures, starting with the shortest, and one texture can be identified by T[m] based on this numeric value (number) m. In this case, if the longitudinal length of T[m] is S[m] times the reference length, the relationship between m and S[m] is (When the length is determined by equally dividing up to Se times). In this case, if the number corresponding to the first length is m and the number corresponding to the second length is m+1, T[m] has a length S[m] times the reference length, and T[m+1] has a length S[m+1] times the reference length. Therefore, the difference in the longitudinal length between the texture T[m] of the first length and the texture T[m+1] of the second length is Here, L ref is the reference length. In other words, the larger the number of length patterns in the line segment rendering texture, i.e., the number of divisions N into lengths from 0 to Se times, the less likely the user will perceive the change when switching to the next longest line segment rendering texture. This is because the smaller the difference between S[m] and S[m+1], the narrower the length range (intermediate length between S[m] and S[m+1]) to which T[m] can be extended, and the fewer opportunities there are to display a texture with a changed particle shape (stretched in the longitudinal direction).

[0092] Preferably, by configuring the system so that a different line segment rendering texture is used each time the length of the line segment changes by one pixel, it is possible to present a stretched representation that ensures a more uniform texture without displaying an elongated texture. The number N of such length patterns is given by It can be derived as:

[0093] In this way, by appropriately selecting the reference length and the number of types of line segment rendering textures to be generated, it is possible to generate a group of line segment rendering textures that ensure a uniform texture expression, just as when lines are drawn using appropriate particle placement, even when lines are drawn using textures. Therefore, the number of length patterns is not limited to the above-mentioned 32, but can be set to any value, such as 64 or 128, depending on the required quality of the line segment rendering texture (how inconspicuous the difference is when switching) and the reference length.

[0094] <Line Segment Drawing Using Texture> Next, we will explain the outline of the process of drawing a line segment with the corresponding texture expression using the line segment drawing textures with multiple length patterns generated in this way. In this embodiment, the line segment drawing is provided as one of the functions of an illustration editing application. The process of line segment drawing using texture can be classified into the following three types depending on the length of the line segment.

[0095] (1) Line segments with lengths less than double the normal length Line segments with lengths less than double the normal length are drawn using one of the generated line rendering textures. If a texture with the same length as the line segment exists, that texture is selected. If no texture with the same length as the line segment exists, the texture with the longest length among those shorter than the line segment is selected.

[0096] For example, the reference length L ref and the length of the line segment is 1 / 2 (0.5 = 2 × 8 / 32) times longer, then texture T[7], which is assigned texture number 7 (= 8 - 1), will be used for rendering. Similarly, T[7] will be used until the length of the line segment exceeds 1 / 2 the length of texture number 7 and reaches the length of texture number 8 (2 × (8 + 1) / 32 ≒ 0.56 times longer). At this time, T[7] will be extended according to the length of the line segment before being applied. Then, when the length of the line segment reaches the length of texture number 8, the applied texture will be switched from T[7] to T[8].

[0097] (2) Double-Length Line Segments For double-length line segments, the 32nd texture T

[31] among the generated line segment rendering textures has the same length. Here, T

[31] is a concatenated texture, so there is no difference in appearance from two adjacent reference textures. Also, since there is no texture longer than T

[31] among the line segment rendering textures, it is not possible to switch to a longer texture if the line segment is extended further. Therefore, although the concatenated texture T

[31] is selected based on the length of the line segment, two reference textures T

[15] are selected instead of that texture.

[0098] That is, if the length of a line segment is doubled, the line segment can be drawn using a single texture T

[31] , but this is replaced with two reference textures T

[15] for drawing. In other words, since the concatenated texture T

[31] is originally generated by concatenating two reference textures T

[15] , even if T

[30] is replaced with two T

[15] at the length where T

[30] switches to T

[31] , the user will not be able to recognize the replacement.

[0099] (3) Line Segments Longer than Double Length On the other hand, for line segments longer than double length, applying only one of the generated line segment rendering textures will not provide a suitable texture to the line segment. When a line segment becomes double length, the texture applied to the line segment is changed from one texture (T

[31] ) to two textures (T

[15] x 2). For this reason, for line segments longer than double length, the texture is applied by switching each of these replaced textures to a longer texture.

[0100] For example, if the length of a line segment is three times its reference length, two adjacent textures T

[23] with a length of 1.5 are applied to render the line segment with texture representation. That is, as the line segment gradually extends, the two reference textures that were applied as replacements when the line segment was double-length are successively switched to longer textures according to the length of the line segment. Then, when the line segment reaches four times its reference length, both textures are switched to double-length texture T

[31] (concatenated texture), which are then each replaced with two reference textures T

[15] , just as when a double-length line segment is rendered. Therefore, when the line segment extends beyond four times its reference length, each of the successively replaced textures is switched to a texture of a different length.

[0101] That is, the number of line drawing textures to be applied is determined based on the length of the line segment, which is twice the reference length. N Every time it doubles, it doubles (2 N Therefore, the number of textures used to draw a line segment is calculated by dividing the length of the line segment by the reference length, casting the result to an integer type, and then expressing the integer value in binary form. This is calculated from the number of times N that can be bit-shifted to the right until the integer value becomes 0 (2 N ) can be done.

[0102] In this way, the illustration editing application of this embodiment makes it possible to use a limited number of line drawing textures to draw lines that, in principle, maintain a uniform texture expression up to lines of infinite length.

[0103] To facilitate understanding of the present invention, this embodiment will be described assuming that when multiple line segment rendering textures are applied to render a line segment, these textures are textures that indicate the same length. In other words, multiple line segment rendering textures of the same type are applied to render a single line segment. This allows for a uniform particle distribution pattern across the entire line segment. However, the present invention is not limited to this example. For example, line segment rendering textures of different lengths may be combined and applied depending on the length of the line segment.

[0104] <<Generation Process>> The generation process for generating a line segment drawing texture in the illustration editing application of this embodiment will be specifically described below using the flowchart in Fig. 12. The process corresponding to this flowchart can be realized by the control unit 101 reading out a corresponding processing program stored in, for example, the storage device 102, and loading and executing the program in the memory 103. Note that this generation process will be described as being started when, for example, condition information relating to the generation rules for the reference texture is input.

[0105] In S1201, the control unit 101 generates a reference texture based on the input condition information and acquires reference distribution information for the generated reference texture. Here, the condition information includes information on the particle pattern to be arranged in the reference texture, information on the particle arrangement frequency per unit length, and information on the reference length. Based on the condition information, the control unit 101 acquires the reference distribution information by determining the arrangement positions of particles in each pattern so as to satisfy the particle arrangement frequency.

[0106] In S1202, the control unit 101 determines the output length of each of the line rendering textures to be generated other than the reference texture. The output length of each texture is determined by dividing the range of lengths from 0 to the maximum length equally into a predetermined number of divisions, with the reference length multiplied by a predetermined integer value as the maximum length. In the example described above, the predetermined integer value is 2, and the number of divisions is 32. Here, the predetermined integer value and the number of divisions may be predetermined, or may be determined based on, for example, input by the user.

[0107] In S1203, the control unit 101 determines particle placement positions for each of the line segment rendering textures to be generated based on the reference distribution information. The control unit 101 also determines particle placement sizes as necessary. More specifically, the control unit 101 determines particle placement positions using different methods for output lengths (output lengths related to extended representation) that are longer than the reference length among the output lengths determined in S1202 and output lengths (output lengths related to contracted representation) that are shorter than the reference length.

[0108] For the output length related to the decompressed representation, the control unit 101 first generates a concatenated texture by concatenating reference textures and obtains concatenated distribution information for the generated concatenated texture. The control unit 101 then associates particles distributed in the reference texture with particles distributed in the concatenated texture based on the reference distribution information and concatenated distribution information, and classifies the particles. The control unit 101 then determines the placement position of each particle for each output length according to the classification. For particles in the second classification, the control unit 101 also determines the placement size based on the reference distribution information, concatenated distribution information, particle classification information, and particle placement frequency information.

[0109] Regarding the output length of the shortened representation, the control unit 101 converts the reference distribution information according to each output length to obtain shortened distribution information corresponding to the output length.The control unit 101 then determines the arrangement position of each particle based on the shortened distribution information.The control unit 101 also determines the arrangement size based on the shortened distribution information, particle priority, and particle arrangement frequency information.

[0110] In S1204, under the control of the control unit 101, the rendering unit 104 generates line rendering textures (extended intermediate textures and shortened intermediate textures) for each output length based on the information on the placement position and placement size of each particle determined in S1203. That is, the rendering unit 104 generates line rendering textures for each output length by placing particles of the corresponding pattern at the determined placement positions. The generated textures are stored in the storage device 102 in association with the output length.

[0111] <<Drawing Process>> Next, the specific drawing process for drawing line segments with texture representation in the illustration editing application of this embodiment will be described using the flowchart of FIG. 13 . The process corresponding to this flowchart can be realized by the control unit 101 reading a corresponding processing program stored in, for example, the storage device 102, loading it into memory 103, and executing it. Note that this drawing process will be described as being started, for example, when an input related to changing the length of the corresponding line segment is received, and repeatedly executed while the input continues. Furthermore, it is assumed that, prior to execution of this drawing process, line segment drawing textures of each length related to the texture representation of the drawing target are loaded in memory 103 or the GPU memory of the drawing unit 104. In the following description, it is assumed that the line segment drawing textures are generated for lengths up to twice the reference length.

[0112] In step S1301, the control unit 101 acquires the length of the line segment to be drawn. The length of the line segment is derived based on the vector information of the reference line input to define the line segment.

[0113] In S1302, the control unit 101 determines whether the length of the line segment acquired in S1301 is less than double the length of the reference texture, twice the length, or more than double the length. If the control unit 101 determines that the length of the line segment is less than double the length of the reference texture, the process proceeds to S1303. If the control unit 101 determines that the length of the line segment is double the length, the process proceeds to S1305. If the control unit 101 determines that the length is more than double the length, the process proceeds to S1307.

[0114] In S1303, the control unit 101 selects one line segment rendering texture corresponding to the length of the line segment. More specifically, the control unit 101 selects one texture having a length equal to or less than the length of the line segment from among the line segment rendering textures related to the texture representation of the rendering target.

[0115] In S1304, the drawing unit 104, under the control of the control unit 101, applies the line segment drawing texture selected in S1303 to the reference line to draw the line segment. At this time, if the length of the line segment drawing texture differs from the length of the line segment, the drawing unit 104 extends the line segment drawing texture to the length of the line segment before applying it. The drawn line segment is included in a screen related to the illustration editing application and is displayed on the display unit 110 by the display control unit 105.

[0116] On the other hand, if it is determined in S1302 that the length of the line segment is double the length, the control unit 101 selects a line segment rendering texture corresponding to the length of the line segment in S1305. At this time, the line segment rendering texture corresponding to the length of the line segment is a concatenated texture, but after selecting the concatenated texture, the control unit 101 replaces it with two reference length textures.

[0117] In S1306, the drawing unit 104, under the control of the control unit 101, applies the line drawing texture (two reference textures) selected in S1305 to the reference line to draw the line. The drawn line is similarly included in the screen related to the illustration editing application and is displayed on the display unit 110 by the display control unit 105.

[0118] In S1307, the control unit 101 determines the number of line segment rendering textures to be used (hereinafter referred to as the number of textures) based on the length of the line segment.

[0119] In S1308, the control unit 101 derives the length of the section (section length) to which one line rendering texture is applied by dividing the length of the line segment by the number of textures.

[0120] In S1309, the control unit 101 selects one line rendering texture corresponding to the section length. More specifically, the control unit 101 selects one texture having the longest length equal to or less than the section length from among the line rendering textures related to the texture representation of the rendering target.

[0121] In S1310, under the control of the control unit 101, the drawing unit 104 draws the line segment by arranging the line segment drawing textures selected in S1308 in the number of textures and applying them to the reference line. At this time, if the length of the line segment drawing texture differs from the section length, the drawing unit 104 extends each line segment drawing texture to the section length before applying it. The drawn line segment is similarly included in the screen related to the illustration editing application and displayed on the display unit 110 by the display control unit 105.

[0122] In this embodiment, an illustration editing application has been described in which a line segment with texture representation is drawn using a line segment drawing texture, but the present invention is not limited to this. The drawing of a line segment with texture representation may be performed by any application that can use a line segment drawing texture generated by a generation process. In other words, the present invention related to line segment drawing can be performed by any information processing device that acquires and stores a line segment drawing texture generated by a generation process, and it is not essential that the line segment drawing texture be performed by the application that generates the line segment drawing texture or the information processing device that generated it.

[0123] As described above, the drawing program of this embodiment makes it possible to draw line segments with desired texture representation while avoiding an increase in the amount of calculations. For example, any curve formed by two or more control points can be configured to have a uniform texture representation throughout the entire curve by drawing each segment between two consecutive control points on the curve using a line segment drawing texture corresponding to the length between the control points based on a drawing process. In this case, each line segment drawing texture is configured to have a common particle distribution pattern at the end, thereby enabling a drawing representation in which particles are naturally connected at the connection between consecutive segments. Furthermore, even when the length of each segment is changed, the corresponding number of reference textures are sequentially replaced each time the length reaches an integer multiple of the reference length. As a result, line segments that can be smoothly stretched from a length of zero to an infinite length and have a uniform texture representation can be displayed with a small amount of calculations.

[0124] In this embodiment, a concatenated texture is generated by concatenating two reference textures, but the present invention is not limited to this. From the viewpoint of minimizing the number of generated textures, it is preferable that the length of the concatenated texture that serves as the basis for generating the decompressed intermediate texture is twice the reference length, as described above. However, it goes without saying that the length of the concatenated texture may be any length that is a predetermined integer multiple of the reference length, and an integer value of 3 or greater may be used as the predetermined integer.

[0125] For example, if the predetermined integer is "3", a concatenated texture is generated by concatenating three reference textures, and a line rendering texture is generated for a length range from 0 to 3 times the reference length. Then, in the rendering process using the line rendering texture, if the length of the line is 3 times the reference length, N Each time the length is doubled, three reference textures are applied instead to the interval where the concatenated texture is applied.

[0126] [Variation 1] In the above-described embodiment, when there is no line segment rendering texture having the same length as the line segment to be rendered, i.e., when the length of the line segment is intermediate between the first length and the second length in the length pattern, a texture having a length shorter than the line segment is extended and applied. However, the present invention is not limited to this. For line segments of intermediate length, a texture of intermediate length may be generated and applied by combining line segment rendering textures of multiple lengths by averaging or weighted addition.

[0127] [Variation 2] In the above-described embodiment, when generating an extended intermediate texture, particles of the first classification are associated when particles of the same pattern are distributed in a lattice region that shares lattice coordinates, but the present invention is not limited to this. Particles of the first classification may also be associated when, for any particle of the reference texture, particles of the same pattern are distributed within a predetermined distance from a point on the connected texture that shares the same relative coordinates as the particle.

[0128] Other Embodiments The invention is not limited to the above-described embodiments, and various modifications and variations are possible within the scope of the gist of the invention.

Claims

1. A computer that draws lines with texture representation an acquisition process for acquiring a plurality of textures each having a different length and exhibiting a common texture representation, including a reference texture having a reference length; a selection process of selecting at least one of the plurality of textures acquired by the acquisition process according to the length of the line segment to be drawn; a drawing process of arranging the texture selected by the selection process and drawing the line segment; A process of accepting a change in the length of the line segment; A drawing program that executes When a change in the length of the line segment is accepted, in the selection process, a second texture corresponding to the length of the line segment after the change is selected in place of the first texture selected before the change; When the second texture has a length that is a predetermined integer multiple of the reference length, the predetermined integer number of the reference textures are selected instead of the second texture. A drawing program characterized by:

2. 2. The drawing program according to claim 1, wherein the plurality of textures are textures in which the common texture expression is formed by distributed texture forming elements.

3. 3. The drawing program according to claim 2, wherein the plurality of textures have a common distribution pattern of the texture forming elements at least at the end portions.

4. 3. The drawing program according to claim 2, wherein a texture having a first length among the plurality of textures and a texture having a second length next to the first length are configured so that when the textures are made equal in length by a stretching process, the similarity in distribution of the texture forming elements exceeds a threshold value.

5. The drawing program according to claim 2, characterized in that a texture having a length that is the predetermined integer multiple of the reference length exhibits the same distribution pattern of the texture forming elements as when the predetermined integer number of the reference textures are connected.

6. 2. The drawing program according to claim 1, wherein the plurality of textures are configured to have lengths that differ stepwise within a range up to a length that is the predetermined integral multiple of the reference length.

7. the selection process includes a process of determining the number of textures to be placed on the line segment in accordance with the length of the line segment; When the change in the length of the line segment is accepted, the second texture is selected from the determined number of the first textures in the selection process.

2. The drawing program according to claim 1, wherein:

8. A drawing device that draws a line segment with texture expression, an acquisition means for acquiring a plurality of textures each having a different length and showing a common texture expression, including a reference texture having a reference length; a selection means for selecting at least one of the plurality of textures acquired by the acquisition means in accordance with the length of the line segment to be drawn; a drawing means for arranging the texture selected by the selection means and drawing the line segment; means for accepting a change in the length of the line segment; and When a change in the length of the line segment is accepted, the selection means selecting a second texture corresponding to the length of the line segment after the change, in place of the first texture selected before the change; When the second texture has a length that is a predetermined integer multiple of the reference length, the predetermined integer number of the reference textures is selected instead of the second texture. A drawing device characterized by:

9. A method for controlling a rendering device that renders a line segment with texture representation, comprising: an acquisition step of acquiring a plurality of textures each having a different length and exhibiting a common texture representation, including a reference texture having a reference length; a selection step of selecting at least one of the plurality of textures acquired in the acquisition step according to the length of the line segment to be drawn; a drawing step of arranging the texture selected in the selection step and drawing the line segment; accepting a change in the length of the line segment; and When a change in the length of the line segment is accepted in the selection step, a second texture corresponding to the length of the line segment after the change is selected in place of the first texture selected before the change; When the second texture has a length that is a predetermined integer multiple of the reference length, the predetermined integer number of the reference textures are selected instead of the second texture. A control method comprising:

10. A computer-readable recording medium on which the drawing program according to any one of claims 1 to 7 is recorded.