CN1773516A - Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm - Google Patents

Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm Download PDF

Info

Publication number
CN1773516A
CN1773516A CN 200510115184 CN200510115184A CN1773516A CN 1773516 A CN1773516 A CN 1773516A CN 200510115184 CN200510115184 CN 200510115184 CN 200510115184 A CN200510115184 A CN 200510115184A CN 1773516 A CN1773516 A CN 1773516A
Authority
CN
China
Prior art keywords
ink
diffusion
paper
water
writing brush
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.)
Granted
Application number
CN 200510115184
Other languages
Chinese (zh)
Other versions
CN100338612C (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 CNB2005101151847A priority Critical patent/CN100338612C/en
Publication of CN1773516A publication Critical patent/CN1773516A/en
Application granted granted Critical
Publication of CN100338612C publication Critical patent/CN100338612C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

An ink and water color transmission model based on brush pen and rice paper consists of brush pen model and rice paper model on computer. It is featured as using fleece structure as rice paper model, forming said structure by coma connected by fiber bundle, utilizing coma as container and carrier of ink and water color and using fiber bundle as guide tube to transmit ink and water color. Its artificial algorithm includes ink and water color transmission on virtual brush pen and on virtual rice paper as well as ink and water color transmission between virtual brush pen and virtual rice paper on computer.

Description

Ink mode and simulation algorithm based on writing brush and rice paper
[technical field]: the present invention relates to a kind of computer art simulation technical field, particularly simulate rice paper, and the transmission of ink, carry out computer simulation, realize the Computer Simulation of the peculiar artistic effect of ink and wash by one-tenth picture mechanism to Chinese ink painting.
[background technology]: along with the develop rapidly that computer graphics and feeling of unreality are played up technology, the Computer Simulation of Chinese ink painting's art also becomes the research focus that everybody pays close attention to gradually.Pen, China ink, paper, inkstone are the writing brush, ink stick, ink slab and paper of Chinese ink painting, i.e. four kinds of basic draw tools and material, wherein, pen and paper are the two big main materials that show Chinese ink painting's artistic effect, special-effects such as the diffusion that they produce, imbibition, pen touch, form the principal mode difference of drawing in Chinese painting and west, also formed the unique artistic glamour of traditional Chinese Painting.Therefore, in the Computer Simulation of Chinese Painting art, except writing brush is carried out the analogue simulation, another important techniques main points are exactly the Computer Simulation of ink mode, be further divided on the writing brush, between pen and the paper with paper on ink mode (diffusion, precipitation, evaporation etc.).The research of ink mode combines with the writing brush The Realization of Simulation; just can realize complete interactive traditional Chinese Painting emulation drawing system, it technology package design, advertisement design, image identification design, decorative art of book, literal design, production of film and TV, digital art creation in addition ancient times precious ink and wash the protectiveness reparation study and all there is higher actual application value in imitation field such as duplicate.
Research to ink and wash emulation is many, but seldom directly handle on the writing brush and pen and paper between ink transmission, and adopt a kind of model (such as texture mapping) of experience to draw a road more.The method of texture mapping is owing to lack dirigibility, so the artistic effect that can show is limited and simulated effect is also untrue, nature.Broadcast algorithm is the most important parts of the ink mode on the paper, and is more about its technology, such as particIe system, partial balancing's model (PDE), lattice Boltzmann equation (LBE) etc.But,, must construct the paper matrix type in order to produce the diffusion effect of natural reality because diffusion is undivided with paper.More typically have about the technology of paper matrix type the paper matrix type is divided into three layers of superficial layers, absorption layer, sedimentary deposit by function, but owing on the physical fiber structure, rice paper is not simulated, broadcast algorithm lacks randomness, so their final simulated effect is unsatisfactory.
[summary of the invention]: the objective of the invention is to solve and have stiff, the problem of nature, very flexible, expressive force shortage not in a road in the active computer simulation drawing, a kind of ink mode based on the rice paper model is provided, simulate various typical writing brush road, embody the emulation diffusion effect of natural reality; The real-time requirement of satisfying interactive drawing is simultaneously drawn in road.
Ink mode and simulation algorithm based on writing brush and rice paper provided by the invention, be divided into three parts: ink specifically comprises in exchange and the transmission of ink in virtual rice paper between virtual brush and virtual rice paper of the transmission on the virtual brush, ink:
The first, rice paper modelling
This rice paper model adopts three-decker, is followed successively by: contact layer---be responsible for ink exchange with writing brush; Diffusion layer---finish diffusion, deposition and the moisture evaporation operation of ink in paper; Sedimentary deposit---preserve the black information that deposits, and finally be mapped to it on screen;
Every layer of rice paper model is made up of the coma that fibrous bundle couples together for the simulation fiber net structure, and coma is the container and the carrier of ink, and fibrous bundle is the conduit of ink transmission; Wherein,
The formation rule of rice paper model fibre net:
A) fiber distributes and obeys " overall situation is consistent; the part at random ", so-called " overall situation is consistent " is meant from whole rice paper plane, the contained fibre weight of each pixel area is " unanimity " on the plane, " unanimity " is meant the fibre weight of each pixel regarded as a random quantity, these random quantitys have identical average so, Normal Distribution all, " part at random " is meant that then it is completely random that the fiber in each pixel plane zone distributes, and this rule is the key of the irregular distribution of simulation rice paper fibre structure;
B) the equal Normal Distribution of the number of fibrous bundle, length and direction;
C) generating algorithm of normal distribution random number: we use a kind of random digit generation method commonly used: " conversion sampling ", and basic procedure:
Proc NRand (in u, in diff out result) //u is an average, diff is a variance
r 1←Rand()
r 2←Rand()
C ← - 21 n r 1 × cos 2 π r 1 //C obeys standardized normal distribution
Result ← u+diff * C//be random number of asking
End?Proc
Rice paper web constructions algorithm:
Every fleece all need generate by calculating initialized the time, and will make the fiber distribution obey " overall situation is consistent, and the part is at random ", and the step of structure is as follows:
The first step, go up to distribute fiber at " cell matrix ": each pixel further is divided into n * n " cell ", and we claim the paper plane matrix after the refinement to be " cell matrix ", with rice paper density parameter D*G MAXBe average, wherein G MAXFor maximum fiber is counted, generate the random number N of a Normal Distribution gAs the amount that each pixel area should distribute fiber, Random assignment N in each pixel area gIndividual " fiber point "
N g=NRand (D*G MAX, diff), diff is a constant
Second step, conjugate fiber group: the distribution situation that goes up " fiber point " according to " cell matrix " is combined into a coma to adjacent " fiber point ";
The 3rd step, go up the distributed fibers bundle: to each " cell " position, according to the average D*F of user's appointment at " cell matrix " MAXGenerate a normal random number N with variance diff f, regeneration N fRoot length and direction be the fiber bundle F of Normal Distribution all Xy(1, α):
N f=NRand (D*F MAX, diff), diff is a constant
The 4th step, connect coma: calculates every fibrous bundle the coma of process, and connect with fibrous bundle, constitute and simulate the fiber net structure rice paper;
The second, the initialization of ink on virtual brush distributes
Virtual 3D Chinese brush model
This Chinese brush model comprises two parts of skeleton and surface, skeleton is made up of spine and auxiliary surface, and spine is positioned on the axis of skeleton, and n node distributing on spine---be referred to as key node in the model, distance between adjacent key node is an arithmetic progression, tolerance d=l λ (n 2-n), wherein l is a writing brush brush length, λ adjusts the factor; Auxiliary surface is the center with these key nodes promptly, and auxiliary surface is vertical with the axis, has the m/2 bar to cross the axis at its center on the auxiliary surface, and adjacent axis angle equates that the end points of these axis is called auxiliary node in model; Brush model adds the surface with the variation of para-curve simulation auxiliary surface initial radium on the model skeleton, finish the brush geometric model and set up;
The initialization ink distributes
Dip in China ink, the user provides is black population Ink on the key point of writing brush skeleton at every turn CenterUnder the vertical situation of Chinese brush model, get an one cross section, it is auxiliary surface, the ink information stores is on the key node of writing brush skeleton, the China ink amount of being had a few as this auxiliary surface with the black population of key node, or adopt radial pattern diffusion and two kinds of black dispersal patterns of vectorial type diffusion to calculate the black population of other parts of writing brush cross section: the radial pattern diffusion, promptly the mass colour of central point outwards successively decreases (minimum value is 0) with certain step-length, and the diffusion formula is as follows:
Ink radio=Ink center*(1-R step*D)
D is the distance of impact point and central point, R StepBe changed factor
The diffusion of vector (direction) type, promptly along become the direction at θ angle to successively decrease (increasing on negative direction) with the x+ axle, the diffusion formula is as follows with certain step-length for the mass colour of central point:
Ink vector=Ink center*(1-V step*D)
D represents that the line of the key point on impact point and the auxiliary surface exists V StepBe changed factor
Projected length on the dispersal direction (can for negative)
It is the weighted sum of these two kinds of dispersal patterns that final ink distributes:
Ink dest=Ink radio*W R+Ink vector*W V
W RAnd W VBe respectively the weights of radiation profiles and vector distribution
The second, the exchange of ink between a paper
Calculate the person's handwriting of writing brush earlier, the i.e. pen and the contact area of paper, with a key node is the center, when this cross section and paper intersect, the interface portion of this cross section and paper is a straight line, and this intersection is defined as the person's handwriting element, and its two end points are defined as auxiliary point and following auxiliary point respectively, the projection of key node on this intersection is defined as projected centre point, and the ink information on the person's handwriting is stored by projected centre point.Whole person's handwriting is made of several person's handwriting elements, and the ink information of the projected centre point of each person's handwriting element has determined the ink of whole person's handwriting to distribute jointly;
When virtual brush and rice paper bump when promptly contacting, in the person's handwriting zone, will carry out the ink exchange between pen and the paper coma, this exchange is two-way, the ink information of the cross section by calculating contact moment writing brush and the corresponding contact face of paper, can judge the transmission direction of ink, after exchange was finished, the ink on writing brush and the paper all needed redistribution;
Redistributing of ink on the writing brush
For writing brush, apart from the distance of writing brush and paper surface of contact and the maximal value of ink loss or acquisition, obtain the ink amplitude of variation of various piece, and then obtain the effect of the even variation of the ink on the whole writing brush by the various piece on the calculating writing brush;
If " original person's handwriting " that writing brush contacts with paper is S, then on the writing brush not on original person's handwriting the ink information of some key nodes/auxiliary point p be formulated as:
Inkp’=Inkp-(1-Dp(S)/Dmax)*Inktran_avg*k
Wherein Inkp ' is the black population of transmission back pen, Inkp is the black population before the transmission, Dp (S) is the mean distance of a p to S, Dmax is that key node on the writing brush is to the ultimate range of S, Inktran_avg is a writing brush to the average black population of original person's handwriting transmission, and k is what to be used for controlling when certain ink on the writing brush changes the coverage of writing brush, k value 0-1, k is more little, and coverage is more little;
Equally, the transmission for water on the writing brush is formulated as:
Waterp’=Waterp-(1-Dp(S)/Dmax)*Watertran_avg*k’
Many owing to being easy on the ink transfer ratio writing brush on the rice paper, so k ' is greater than k;
Three, the transmission of ink in rice paper
The transmission of ink between rice paper is divided into: the volatilization of diffusion, deposition, moisture and ink stack;
Diffusion: the diffusion layer that is diffused in the paper matrix type is realized, by comparing the ink concentration of each coma in the diffusion layer, determine the direction of diffusion and the value of diffusion, it is as follows that the transmission by fibrous bundle is embodied as chain reaction process (see figure 9) diffusion process concrete steps with diffusion:
● calculate diffusion conditions, establish the sticking China ink of virtual rice paper and sticking water-based be respectively Ink_Stick and
Water_Stick, the black population of coma and water particle subnumber are Ink and Water, then diffusion
Condition is:
Ink>Ink_Stick and Water>Water_Stick
The coma that satisfies above-mentioned condition is called " activity " coma;
● to each " activity " coma, the cell average moisture content Water_Avg that calculates it reaches average
Contain China ink amount Ink_Avg;
● to this coma, calculate the cell average moisture content of its each adjacent fiber group
Water_Avg ' and on average contain China ink amount Ink_Avg ', the corresponding value that itself and center fiber are rolled into a ball
Make comparisons, when:
1. Water_Avg>Water_Avg ' or
2. Water_Avg<Water_Avg ' but Ink_Avg>Ink_Avg '
The time, diffusion takes place, and transmits ink by center fiber group to its adjacent fibre group, transmission quantity by with
Following formula decision:
The water transmission quantity=(Water-Water ')/(Fibre_Avg+1)
The China ink transmission quantity=(Ink-Ink ')/(Fibre_Avg+1)
Wherein Water and Water ' represent the water particle of center fiber group and adjacent fibre group respectively
Number, Ink and Ink ' are represented the black population of center fiber group and adjacent fibre group respectively,
Fibre_Avg represents the fibrous bundle quantity that each coma on average connects in the paper matrix type, in situation
1. descend ink to transmit simultaneously, be called " moving water transmission ", 2. have only the China ink transmission down, claim in situation
Be " moving China ink transmission ";
Diffusion takes to continue model, i.e. diffusion runs through whole drawing process, diffusion is (generally being from drawing first road) Once you begin, reach the balance (see figure 10) with regard to the ink concentration of constantly carrying out between each coma continuously, the process that reaches balance is determined by the ink information on the rice paper diffusion layer fully, the process of drawing a road with the user is irrelevant, to spread and accept a user road and be divided into two independently threads, their shared data is exactly the ink information of diffusion layer, the user draws a new road will constantly change ink information on the diffusion layer, the intermediate value of diffusion is changed, thereby obtain various effects;
Deposition: the ink between virtual rice paper deposits dual mode, a kind of be writing brush contact with paper and contact layer on form the person's handwriting of writing brush after, deposition from this person's handwriting to sedimentary deposit, deposition is based on the ink information and the predefined deposition ratio that form person's handwriting on the contact layer; Second kind of deposition occurs in the diffusion process, deposited to sedimentary deposit by diffusion layer, and deposition is constantly carried out and constantly taken place with diffusion, and deposition depends on the ink information on the diffusion layer;
1) volatilization of water: the volatilization of water occurs in diffusion layer equally, and with the passing of time, the water on the diffusion layer constantly volatilizees with certain proportion and does until China ink;
2) ink stack: adopt the diffusion model that continues here, it is unified that stack and diffusion are obtained; Stack is actually and has changed the ink amount that does not spread the diffusion layer of finishing, and the diffusion effect of Overlay and ink is final all to be realized by this diffusion process that constantly changes initial value;
Four, the drafting in a road
The drafting in road need be satisfied real-time requirement, and when needs were drawn road, program loaded the ink information that is deposited on the sedimentary deposit and by be loaded as the OpenGL texture or the GDI bitmap shows on screen; Because diffusion continues to carry out, a therefore next road that will show is actually this previous road to be continued diffusion or has added a new road simultaneously and form the effect of stack.
Advantage of the present invention and good effect: 1, better controllability, the user can distribute by the initialization of control ink on virtual brush, controls the black process of dipping in, thereby can draw out multiple mass colour variation effect; The user can control the structural parameters of virtual rice paper, reaches the purpose of the various rice paper effects of simulation, and such as density D (seeing Figure 12), density is big more, and the rice paper fiber is close more, and the ink diffusion effect is fine and smooth more; Otherwise diffusion effect is coarse more.The user can also control diffusion (seeing Figure 13) by the water absorbing force of control rice paper, and water absorbing force is big more, and diffusion is big more; Otherwise diffusion is more little.2, diffusion effect true to nature more naturally, owing to used the physical sheets model, an emulation road has diffusion effect true to nature very naturally.3, dynamic drawing process intuitively, the ink transmission mechanism among the present invention is controllable, and a road is drawn and the overall process of diffusion all is visible, and along with user's drafting process, the diffusion in a road is also being carried out step by step, sees Figure 11 and Figure 14.4, higher real-time, the algorithm that adopts among the present invention has also guaranteed the needed real-time of interactive drawing under in order to be effective prerequisite true to nature.
[description of drawings]:
Fig. 1 is that process flow diagram is drawn in an interactive road;
Fig. 2 is a skeleton synoptic diagram in the 3D virtual brush brush model;
Fig. 3 is the writing brush schematic cross-section;
Fig. 4 is a key point mass colour diffusion synoptic diagram;
Fig. 5 is a three-ply paper model synoptic diagram;
Fig. 6 is the fiber net structure synoptic diagram of paper matrix type;
Fig. 7 is that coma generates synoptic diagram;
Fig. 8 connects the coma synoptic diagram;
Fig. 9 is the diffusing step synoptic diagram;
Figure 10 continues the diffusion schematic flow sheet;
Figure 11 is that person's handwriting progressively manifests the process synoptic diagram;
Figure 12 is the person's handwriting diffusion effect synoptic diagram on the different rice paper (density difference);
Figure 13 is the person's handwriting diffusion effect synoptic diagram on the different rice paper (water absorbing force difference);
Figure 14 draws a road process synoptic diagram.
[embodiment]:
Embodiment 1:
This ink mode combines with existing any three-D Chinese brush model, just can constitute complete interactive ink and wash and draw the emulation drawing system.When user's operation input apparatus (as mouse) made Chinese brush model contact with the paper matrix type, the ink transmission course began, and diffusion process starts simultaneously, and as time goes by, a road of writing brush progressively spreads shaping.Here with an example explanation implementation process (as Fig. 1 and shown in Figure 14):
The first step, go up to distribute fiber at " cell matrix ": each pixel further is divided into n * n (system default n=4) individual " cell ", and we claim the paper plane matrix after the refinement to be " cell matrix ", with rice paper density parameter D*G MAXBe average, wherein G MAXFor maximum fiber is counted, generate the random number N of a Normal Distribution g, as N g=9 amounts that should distribute fiber as each pixel area, Random assignment N in each pixel area gIndividual " fiber point " seen shown in Figure 7.
N g=NRand (D*G MAX, diff), diff is a constant
Second step, conjugate fiber group: the distribution situation that goes up " fiber point " according to " cell matrix " is combined into a coma to adjacent " fiber point ";
The 3rd step, go up the distributed fibers bundle: to each " cell " position, according to the average D*F of user's appointment at " cell matrix " MAXGenerate a normal random number N with variance diff f, regeneration N fRoot length and direction be the fiber bundle F of Normal Distribution all Xy(l, α):
N f=NRand (D*F MAX, diff), diff is a constant
The 4th step, connect coma: calculates every fibrous bundle the coma of process, and connect with fibrous bundle, see Fig. 8, constitute and simulate the fiber net structure rice paper, see Fig. 6;
D, F in the initial value MAX, G MAXGet initial value respectively with diff:
D=0.4 G MAX=16 F MAX=4.0 Diff=1.0
Be the signal that connects coma as shown in Figure 8.
Virtual 3D Chinese brush model
Shown in Fig. 2,3, this Chinese brush model comprises two parts of skeleton and surface, and skeleton is made up of spine 4 and auxiliary surface 3, and spine is positioned on the axis of skeleton, n (as 20) key node 1, tolerance d=l λ/(n at the first-class difference cloth of spine 2-n), wherein l is writing brush brush length (system default is 10.0), λ adjusts the factor (system default is 2.0); Auxiliary surface is the center with these key nodes promptly, and auxiliary surface is vertical with the axis, has m/2 bar (as 4) to cross the axis at its center on the auxiliary surface, and adjacent axis angle equates that the end points of these axis is called auxiliary node 2 in model; Brush model adds the surface with the variation of para-curve simulation auxiliary surface initial radium on the model skeleton, finish the brush geometric model and set up;
The initialization ink distributes
1) user dips in China ink earlier, promptly sets the China ink amount Ink on the key node of writing brush skeleton Center,=110.0.Setting makes
Measure as the China ink amount Ink that is had a few with China ink on the key point Dest=Ink Center
The radial pattern diffusion, promptly the mass colour of central point outwards successively decreases (minimum value is 0) with certain step-length, shown in Fig. 4 (a), first step diffusion:
Ink radio=Ink center*(1-R step*D)=110*(1-0.3*0.5)=93.5
The diffusion of vector (direction) type, promptly along become the direction at θ angle to successively decrease (increasing on negative direction) with the x+ axle, shown in Fig. 4 (b), the first step spreads the mass colour of central point with certain step-length:
Ink vector=Ink center*(1-V step*D)=110*(1-0.2*0.5)=99
It is the weighted sum of these two kinds of dispersal patterns that final ink distributes, shown in Fig. 4 (c):
Ink dest=Ink radio*W R+Ink vector*W V=93.5*0.6+99*0.4=95.7
Redistributing of ink on the writing brush
If " original person's handwriting " that writing brush contacts with paper is S, then on the writing brush not on original person's handwriting the ink information of some key nodes/auxiliary point p be formulated as:
Inkp”=Inkp-(1-Dp(S)/Dmax)*Inktran_avg*k
Wherein Inkp ' is the black information of transmission back pen, Inkp is the black population before the transmission, Dp (S) is the mean distance of a p to S, Dmax is that key node on the writing brush is to the ultimate range of S, Inktran_avg is a writing brush to the average China ink value of original person's handwriting transmission, k be used for controlling when on the writing brush during variation of certain ink to the coverage of writing brush, k value 0-1, k is more little, and coverage is more little;
Equally, the transmission for water on the writing brush is formulated as:
Waterp’=Waterp-(1-Dp(S)/Dmax)*Watertran_avg*k’
K ' should be greater than k; K and k ' get 0.1 and 0.8 respectively in the model.
2) user sets paper parameter: density parameter D=0.5, water absorbing force parameter A=0.6.Generate virtual rice paper.As shown in Figure 5, wherein: 7 contact layers, 8 diffusion layers, 9 sedimentary deposits.Be the fiber net structure of paper matrix type in addition as shown in Figure 6.Figure 12 and 13 has shown the different-effect of the paper matrix type of different parameters
3) user's moving three dimension Chinese brush model calculates person's handwriting, and the China ink on the pen passes on the paper, and the China ink on the pen is reallocated, and the China ink on the paper spreads, volatilizees, precipitates.So can see that the person's handwriting of writing brush spreads gradually and come, even after the user stops pen, still can see the diffusion that a road continues under the driving of superfluous water.Effect Figure 9 shows that diffusing step as shown in Figure 7, Figure 10 shows that to continue the diffusion flow process.

Claims (1)

1, a kind of ink mode and simulation algorithm based on writing brush and rice paper, it is characterized in that this ink mode is divided into three parts: ink specifically comprises in exchange and the transmission of ink in virtual rice paper between virtual brush and virtual rice paper of the transmission on the virtual brush, ink:
The first, rice paper modelling
This rice paper model adopts three-decker, is followed successively by: contact layer---be responsible for ink exchange with writing brush; Diffusion layer---finish diffusion, deposition and the moisture evaporation operation of ink in paper; Sedimentary deposit---preserve the black information that deposits, and finally be mapped to it on screen;
Every layer of rice paper model is made up of the coma that fibrous bundle couples together for the simulation fiber net structure, and coma is the container and the carrier of ink, and fibrous bundle is the conduit of ink transmission; Wherein,
The formation rule of rice paper model fibre net:
A) fiber distributes and obeys " overall situation is consistent; the part at random ", so-called " overall situation is consistent " is meant from whole rice paper plane, the contained fibre weight of each pixel area is " unanimity " on the plane, " unanimity " is meant the fibre weight of each pixel regarded as a random quantity, these random quantitys have identical average so, Normal Distribution all, " part at random " is meant that then it is completely random that the fiber in each pixel plane zone distributes, and this rule is the key of the irregular distribution of simulation rice paper fibre structure;
B) the equal Normal Distribution of the number of fibrous bundle, length and direction;
C) generating algorithm of normal distribution random number: we use a kind of random digit generation method commonly used: " conversion sampling ", and basic procedure:
Proc NRand (in u, in diff, out result) //u is an average, diff is a variance
r 1←Rand()
r 2←Rand()
C ← - 2 ln r 1 × cos 2 πr 2 //C obeys standardized normal distribution
Result ← u+diff * C//be random number of asking
End?Proc
Rice paper web constructions algorithm:
Every fleece all need generate by calculating initialized the time, and will make the fiber distribution obey " overall situation is consistent, and the part is at random ", and the step of structure is as follows:
The first step, go up to distribute fiber at " cell matrix ": each pixel further is divided into n * n " cell ", and we claim the paper plane matrix after the refinement to be " cell matrix ", with rice paper density parameter D*G MAXBe average, wherein G MAXFor maximum fiber is counted, generate the random number N of a Normal Distribution gAs the amount that each pixel area should distribute fiber, Random assignment N in each pixel area gIndividual " fiber point "
N g=NRand (D*G MAX, diff), diff is a constant
Second step, conjugate fiber group: the distribution situation that goes up " fiber point " according to " cell matrix " is combined into a coma to adjacent " fiber point ";
The 3rd step, go up the distributed fibers bundle: to each " cell " position, according to the average D*F of user's appointment at " cell matrix " MAXGenerate a normal random number N with variance diff f, regeneration N fRoot length and direction be the fiber bundle F of Normal Distribution all Xy(1, α):
N f=NRand (D*F MAX, diff), diff is a constant
The 4th step, connect coma: calculates every fibrous bundle the coma of process, and connect with fibrous bundle, constitute and simulate the fiber net structure rice paper;
The second, the initialization of ink on virtual brush distributes
Virtual 3D Chinese brush model
This Chinese brush model comprises two parts of skeleton and surface, skeleton is made up of spine and auxiliary surface, and spine is positioned on the axis of skeleton, is distributed with n node on spine---be referred to as key node in the model, distance between adjacent key node is an arithmetic progression, tolerance d=l λ/(n 2-n), wherein l is a writing brush brush length, λ adjusts the factor; Auxiliary surface is the center with these key nodes promptly, and auxiliary surface is vertical with the axis, has the m/2 bar to cross the axis at its center on the auxiliary surface, and adjacent axis angle equates that the end points of these axis is called auxiliary node in model; Brush model adds the surface with the variation of para-curve simulation auxiliary surface initial radium on the model skeleton, finish the brush geometric model and set up;
The initialization ink distributes
The amount of ink adopts population to represent, promptly shows what of water with the water particle numerical table, represents what of China ink with black population;
Dip in China ink, the user provides is black population Ink on the key point of writing brush skeleton at every turn CenterUnder the vertical situation of Chinese brush model, get an one cross section, it is auxiliary surface, the ink information stores is on the key node of writing brush skeleton, the China ink amount of being had a few as this auxiliary surface with the black population of key node, or adopt radial pattern diffusion and two kinds of black dispersal patterns of vectorial type diffusion to calculate the black population of other parts of writing brush cross section: radial pattern spreads, and promptly the mass colour of central point outwards successively decreases with certain step-length, minimum value is 0, and the diffusion formula is as follows:
Ink radio=In kcenter*(1-R step*D)
D is the distance of impact point and central point, R StepBe changed factor
Vector type diffusion, promptly the mass colour of central point, or increases on negative direction along becoming the direction at θ angle to successively decrease with the x+ axle with certain step-length, and the diffusion formula is as follows:
Ink vector=Ink center*(1-V step*D)
D represents that the line of the key point on impact point and the auxiliary surface exists V StepBe changed factor
Projected length on the dispersal direction (can for negative)
It is the weighted sum of these two kinds of dispersal patterns that final ink distributes:
Ink dest=Ink radio*W R+Ink vector*W V
W RAnd W VBe respectively the weights of radiation profiles and vector distribution
Three, the exchange of ink between a paper
Calculate the person's handwriting of writing brush earlier, the i.e. pen and the contact area of paper, with a key node is the center, when auxiliary surface and paper intersect, the interface portion of this cross section and paper is a straight line, and this intersection is defined as the person's handwriting element, and its two end points are defined as auxiliary point and following auxiliary point respectively, the projection of key node on this intersection is defined as projected centre point, and the ink information on the person's handwriting is stored by projected centre point; Whole person's handwriting is made of several person's handwriting elements, and the ink information of the projected centre point of each person's handwriting element has determined the ink of whole person's handwriting to distribute jointly;
When virtual brush and rice paper bump when promptly contacting, in the person's handwriting zone, will carry out the ink exchange between pen and the paper coma, this exchange is two-way, the ink information of the cross section by calculating contact moment writing brush and the corresponding contact face of paper, can judge the transmission direction of ink, after exchange was finished, the ink on writing brush and the paper all needed redistribution;
Redistributing of ink on the writing brush
For writing brush, apart from the distance of writing brush and paper surface of contact and the maximal value of ink loss or acquisition, obtain the ink amplitude of variation of various piece, and then obtain the effect of the even variation of the ink on the whole writing brush by the various piece on the calculating writing brush;
If " original person's handwriting " that writing brush contacts with paper is S, then on the writing brush not on original person's handwriting the ink information of some key nodes/auxiliary point p be formulated as:
Inkp’=Inkp-(1-Dp(S)/Dmax)*Inktran_avg*k
Wherein Inkp ' is the black population of transmission back pen, Inkp is the black population before the transmission, Dp (S) is the mean distance of a p to S, Dmax is that key node on the writing brush is to the ultimate range of S, Inktran_avg is a writing brush to the average black population of original person's handwriting transmission, and k is what to be used for controlling when certain ink on the writing brush changes the coverage of writing brush, k value 0-1, k is more little, and coverage is more little;
Equally, the transmission for water on the writing brush is formulated as:
Waterp’=Waterp-(1-Dp(S)/Dmax)*Watertran_avg*k’
K ' should be greater than k;
Four, the transmission of ink in rice paper
The transmission of ink between rice paper is divided into: the volatilization of diffusion, deposition, moisture and ink stack;
Diffusion: the diffusion layer that is diffused in the paper matrix type is realized, by comparing the ink concentration of each coma in the diffusion layer, determine the direction of diffusion and the value of diffusion, it is as follows that the transmission by fibrous bundle is embodied as chain reaction process (see figure 9) diffusion process concrete steps with diffusion:
● calculate diffusion conditions, the sticking China ink and the sticking water-based of establishing virtual rice paper are respectively Ink_Stick and Water_Stick, and the black population of coma and water particle subnumber are Ink and Water, and then diffusion conditions is:
Ink>Ink_Stick and Water>Water_Stick
The coma that satisfies above-mentioned condition is called " activity " coma;
● to each " activity " coma, calculate its cell average moisture content Water_Avg and on average contain China ink amount Ink_Avg;
● to this coma, calculate it each adjacent fiber group cell average moisture content Water_Avg ' and on average contain China ink amount Ink_Avg ', itself and the corresponding value that center fiber is rolled into a ball are made comparisons, when:
1. Water_Avg>Water_Avg ' or
2. when Water_Avg<Water_Avg ' but Ink_Avg>Ink_Avg ', diffusion takes place, and transmits ink by center fiber group to its adjacent fibre group, and transmission quantity is determined by following formula:
The water transmission quantity=(Water-Water ')/(Fibre_Avg+1)
The China ink transmission quantity=(Ink-Ink ')/(Fibre_Avg+1)
Wherein Water and Water ' represent the water particle subnumber of center fiber group and adjacent fibre group respectively, Ink and Ink ' represent the black population of center fiber group and adjacent fibre group respectively, Fibre_Avg represents the fibrous bundle quantity that each coma on average connects in the paper matrix type, 1. descend ink to transmit simultaneously in situation, be called " moving water transmission ", 2. have only the China ink transmission down in situation, be called " moving China ink transmission ";
Diffusion takes to continue model, i.e. diffusion runs through whole drawing process, diffusion is (generally being from drawing first road) Once you begin, reach the balance (see figure 10) with regard to the ink concentration of constantly carrying out between each coma continuously, the process that reaches balance is determined by the ink information on the rice paper diffusion layer fully, the process of drawing a road with the user is irrelevant, to spread and accept a user road and be divided into two independently threads, their shared data is exactly the ink information of diffusion layer, the user draws a new road will constantly change ink information on the diffusion layer, the intermediate value of diffusion is changed, thereby obtain various effects;
Deposition: the ink between virtual rice paper deposits dual mode, a kind of be writing brush contact with paper and contact layer on form the person's handwriting of writing brush after, deposition from this person's handwriting to sedimentary deposit, deposition is based on the ink information and the predefined deposition ratio that form person's handwriting on the contact layer; Second kind of deposition occurs in the diffusion process, deposited to sedimentary deposit by diffusion layer, and deposition is constantly carried out and constantly taken place with diffusion, and deposition depends on the ink information on the diffusion layer;
1) volatilization of water: the volatilization of water occurs in diffusion layer equally, and with the passing of time, the water on the diffusion layer constantly volatilizees with certain proportion and does until China ink;
2) ink stack: adopt the diffusion model that continues here, it is unified that stack and diffusion are obtained; Stack is actually and has changed the ink amount that does not spread the diffusion layer of finishing, and the diffusion effect of Overlay and ink is final all to be realized by this diffusion process that constantly changes initial value;
Five, the drafting in a road
The drafting in road need be satisfied real-time requirement, and when needs were drawn road, program loaded the ink information that is deposited on the sedimentary deposit and shows on screen by the bitmap that is loaded as OpenGL texture or GDI; Because diffusion continues to carry out, a therefore next road that will show is actually this previous road to be continued diffusion or has added a new road simultaneously and form the effect of stack.
CNB2005101151847A 2005-07-08 2005-11-15 Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm Expired - Fee Related CN100338612C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005101151847A CN100338612C (en) 2005-07-08 2005-11-15 Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
CN200510014446 2005-07-08
CN200510014446.0 2005-07-08
CNB2005101151847A CN100338612C (en) 2005-07-08 2005-11-15 Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm

Publications (2)

Publication Number Publication Date
CN1773516A true CN1773516A (en) 2006-05-17
CN100338612C CN100338612C (en) 2007-09-19

Family

ID=36760479

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005101151847A Expired - Fee Related CN100338612C (en) 2005-07-08 2005-11-15 Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm

Country Status (1)

Country Link
CN (1) CN100338612C (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102254333A (en) * 2011-07-25 2011-11-23 浙江大学 Image-based method for generating ink painting style image
CN101377854B (en) * 2008-10-07 2012-01-04 浙江大学 Method for simulating Chinese characters hand-written handwriting by a computer
CN102436348A (en) * 2011-11-14 2012-05-02 中国科学院合肥物质科学研究院 Writing brush calligraphy expressing method based on force information
CN102831292A (en) * 2012-07-09 2012-12-19 大连理工大学 Method for calculating virtual ink diffusion range based on force feedback technology
CN102831291A (en) * 2012-07-09 2012-12-19 大连理工大学 Calculation method of ink concentration of light color diffusion area in virtual drawing
CN102939575A (en) * 2010-06-14 2013-02-20 微软公司 Ink rendering
CN103345773A (en) * 2013-06-20 2013-10-09 大连理工大学 Writing brush modeling method based on force feedback technology
CN103412969A (en) * 2013-04-27 2013-11-27 天津大学 Method for utilizing computer to stimulate hand painted weaving painted patterns
CN103440380A (en) * 2013-08-27 2013-12-11 西安邮电大学 Three-layer paper model building method based on surface roughness
CN104240176A (en) * 2014-09-19 2014-12-24 中国科学院合肥物质科学研究院 Ink expression method for digital paper with fiber network structure
CN105631916A (en) * 2014-11-25 2016-06-01 奥多比公司 Paintbrush and liquid simulation
CN111639263A (en) * 2020-06-03 2020-09-08 小红书科技有限公司 Note recommendation method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2381910B (en) * 2000-05-11 2005-03-02 Quickturn Design Systems Inc Emulation circuit with a hold time algorithm logic analyzer and shadow memory
CN1584907A (en) * 2003-08-20 2005-02-23 英业达股份有限公司 Artificial game system and method for combining geographic information

Cited By (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101377854B (en) * 2008-10-07 2012-01-04 浙江大学 Method for simulating Chinese characters hand-written handwriting by a computer
CN102939575A (en) * 2010-06-14 2013-02-20 微软公司 Ink rendering
CN102939575B (en) * 2010-06-14 2016-05-18 微软技术许可有限责任公司 Ink presents
CN102254333B (en) * 2011-07-25 2012-11-14 浙江大学 Image-based method for generating ink painting style image
CN102254333A (en) * 2011-07-25 2011-11-23 浙江大学 Image-based method for generating ink painting style image
CN102436348A (en) * 2011-11-14 2012-05-02 中国科学院合肥物质科学研究院 Writing brush calligraphy expressing method based on force information
CN102831292B (en) * 2012-07-09 2015-01-07 大连理工大学 Method for calculating virtual ink diffusion range based on force feedback technology
CN102831292A (en) * 2012-07-09 2012-12-19 大连理工大学 Method for calculating virtual ink diffusion range based on force feedback technology
CN102831291A (en) * 2012-07-09 2012-12-19 大连理工大学 Calculation method of ink concentration of light color diffusion area in virtual drawing
CN102831291B (en) * 2012-07-09 2015-04-29 大连理工大学 Calculation method of ink concentration of light color diffusion area in virtual drawing
CN103412969B (en) * 2013-04-27 2016-03-09 天津大学 Freehandhand-drawing is weaved cotton cloth the computer simulation method of decalcomania
CN103412969A (en) * 2013-04-27 2013-11-27 天津大学 Method for utilizing computer to stimulate hand painted weaving painted patterns
CN103345773B (en) * 2013-06-20 2015-11-18 大连理工大学 A kind of writing brush modeling method based on force feedback technique
CN103345773A (en) * 2013-06-20 2013-10-09 大连理工大学 Writing brush modeling method based on force feedback technology
CN103440380A (en) * 2013-08-27 2013-12-11 西安邮电大学 Three-layer paper model building method based on surface roughness
CN103440380B (en) * 2013-08-27 2016-02-24 西安邮电大学 Three-ply paper based on surfaceness opens model modelling approach
CN104240176A (en) * 2014-09-19 2014-12-24 中国科学院合肥物质科学研究院 Ink expression method for digital paper with fiber network structure
CN104240176B (en) * 2014-09-19 2017-07-21 中国科学院合肥物质科学研究院 A kind of ink expression of the digital paper with fibrillar meshwork structure
CN105631916A (en) * 2014-11-25 2016-06-01 奥多比公司 Paintbrush and liquid simulation
CN105631916B (en) * 2014-11-25 2020-12-04 奥多比公司 Brush and liquid simulation
CN111639263A (en) * 2020-06-03 2020-09-08 小红书科技有限公司 Note recommendation method, device and system
CN111639263B (en) * 2020-06-03 2023-11-24 小红书科技有限公司 Note recommending method, device and system

Also Published As

Publication number Publication date
CN100338612C (en) 2007-09-19

Similar Documents

Publication Publication Date Title
CN100338612C (en) Water ink transmission model based on Chinese brush and xuan paper and emulation algorithm
CN104626585B (en) A kind of plane dividing method and device for SLA3D printers
CN105499575B (en) A kind of design and preparation method of perforated grill structural material
CN1040923C (en) Antistatic cathode ray tube
CN1871390A (en) Device, method and program for loop simulation
CN1867723A (en) Embroidery data creation device, embroidery data creation method, and embroidery data creation program
CN1945626A (en) Method for filling dot cloud hole based on B sample strip curve three dimension scan
Loi et al. Programmable 2d arrangements for element texture design
CN103407319B (en) A kind of manufacture method of stereo art painting
CN1858801A (en) Filling method for unwanted holes in clouds of three dimension scanning
CN1928923A (en) Design method for personalized brassiere cup seam dart in three-dimensional virtual chest form environment
CN1828671A (en) Gridding texture mapping method in garment virtual display system based on image
CN103294864A (en) Computer-aided disordered needlework manufacture method using genetic algorithms
CN103412969B (en) Freehandhand-drawing is weaved cotton cloth the computer simulation method of decalcomania
CN110148201A (en) A kind of fabric real-time rendering method of superhigh precision
CN102306389B (en) Method for realizing embossment effect of animation character and background of mobile phone
Du Application of CAD aided intelligent technology in landscape design
CN103593860B (en) A kind of cut-out method for the most irregular blank
CN102521867B (en) Mobile phone anime character and background creation method
Zhong et al. As-continuous-as-possible extrusion-based fabrication of surface models
CN102243767B (en) Creation method of mobile phone cartoon figure based on local image distortion
CN106610641A (en) Genetic programming algorithm based on local search for dynamic job shop scheduling
CN1975743A (en) Buttocks-shaping trousers effect simulation buttocks-shaping trousers effect simulation analog method based on dynamic balance model
Sousa et al. Depicting shape features with directional strokes and spotlighting
CN1280779C (en) Decorative relief gas-filled models and producing method thereof

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
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee