Summary of the invention
In order to overcome the deficiency that dynamic interaction is poor, practicality is relatively poor of existing virtual plant and factor of natural environment, the invention provides a kind of effective lifting dynamic interaction, have the interactive virtual plant dynamic and visual method of good practicality.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of interactive virtual plant dynamic and visual method, described method for visualizing may further comprise the steps:
(1) experimental record plant topological structure, geometric shape, described topological structure recorded content comprises kind, quantity, position and the structural relation each other of the organ that each growth phase can grow, described geometric shape recorded content comprises the profile of organ and color, size, angle, sets the record cycle of plant topological structure;
The foundation in (2) extraction of topological structure, organ morphology storehouse: the plant topological structure of record is described with parameterized Lindenmayer system, preserve the plant organ geometric shape of record by the graphics technology that uses a computer in the geometric shape storehouse with three-dimensional visualization form in the computing machine;
(3) improvement of parametrization Lindenmayer system: improved parametrization Lindenmayer system be represent branch, stem, leaf, really, in the character of flowering plant organ, add the age parameter, and in branch, stem, foliage organ parameter, adding the deflection angle parameter that shows the external force effect, the variation of use angle shows plant metamorphosis under external influence;
(4) by the static environment factor of user's input,, calculate the morphological parameters of plant model according to condition criterion function in advance;
(5) dynamic and visual virtual plant model: model is by constantly changing the iteration of improving parametrization Lindenmayer system character string and the age parameter of each organ, and carries out patterned explanation, thereby realizes the dynamic and visual of virtual plant.
Further, described method for visualizing is further comprising the steps of:
(6) virtual plant is under the influence of real time environment factor, and the virtual plant model is by changing the external force deflection angle parameter in the improved parametrization Lindenmayer system, thereby makes the visual form generation of virtual plant real-time change.
Further again, in the described step (6), plant stem and branch are divided into some rigidity internodes, and an end is made as stiff end, one end is made as free end, by the computing formula of elastic rod deflection angle, calculates the deflection angle parameter of each refresh time external force effect in branch, stem, the foliage organ parameter.
Further, in the described step (6), to leaving the equilibrium position after the branch stem generation deformation, be not subjected to free end points that external force does the time spent as the equilibrium position internode, under the effect of damping force, amplitude reduces gradually, finally gets back to the equilibrium position when not being subjected to external force.
Described method for visualizing is further comprising the steps of: the output of (7) virtual plant morphological parameters: virtual plant stops deformation in predetermined period, and exports the morphological parameters of the virtual plant under this state.
Described method for visualizing is further comprising the steps of: (8) user is according to the morphological parameters of system output, by compare to determine with truth under the difference of phytomorph, obtain the guidance of agricultural experts by man-machine interaction about cultivation step.
Technical conceive of the present invention is: the raising of, hardware performance soft along with computing machine, and the development of computer graphics, Flame Image Process, virtual reality technology, people require also to improve day by day to the authenticity of virtual plant.Independent plant strain growth metamorphosis can not satisfy the demand of scene drawing, based on virtual plant, sets up the interaction models of plant and envirment factor, makes that the growth of virtual plant is more true to nature, is only the development trend of new agricultural technology.Simultaneously, by utilizing computer technology that real plants information and virtual plant form are compared, and obtain the guidance of agricultural experts' experimental knowledge by man-machine interaction, and instruct the scientific and reasonable cultivated plant of plant culture person, can be with the maximization of economic benefit of cultivated plant.
The application of elastic rod principle is that plant stem and branch are divided into some rigidity internodes, and an end is made as stiff end, one end is made as free end, by the computing formula of elastic rod deflection angle, calculates the deflection angle parameter of each refresh time external force effect in the organ parameters such as branch, stem, leaf;
The application of the principle of damped vibration is to leaving the equilibrium position after the branch stem generation deformation, is not subjected to free end points that external force does the time spent as the equilibrium position internode, and under the effect of damping force, amplitude reduces gradually, finally gets back to the equilibrium position when not being subjected to external force.
Beneficial effect of the present invention mainly shows: the metamorphosis of the plant that the appliance computer graphics simulates in physical environment, can be applicable to virtual plant microcomputer modelling and visual simulating, virtual scene generates, video display stunt and advertising creative are made, three-dimensional animation production and the research of plant growth rhythm.The output of the final form of virtual plant model can be instructed the scientific and reasonable cultivated plant of plant culture person.
Embodiment
Below in conjunction with accompanying drawing the present invention is further described.
With reference to Fig. 1, a kind of interactive virtual plant dynamic and visual method may further comprise the steps:
(1) topological structure of experimental record plant, geometric shape.To plant record of topological structure and geometric shape under varying environment is modeling virtual plant model based, topological structure recorded content such as phyllotaxy, inflorescence, the kind of organ, quantity, position and structural relation each other etc., to organ geometric shape recorded content with the profile of organ and color, size, angle etc.The record cycle of plant topological structure is 7 days 1 time.
The foundation in (2) extraction of topological structure, organ morphology storehouse.The parametrization Lindenmayer system is a kind of form generation model commonly used in the virtual plant modeling.The plant topological structure of record is described with parameterized Lindenmayer system, and deposits in the calculator memory.Preserve the plant organ geometric shape of record by the graphics technology that uses a computer in the organ morphology storehouse with three-dimensional visualization form in the computing machine.
(3) improvement of parametrization Lindenmayer system.Improved parametrization Lindenmayer system be represent branch, stem, leaf, really, in the character of plant organ such as flower, add the age parameter, and in branch, stem, foliage organ parameter, adding the deflection angle parameter that shows the external force effect, the variation of use angle shows plant metamorphosis under external influence
When plant is not subjected to environmental factor or man's activity, outer force parameter is set to 0, and the morphosis that does not influence in the growing process changes;
When plant is subjected to environmental factor or man's activity, outer force parameter changes according to the elastic rod principle in the mechanics of materials, cause the variation of deflection angle, thereby influence the metamorphosis of plant, and after external force disappears, the restoration path when calculating plant recovery to stressing conditions not according to the damped vibration principle;
(4) the static environment factor is to the simulation of plant growth effect.By the static environment factor of user input, as accumulated temperature, soil constituent factor, system calculate the morphological parameters of plant model, as blade amt, the blade total area, plant height etc. according in advance condition criterion function.
(5) dynamic and visual virtual plant model.Model is by constantly changing the iteration of improving parametrization Lindenmayer system character string and the age parameter of each organ, and carries out patterned explanation, thereby realizes the dynamic and visual of virtual plant.
(6) the real time environment factor is to the influence of virtual plant.Virtual plant is at real time environment factor such as wind, various natural factors such as rain, perhaps under the influence of human factor such as artificial collision, the virtual plant model is by changing the outer force parameter in the improved parametrization Lindenmayer system, thereby makes the virtual plant model that real-time metamorphosis take place.
(7) output of virtual plant morphological parameters.Virtual plant stops deformation in predetermined period, and exports the morphological parameters of the virtual plant under this state, as plant height, and the blade total area, fruit number etc.
(8) cultivation suggestion.The user is according to the morphological parameters of output, compare to determine with truth under the difference of form of plant, obtain the instruction of agricultural experts by man-machine interaction about cultivation step.