[go: up one dir, main page]

CN102609577B - Computer simulation method of paper marbling image - Google Patents

Computer simulation method of paper marbling image Download PDF

Info

Publication number
CN102609577B
CN102609577B CN201210018768.2A CN201210018768A CN102609577B CN 102609577 B CN102609577 B CN 102609577B CN 201210018768 A CN201210018768 A CN 201210018768A CN 102609577 B CN102609577 B CN 102609577B
Authority
CN
China
Prior art keywords
fluid
node
boundary
place
speed
Prior art date
Legal status (The legal status 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 status listed.)
Expired - Fee Related
Application number
CN201210018768.2A
Other languages
Chinese (zh)
Other versions
CN102609577A (en
Inventor
刘世光
陈迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin University
Original Assignee
Tianjin University
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 Tianjin University filed Critical Tianjin University
Priority to CN201210018768.2A priority Critical patent/CN102609577B/en
Publication of CN102609577A publication Critical patent/CN102609577A/en
Application granted granted Critical
Publication of CN102609577B publication Critical patent/CN102609577B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Paper (AREA)

Abstract

本发明公开了一种石纹纸染图形的计算机仿真方法,结合流体力学模拟颜料的流动过程,其模拟通过流体流动过程中的任意给定时刻对流体状态给定一个数学描述来实现;以及利用矢量图技术实现石纹纸染图形的输出,与现有方法相比,本发明的石纹纸染图形的计算机仿真方法,不仅能够实现石纹纸染的计算机仿真,而且仿真结果能够最大程度地接近实际的石纹纸染技艺所得到的图形效果,仿真度高。

The invention discloses a computer simulation method for stone pattern paper dyeing graphics, which combines fluid mechanics to simulate the flow process of pigments, and the simulation is realized by giving a mathematical description to the fluid state at any given moment in the fluid flow process; and using The vector diagram technology realizes the output of stone pattern paper dyeing graphics, compared with the existing methods, the computer simulation method of stone pattern paper dyeing graphics of the present invention can not only realize the computer simulation of stone pattern paper dyeing, but also the simulation results can maximize The graphic effect obtained by the actual stone pattern paper dyeing technique has a high degree of simulation.

Description

Bag paper dyes the computer emulation method of figure
Technical field
The present invention relates to computer picture emulation technology, relate in particular to and utilize the mobile emulation technology implementation method with artistic effect texture of drawing of computer mould fluid analogy.
Background technology
It is the paper skill form that a kind of ancient Arab countries invent the earliest that bag paper dyes (Paper marbling), it is a kind of method at water surface design configuration, this paper technology is mainly to form various patterns at water or the mobile pigment of thick liquid surface operation, as produced the exquisite pattern of the forms such as smooth similar bag, and by design transfer the surface to paper or fabric.In recent years, people decorate books, picture background, pinup picture etc. with these bag paper.
Because traditional bag paper dyeing technique requires can not there be a mistake in the whole process of operation, once error to some extent not only will restart, and can waste a large amount of pigment.Therefore,, if can be highly significant by the emulation of computer realization paper skill making effect, so, not only make cost of manufacture reduce, and can reduce the wasting of resources and environmental pollution.
In recent years, more existing researchs of flowing to draw the texture with artistic effect by Computer Simulation fluid.
Current emulation mode has three classes: the emulation mode of the two dimensional fluid model based on physics, the emulation mode of polar plot and the emulation mode based on figure coordinate conversion function.Document [1] uses hydrodynamic force to gain knowledge to simulate fluid motion and realized the function of the rambling figure of drawing similar bag, but this method needs all motion paths of initialization before drafting starts, and is difficult to accomplish real-time rendering; Document [2] has proposed a kind of Real-Time Rendering based on GPU (Graphics Processing Unit), but the graphic limit generating is fuzzyyer.The method of document [3], [4] can generate clear boundary: wherein, document [3] by generating clear boundary with B-spline curves insertion method on Eulerian mesh, and document [4] adopts the mode of vector plot to draw fluid, control border according to the turbulivity of the flexibility of local boundary and speed, but these two kinds of methods can only generate unpredictable grain effect.Document [5] is expanded document [3], solve in conjunction with CIP (ConstrainedInterpolation Profile) interpolation method and MacCormack method NS (Navier-Stokes) equation that represents velocity field and fluid density field, obtain fluid boundary clearly, but in the time that simulation multiple fluid flows, each fluid all needs to build grid, in the time of continuous increase fluid, calculated amount can increase greatly.Document [6] is by mathematical notation method, drawn some and had the figure of special characteristic by the coordinate transform function of some figures.This method formation speed is very fast, but it does not reflect the flow characteristics of pigment.
List of references:
[1]Mao X,Suzuki T,Imamiya A.AtelierM:a physically based interactivesystem for creating traditional marbling textures.In:Proceedings of the 1stinternational conference on Computer graphics and interactive techniques inAustralasia and South East Asia,New York,USA:2003.79-86.
[2]Jin X,Chen S,Mao X.Computer-generated marbling textures:a GPU-baseddesign system.IEEE computer graphics and applications,2007,27(2):78-84.
[3]Acar R,Boulanger P.Digital marbling:a multiscale fluid model.IEEETransactions on Visualization and Computer Graphics,2006,12:600-614.
[4]Ando R,Tsuruno R.Vector fluid:a vector graphics depiction of surface flow.In:Proceedings of the 8th International Symposium on Non-PhotorealisticAnimation and Rendering.New York,USA:2010.129-135.
[5]Xu J,Mao X,Jin X.Non-dissipative marbling.IEEE Computer Graphics andApplications,2008,28(2):35-43.
[6]Lu S,Jaffer,A.,Jin X,Zhao H,MaoX.Mathematical Marbling.IEEEComputer Graphics and Applications,2011,99:1-1.
Summary of the invention
The problem existing based on above-mentioned prior art, the present invention proposes the computer emulation method that a kind of bag paper dyes figure, integrated fluid mechanics and polar plot technology, utilize Computer Simulation to go out to generate the pattern with artistic effect that graph outline is clear, complete, realize similar shell stone patterns.
Bag paper dyes a computer emulation method for figure, and in conjunction with the flow process of fluid Simulation pigment, its simulation realizes by the given mathematical description of any given moment convection cell state in process fluid flow; And the output that utilizes polar plot technology to realize bag paper to dye figure, the method comprises the following steps:
Step 1, builds velocity field based on Hydrodynamics Theory:
▿ · u = 0
∂ u ∂ t = - ( u · ▿ ) u - 1 ρ ▿ p + v ▿ 2 u + f
Wherein, u is fluid velocity, and ρ is fluid density, and p is pressure item, and f is external force, and v is coefficient of viscosity.
Speed territory is defined on the uniform grid of a n × n, obtains the variation of velocity field by central difference simultaneous solution equation (1) and (2)
Step 2, fluid boundary is followed the trail of and is optimized: use vectorgraph charting fluid boundary, when adding after external force, along with the continuous variation of velocity field, follow the tracks of the motion conditions on pigment border: the speed u (p that adopts bilinear interpolation method computation bound node i place i), and then calculate the reposition p of boundary node i in next moment i+1
u(p i)=t2(s2*u i,j+s1*s1*u i,j+1)+t1(s2*u i+1,j+s1*u i+1,j+1) (4)
p i+1=p i+u(p i)·Δt (5)
Step 3, Boundary filling and output: adopt the template test method fill fluid profile of template buffer memory to obtain solid fluid based on OpenGL, adopt SVG formatted output figure;
Step 4, single fluid is to the expansion of multiple fluid: single fluid simulation is expanded to multiple fluid simulation., need to consider the adhesive characteristics of different fluid, in the time of the new fluid of user add, to add to the speed v of exterior circumferential diffusion by the initial boundary node of convection cell profile, the value of speed v is subject to the impact of inherent viscosity coefficient value visc of fluid, that is:
v(i)=(1-visc)*V (6)
Wherein, v represents the speed of fluid boundary node i on speed grid, and V represents coefficient of viscosity value, and visc is the speed of 1 o'clock.
Described in fluid motion process, control the increase and decrease of boundary node by controlling node distance threshold d, keep the flatness of fluid boundary, degree of crook based on local boundary carrys out adjustable range threshold value d, guarantee that distance between two neighborhood of nodes is between d and d/2, reduce node in the place of contour smoothing, increase node in the place of border bending.
The distance threshold d at boundary node i place icomputing formula be:
d i = d max c i curvature
Wherein, d maxrepresent the ultimate range between fluid boundary neighborhood of nodes.
Figure BDA0000132880150000042
for the curvature at node i place.
Compared with the conventional method, bag paper of the present invention dyes the computer emulation method of figure, not only can realize the Computer Simulation that bag paper dyes, and simulation result can farthest approach actual bag paper and dye the graphical effect that skill obtains, fidelity is high.
Brief description of the drawings
Fig. 1 is the computer emulation method overall flow figure that bag paper dyes figure;
Fig. 2 is bilinear interpolation algorithm schematic diagram;
Fig. 3 is the unordered texture graphics schematic diagram simulating by emulation mode of the present invention;
Fig. 4 is the decorative pattern reason pictorial diagram simulating by emulation mode of the present invention;
Fig. 5 is for passing through fluid boundary of the present invention flow schematic diagram towards periphery;
Simulation result when Fig. 6 (a) and 5 (b) represent respectively inviscid difference and toughness difference.
Embodiment
Below in conjunction with accompanying drawing, specific embodiment of the invention is elaborated:
As shown in Figure 1, be computer emulation method overall flow figure of the present invention, the method mainly comprises the following steps:
1. build fluid velocity field.
In order to simulate the flow process of pigment, the state of any given moment convection cell that must be in simulation process has a mathematical description, wherein most important part is the velocity field of fluid, speed has not only determined how fluid itself moves, and it also affects relevant fluid around simultaneously.At present most of research about simulation fluid is all based on NS system of equations, and it has described variation and the relation thereof of internal fluid speed and pressure.Because equation is nonlinear, exact solution cannot be asked for, and can only use the method approximate solution of discretize.The present invention adopts incompressible fluid equation, as follows:
▿ · u = 0 - - - ( 1 )
∂ u ∂ t = - ( u · ▿ ) u - 1 ρ ▿ p + v ▿ 2 u + f - - - ( 2 )
Wherein, u is fluid velocity, and ρ is fluid density, and p is pressure item, and f is external force, and v is coefficient of viscosity.
The present invention is defined in speed territory on the uniform grid of a n × n, obtains the variation of velocity field by simultaneous solution equation (1) and (2).
2. fluid boundary is followed the trail of and is optimized
Polar plot is the figure describing by mathematical method, can not affect the sharpness of figure while zooming in or out figure arbitrarily, and therefore the present invention takes to represent fluid boundary based on the method for polar plot, and then represented region, border is filled.
First, initialization fluid profile border.In traditional bag paper dyeing technique, pigment drips to liquid surface to connect rotund shape, therefore chooses some discrete points on initial filled circles zone boundary initial boundary node as this fluid.When adding after external force, along with the continuous variation of velocity field, need to follow the tracks of the motion conditions on pigment border.
The present invention adopts the speed u (p at bilinear interpolation method computation bound node i place i), specifically by shown in formula (3).Obtain the reposition p of boundary node i in next moment according to formula (4) again i+1.
u(p i)=t2(s2*u i,j+s1*s1*u i,j+1)+t1(s2*u i+1,j+s1*u i+1,j+1) (3)
p i+1=p i+u(p i)·Δt (4)
Pi is the coordinate (x, y) of sampled point, s1, s2, t1, the scale-up factor that t2 is bilinear interpolation, linear interpolation algorithm schematic diagram as shown in Figure 2.
Only those boundary nodes of tracking initiation can not well be described fluid profile, therefore need the new boundary node of suitable interpolation to obtain fluid boundary true to nature.The present invention controls the increase and decrease of boundary node by controlling node distance threshold d, the cardinal rule of following is to guarantee that distance between two neighborhood of nodes is between d and d/2.In order to reduce calculated amount, obtain fluid boundary level and smooth, true to nature, the degree of crook that the present invention is based on local boundary carrys out adjustable range threshold value d, reduce some nodes in the smoother place of profile, and more bending place increases some nodes more on border.
The distance threshold d at boundary node i place icomputing formula be:
d i = d max c i curvature - - - ( 5 )
Wherein, d maxrepresent the ultimate range between fluid boundary neighborhood of nodes.
Figure BDA0000132880150000072
for the curvature at node i place.
3. Boundary filling and output
Obtain at any time after the positional information of boundary node, can generate easily the polygon being formed by boundary node, next need to fill this polygonal region.The template test method fill fluid profile that the present invention is based on OpenGL employing template buffer memory, obtains solid fluid.While zooming in or out arbitrarily based on polar plot, can not affect the characteristic of the sharpness of figure, according to SVG open standard, adopt SVG formatted output figure, use the method well to avoid distortion phenomenon.
4. single fluid is to the expansion of multiple fluid
While equally obtaining abundant figure for image-stone line paper dyeing technique, the drafting of only simulating single fluid is inadequate, and we need to expand to method of the present invention in the mobile simulation of multiple fluid.If the method proposing before adopting, so different fluids has identical adhesive characteristics, and this way does not meet pigment attribute rule.
Therefore, in the time drawing multiple fluid, need to consider the adhesive characteristics of different fluid, in order visually to allow people experience bag paper dyeing technique, can observe the different attribute between different pigment fluids, the present invention is that fluid has added inherent viscosity coefficient.Be not difficult to find by observation, in visual effect, general people can only observe near the impact that different fluid interphase interaction produces profile border, therefore in the time of the new fluid of user add, can add to the speed v of exterior circumferential diffusion by the initial boundary node of convection cell profile, as shown in Figure 2, the value of speed v is subject to the impact of inherent viscosity coefficient value visc of fluid, that is:
v(i)=(1-visc)*V (6)
Wherein, v represents the speed of fluid boundary node i on speed grid, and V represents coefficient of viscosity value, and visc is the speed of 1 o'clock, in the system realizing herein, and V=1.Simulation result when Fig. 3 (a) and 3 (b) represent respectively inviscid difference and toughness difference.
The present invention has mainly realized the fluid simulation of two kinds of grain effect figures, and one is rambling texture maps (Fig. 4), and a kind of have the figure (Fig. 5) of special pattern effect for class floweriness etc.

Claims (2)

1. bag paper dyes a computer emulation method for figure, and in conjunction with the flow process of fluid Simulation pigment, its simulation realizes by the given mathematical description of any given moment convection cell state in process fluid flow; And the output that utilizes polar plot technology to realize bag paper to dye figure, it is characterized in that, the method comprises the following steps:
Step 1, builds velocity field based on Hydrodynamics Theory:
▽·u=0 (1)
∂ u ∂ t = - ( u · ▿ ) u - 1 ρ ▿ p + v ▿ 2 u + f - - - ( 2 )
Wherein, u is fluid velocity, and ρ is fluid density, and p is pressure item, and f is external force, and ν is coefficient of viscosity;
Speed territory is defined on the uniform grid of a n × n, obtains the variation of velocity field by central difference simultaneous solution equation (1) and (2);
Step 2, fluid boundary is followed the trail of and is optimized: use vectorgraph charting fluid boundary, when adding after external force, along with the continuous variation of velocity field, follow the tracks of the motion conditions on pigment border: the speed u (p that adopts bilinear interpolation method computation bound node i place i), and then calculate the reposition p of boundary node i in next moment i+1
u(p i)=t2(s2*u i,j+s1*s1*u i,j+1)+t1(s2*u i+1,j+s1*u i+1,j+1)
p i+1=p i+u(p i)·Δt
Wherein, p ithe coordinate of sampled point, p i+1the coordinate in next moment of sampled point, the scale-up factor that s1, s2, t1, t2 are bilinear interpolation; u i+1, j, u i, j+1, u i+1, j, respectively at the fluid velocity of nxn grid diverse location place node: u i,jrepresentative is arranged in uniform grid i, the fluid velocity of the node i of j place; u i+1, jrepresentative is arranged in uniform grid i+1, the fluid velocity of the node i of j place; u i, j+1represent i in uniform grid, the node i of j+1 place fluid velocity;
Step 3, Boundary filling and output: adopt the template test method fill fluid profile of template buffer memory to obtain solid fluid based on OpenGL, adopt SVG formatted output figure;
Step 4, single fluid is to the expansion of multiple fluid: single fluid simulation is expanded to multiple fluid simulation, need to consider the adhesive characteristics of different fluid, in the time of the new fluid of user add, add to the speed v of exterior circumferential diffusion by the initial boundary node of convection cell profile, the value of speed v is subject to the impact of inherent viscosity coefficient value visc of fluid, that is:
v(i)=(1-visc)*V
Wherein, v represents the speed of fluid boundary node i on speed grid, and V represents coefficient of viscosity value, and visc is the speed of 1 o'clock.
2. bag paper as claimed in claim 1 dyes the computer emulation method of figure, it is characterized in that, described method is further comprising the steps of: in fluid motion process, control the increase and decrease of boundary node by controlling node distance threshold d, keep the flatness of fluid boundary, degree of crook based on local boundary carrys out adjustable range threshold value d, guarantee that distance between two neighborhood of nodes is between d and d/2, reduce node in the place of contour smoothing, place in border bending increases node, the distance threshold d at boundary node i place icomputing formula be:
d i = d max c i curvature
Wherein, d maxrepresent the ultimate range between fluid boundary neighborhood of nodes, for the curvature at node i place.
CN201210018768.2A 2012-01-20 2012-01-20 Computer simulation method of paper marbling image Expired - Fee Related CN102609577B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210018768.2A CN102609577B (en) 2012-01-20 2012-01-20 Computer simulation method of paper marbling image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210018768.2A CN102609577B (en) 2012-01-20 2012-01-20 Computer simulation method of paper marbling image

Publications (2)

Publication Number Publication Date
CN102609577A CN102609577A (en) 2012-07-25
CN102609577B true CN102609577B (en) 2014-07-02

Family

ID=46526945

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210018768.2A Expired - Fee Related CN102609577B (en) 2012-01-20 2012-01-20 Computer simulation method of paper marbling image

Country Status (1)

Country Link
CN (1) CN102609577B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5716498A (en) * 1996-04-12 1998-02-10 Witco Corporation Process for softening paper in manufacture
CN102121212A (en) * 2010-11-25 2011-07-13 山东凯丽特种纸股份有限公司 Method for producing marble art paper

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5716498A (en) * 1996-04-12 1998-02-10 Witco Corporation Process for softening paper in manufacture
CN102121212A (en) * 2010-11-25 2011-07-13 山东凯丽特种纸股份有限公司 Method for producing marble art paper

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王淑颖,王宏付.《计算机辅助扎染图案设计》.《纺织科技进展》.2009,(第4期),第48、49、56页. *

Also Published As

Publication number Publication date
CN102609577A (en) 2012-07-25

Similar Documents

Publication Publication Date Title
WO2018040511A1 (en) Method for implementing conversion of two-dimensional image to three-dimensional scene based on ar
CN104123747B (en) Multimode touch-control three-dimensional modeling method and system
CN101303772A (en) A Nonlinear 3D Face Modeling Method Based on Single Image
US7349832B2 (en) Water particle manipulation
CN101587595A (en) Deformation method based on control meshes
CN103914862A (en) Pencil sketch simulating method based on edge tangent stream
CN104537175A (en) SPH-algorithm-based fluid simulation method and device
CN109002630A (en) A kind of rapid simulation method of elastic material
CN107423511A (en) Meet to immerse border implicit iterative solving method without sliding boundary condition and the condition of continuity
KR20130078102A (en) Method for simulating fluid
CN105279781B (en) Fluid animation generation method based on the fusion of more precision
CN104156995A (en) Production method for ribbon animation aiming at Dunhuang flying image
Xiao et al. An improved model for bubble formation using the boundary-integral method
CN104463937B (en) Animation producing method and device based on irregularly shaped object
CN100416611C (en) A 3D facial animation production method based on mesh topology modeling
CN102609577B (en) Computer simulation method of paper marbling image
CN102663782B (en) Painting rendering method based on stroke texture analysis
CN114611423A (en) Three-dimensional multiphase compressible fluid-solid coupling rapid calculation method
Ren et al. Real-time high-fidelity surface flow simulation
CN104318599A (en) High-precision fluid animation modeling method based on geometrical features
CN100587723C (en) 3D Animation Cartoon Flame Generation Method
Akinci Interface handling in smoothed particle hydrodynamics
CN104143204A (en) A Moving Least Squares 2D Character Deformation Method Considering Topology
CN101577008A (en) Method for rapidly and accurately generating marbleizing glaze
CN101950428A (en) Terrain elevation value-based texture synthesis method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140702

Termination date: 20220120