Multi-Domain Battlefield Situation Element Simulation and Path Planning Method
By completing the three-dimensional model of the multi-domain battlefield solid model in the situation simulation platform and using the polynomial interpolation algorithm to generate path curves, the solid model can move in real time along the generated path, solving the problem that traditional two-dimensional maps cannot effectively represent the movement of multi-domain battlefield situation elements, and achieving more realistic and effective battlefield situation display and decision support.
Patent Information
- Application Number
- CN202210993527.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-18
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-08-18
AI Technical Summary
When displaying battlefield situations, traditional situation simulation platforms are mostly based on two-dimensional maps, and cannot effectively represent the movement of multi-domain battlefield situation elements, affecting the commander's battlefield situation cognition and decision-making.
By completing three-dimensional modeling of multi-domain battlefield solid models in the situation simulation platform and generating path curves using polynomial interpolation algorithm, the solid models can move in real time along the generated path.
It has realized three-dimensional dynamic display of multi-domain battlefield situation elements, enhanced the commander's cognition and decision-making ability of the battlefield situation, and supported the acquisition of battlefield initiative.
Smart Images

Figure CN115392014B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to battlefield situation simulation and the field of computer graphics. Specifically, it provides a method for representing multi-domain battlefield situation elements using three-dimensional entity equipment models of each combat domain, and using a polynomial interpolation algorithm to interpolate each input point in the simulation scene of the situation simulation platform to form a polynomial curve, enabling the situation elements of each combat domain in the battlefield situation simulation to move along the generated path curve. Background Art
[0002] The display effects of traditional situation simulation platforms are mostly based on two-dimensional maps, achieving the battlefield situation simulation effect through a series of pictorial plotters on the two-dimensional electronic map. Or there are related defects such as the single combat domain of the combat situation elements in the simulation system, which can only represent a single combat domain, and the entity equipment can only be statically placed on the map, etc., greatly affecting the commander's cognitive effect of the battlefield situation and the grasp of the overall battlefield situation.
[0003] The situation on the battlefield is changing rapidly, and military equipment does not remain static at a certain position point but moves and changes at any time. For battlefield situation simulation software, it is necessary to endow the entity situation elements with movement effects, simulate the movement of equipment in a multi-domain battlefield environment, and represent the movement trend in the combat environment. Therefore, the movement planning function of entity elements in multi-domain battlefield simulation is an important link for the simulation software to more realistically simulate the real environment of the battlefield simulation system and an important means to assist the commander in more clearly understanding the battlefield. Summary of the Invention
[0004] In order to overcome the deficiencies of the prior art, the present invention provides a method for multi-domain battlefield situation element simulation and path planning. The present invention completes a series of three-dimensional modeling of battlefield three-dimensional entity models, such as airplanes, artillery, ships, etc., loads them into the situation simulation platform, and classifies and manages them according to the corresponding combat domains, thereby constructing an entity model library that can represent multi-domain battlefield situation elements. By selecting several discrete points in the three-dimensional scene with the mouse, interpolation processing is performed on the selected points in the three-dimensional scene using polynomial interpolation. After generating the interpolation curve, the selected discrete points and the generated path curve are rendered and drawn through the Direct3D graphics interface, and then bound to the entity model, thereby endowing the entity model with movement attributes.
[0005] Combined with the situation simulation platform, the present invention completes the three-dimensional modeling of a series of entity models in different combat domains, loads them into the situation simulation platform, and constructs a three-dimensional entity equipment model library that can represent multi-domain battlefield situation elements. In addition, by inputting key points through mouse selection in the three-dimensional scene or external import to generate a path curve and then binding it to the entity model, the entity model moves in real time along the curve path. This enhances the decision-making advantage of the commander in the multi-domain battlefield environment and is of great significance for gaining the initiative in the battlefield.
[0006] The technical solution adopted by the present invention to solve its technical problems includes the following steps:
[0007] Step 1: Modeling and importing of multi-domain battlefield entity models
[0008] Using 3ds max 3D modeling and rendering software, complete the 3D modeling of various entity elements in different combat domains of air, space, ground, and sea. Then, read the relevant model files into the situation simulation system through the Direct3D read interface for mesh models;
[0009] Step 2: Constructing a multi-domain battlefield entity model library
[0010] Identify and correspond the entity models according to the combat domains they belong to. Add parameters of the combat domain attributes to the entity models through different labels for classification management. And through the Direct3D model loading interface, complete the addition operation of rendering and drawing each entity model in the 3D simulation system by means of single-click addition with the mouse;
[0011] Step 3: Path planning and generation
[0012] 3.1) Obtain path key points by manual selection or external data import
[0013] Through the Direct3D picking technology, capture the three-dimensional coordinate values (x, y, z) of the path key points selected by the mouse on the terrain in the situation simulation platform, and store each coordinate value in an array container;
[0014] 3.2) Interpolate to generate a curve based on the above key points
[0015] According to the array container of all path key points read in step 3.1), perform interpolation processing on the key points according to the polynomial interpolation algorithm to form a path curve. Through the Direct3D vertex buffer technology, draw the key points of the path and the interpolated curve according to the drawing methods of basic primitives (points and lines) of Direct3D, and control the smoothness of the curve by controlling the number of interpolation points in the form of a parameterized interface;
[0016] Step 4: Associating and binding the entity model with the generated path
[0017] By capturing the entity models in the scene, associate and bind the generated path with the selected scene entity models to support driving the models to move in real time according to the generated path;
[0018] Step 5: Driving the models to move in real time according to the bound path
[0019] After binding the entity model to the generated path, by changing the Boolean value of the drive response parameter, the model is adjusted to a dynamic or static state. If adjusted to a dynamic state, the entity model adjusts its position in real-time according to the generated path curve, so as to achieve the effect of the entity continuously moving along the generated path. If adjusted to a static state, the entity model stops moving and becomes stationary.
[0020] The construction steps of the entity model library in step 2 are as follows:
[0021] By saving the 3D modeling of each combat domain entity element completed in step 1 into an.x type file that can be read by Direct3D, and then calling the D3DXLoadMeshFromX(L"plane.x",…) of the ID3DXBuffer interface of the Direct3D library function to read each piece of information in the.x file of the model into the process of the situation simulation platform, where plane.x is the model file name;
[0022] After being read into the system process, the material and texture information of the 3D object model in the.x file of the model will be saved in the ID3DXBuffer interface object. This interface object is saved in a continuous memory. Then, when adding an entity model to the 3D scene, each subset in the mesh model is drawn through the DrawSubset method in the ID3DXMseh interface, and the SetMaterial and SetTexture methods are called during the rendering process to set the material and texture of the model;
[0023] The information of the read model file is stored in the Acess database, and an additional parameter attribute type related to the combat domain type is added to it. The value of type is 0 for land domain entity models, 1 for sea domain entity models, 2 for air domain entity models, and 3 for space domain entity models.
[0024] The specific steps for obtaining path key points by mouse selection in step 3.1) are as follows:
[0025] Through the object pCamera declared by the scene camera IC3DEngCamera class, the following member functions are called:
[0026] pCamera->Pick(&pick_x,&pick_y,&pick_z)
[0027] Inside this function, the 3D coordinate points selected by the mouse on the 3D geographic information system are captured by calling the Direct3D picking technology, and the results of the captured 3D coordinate points are passed to the double-type variables pick_x, pick_y, and pick_z, representing the 3D geodetic coordinate values within the captured simulation system. In this way, the coordinate values of the remaining required points are captured;
[0028] After that, a KeyPoint class object is constructed with these three coordinate values as parameters to represent the coordinate point:
[0029] KeyPoint keypoint(pick_x,pick_y,pick_z,)
[0030] To uniformly manage the KeyPoint objects of the coordinate points added each time, the path object keypoint and its corresponding ID number m_Id are stored in the Map class container m_KeyPointMap in the C++ STL:
[0031] m_KeyPointMap.insert(pair<int,KeyPoint>(keypoint.m_Id,keypoint))
[0032] In this way, the path key points are obtained.
[0033] The specific steps for interpolating to generate a curve in step 3.2) are as follows:
[0034] Interpolating to generate a curve means giving several control points and constraint conditions to construct a curve that passes through or approximates the control points. The present invention adopts polynomial interpolation. By selecting N + 1 control points given by the mouse in the scene of the situation simulation platform, an N-degree curve is constructed to pass through the control points in sequence.
[0035] The parametric equation of an n-degree parametric curve is:
[0036] p n (t)=a n t n +a n-1 t n-1 +....+a 0 t 0 (1)
[0037] Where is the step length during curve interpolation. The spatial coordinate information of a point in the 3D scene includes the three-dimensional spatial coordinate values (x, y, z), that is, for n + 1 points (x 0 ,y 0 ,z 0 ),(x 1 ,y1 , z 1 )...(x n , y n , z n ), substituting into formula (1), it can be changed into a parametric equation about (x, y, z):
[0038]
[0039]
[0040]
[0041] For the parametric equation (2), taking the x(t) term as an example, substitute the x values of the coordinate information of n + 1 key points in space:
[0042]
[0043] It can be obtained that:
[0044]
[0045] To calculate the coefficient Taking the inverse transformation of the Vandermonde matrix on the left side of the matrix equation, we get:
[0046]
[0047] By substituting the x values of the coordinate information of each input key point into formula (4), the coefficient Similarly for solving the y(t) and z(t) terms in the parametric equation (2), and thus the coefficients of the curve can be obtained.
[0048] Traverse each key point in the Map class container m_KeyPointMap selected by the mouse, obtain the polynomial interpolation control point set between all control points, and connect the control point set with straight lines to obtain a smooth curve;
[0049] After traversing the key points, save the key points in the Direct3D vertex buffer object m_pVB; then generate all the point sets of the curve through the key points, and save the created vertex buffer to the vertex buffer object m_pVB2. Render the curve point set in the way of drawing points and lines in the Direct3D primitive rendering, and finally draw a smooth path curve highlighting the key points.
[0050] The specific steps involved in driving the model movement in Step Five are as follows:
[0051] The model and the path are independent modules during design. Therefore, for the path, you can arbitrarily select the model to be bound, assign the name of the model to the ObjName variable in the Path class of each path, change the flag bit of IsRun to "motion", request the interface of the model library through the QueryInterface("IC3DEDITMD") function, change the position of the model, and in the main rendering function, continuously update the position of the model frame by frame to make the model move along the planned path. The driving function is as follows:
[0052] pC3DEDITMD->PositionPart(ObjName,XX,YY,ZZ);
[0053] Among them, pC3DEDITMD is a pointer variable of type IC3DEDITMD for managing entity models obtained through QueryInterface. This variable adjusts the position of the corresponding model in three-dimensional space by calling the method PositionPart. Among them, ObjName is the model name of the corresponding model, and (XX,YY,ZZ) are the respective spatial coordinate values of the point set of the generated curve;
[0054] By looping through each point in the curve point set and calling PositionPart, the model can continuously change its spatial position along each point of the curve in real time, achieving the effect of continuous movement along the curve.
[0055] The beneficial effect of the present invention is to use 3dmax to complete a series of multi-domain battlefield entity model modeling, load them into the situation simulation platform, and complete classification management according to their affiliated combat domains. Use the polynomial curve interpolation method to interpolate several coordinate points selected by the mouse in the situation simulation platform to form a point set after discrete polynomial curves. Render the discrete point set into a visual curve through the Direct3D vertex buffer technology. Then bind the battlefield entity model to the generated curve and drive the model to continuously move along the generated curve. It provides support for improving the commander's understanding of the battlefield and gaining the initiative in battlefield operations in a multi-domain combat environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is the interface of the multi-domain entity model library of the present invention
[0057] Figure 2 is the flow chart of path planning and generation of the present invention
[0058] Figure 3 is the schematic diagram of airspace situation simulation and path generation of the present invention.
[0059] Figure 4 is the schematic diagram of land domain situation simulation and path generation of the present invention.
[0060] Figure 5 It is a schematic diagram of the sea area situation simulation and path generation of the present invention. Specific implementation manner
[0061] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0062] The multi-domain battlefield situation element simulation and path planning method of the present invention includes the following steps:
[0063] Step 1: Modeling and importing of multi-domain battlefield entity models
[0064] Using 3ds max 3D modeling and rendering software, complete the 3D modeling of various entity elements in different combat domains of air, space, ground, and sea, and then read the relevant model files into the situation simulation system through the Direct3D read interface for mesh models;
[0065] Step 2: Constructing a multi-domain battlefield entity model library
[0066] Identify and correspond to the entity models according to the combat domains to which the entity models belong, add parameters of the combat domain attributes to the entity models through different labels for classification management, and through the Direct3D model loading interface, complete the addition operation of rendering and drawing each entity model in the 3D simulation system by means of single-click addition with the mouse;
[0067] Step 3: Path planning and generation
[0068] 3.1) Obtain path key points by manual selection or external data import
[0069] Through the Direct3D picking technology, capture the three-dimensional coordinate values (x, y, z) of the path key points selected by the mouse on the terrain in the situation simulation platform, and store each coordinate value in an array container;
[0070] 3.2) Interpolate to generate a curve based on the above key points
[0071] According to the array container of all path key points read in step 3.1), perform interpolation processing on the key points according to the polynomial interpolation algorithm to form a path curve. Through the Direct3D vertex buffer technology, draw the key points of the path and the interpolated curve according to the drawing methods of the basic primitives points and lines of Direct3D, and control the smoothness of the curve by controlling the number of interpolation points in the form of a parameterized interface;
[0072] Step 4: Associatively bind the entity model and the generated path
[0073] By capturing the entity models within the scene, the generated path is correlated and bound to the selected scene entity models to support the subsequent real-time movement of the driven models along the generated path;
[0074] Step Five: Drive the model to move in real time according to the bound path
[0075] After binding the entity model to the generated path, by changing the boolean value of the drive response parameter, the model is adjusted to a moving state or a stationary state. If adjusted to the moving state, the entity model adjusts the position of the entity model in real time according to the generated path curve, so as to achieve the effect of the entity continuously moving along the generated path. If adjusted to the stationary state, the entity model stops moving and becomes stationary.
[0076] The construction steps of the entity model library in Step Two are as follows:
[0077] By saving the 3D modeling of each combat domain entity element completed in Step One into an.x type file that can be read by Direct3D, and then calling the D3DXLoadMeshFromX(L"plane.x",…) of the ID3DXBuffer interface of the Direct3D library function to read the information in the.x file of the model into the process of the situation simulation platform, where plane.x is the model file name;
[0078] After being read into the system process, the material and texture information of the 3D object model in the.x file of the model will be saved in the ID3DXBuffer interface object. This interface object is saved in a continuous memory. Then, when adding an entity model to the 3D scene, each subset in the mesh model is drawn through the DrawSubset method in the ID3DXMseh interface, and the SetMaterial and SetTexture methods are called during the rendering process to set the material and texture of the model;
[0079] The information of the read model file is stored in the Acess database, and an additional parameter attribute type related to the combat domain type is added to it. The value of type is 0 for land domain entity models, 1 for sea domain entity models, 2 for air domain entity models, and 3 for celestial domain entity models.
[0080] After that, an operation interface is built for the multi-domain battlefield entity model library as shown in Figure 1.
[0081] The specific steps for obtaining path key points by mouse selection in Step 3.1) are as follows:
[0082] Through the object pCamera declared by the scene camera IC3DEngCamera class, the following member functions are called:
[0083] pCamera->Pick(&pick_x,&pick_y,&pick_z)
[0084] Inside this function, the Direct3D picking technology is called to capture the 3D coordinate points selected by the mouse on the 3D geographic information system, and the results of the captured 3D coordinate points are passed to the double-type variables pick_x, pick_y, and pick_z, representing the 3D geodetic coordinate values within the captured simulation system. In this way, the coordinate values of the remaining required points are captured;
[0085] After that, a KeyPoint class object is constructed with these three coordinate values as parameters to represent the coordinate point:
[0086] KeyPoint keypoint(pick_x,pick_y,pick_z,)
[0087] To uniformly manage the KeyPoint objects of the coordinate points added each time, the path object keypoint and its corresponding ID number m_Id are stored in the Map class container m_KeyPointMap in the C++ STL:
[0088] m_KeyPointMap.insert(pair<int,KeyPoint>(keypoint.m_Id,keypoint))
[0089] In this way, the path key points are obtained.
[0090] The specific steps of interpolating to generate a curve in step 3.1) are as follows:
[0091] Interpolating to generate a curve means giving several control points and constraint conditions to construct a curve that passes through or approximates the control points. The present invention adopts polynomial interpolation. By selecting N + 1 control points given by the mouse in the scene of the situation simulation platform, an N-degree curve is constructed to pass through the control points in sequence.
[0092] The parametric equation of the n-degree parametric curve is:
[0093] p n (t)=a n t n +a n-1 t n-1 +....+a 0 t 0 (1)
[0094] Where is the step length during curve interpolation. The spatial coordinate information of a point in the 3D scene includes the three-dimensional spatial coordinate values (x, y, z), that is, for n + 1 points (x0 , y 0 , z 0 ), (x 1 , y 1 , z 1 )...(x n , y n , z n ), substituting into formula (1), it can be changed into a parametric equation about (x, y, z):
[0095]
[0096]
[0097]
[0098] For the parametric equation (2), taking the x(t) term as an example, substitute the x values of the coordinate information of n + 1 key points in space:
[0099]
[0100] It can be obtained that:
[0101]
[0102] To calculate the coefficient Taking the inverse transformation of the Vandermonde matrix on the left side of the matrix equation, we get:
[0103]
[0104] By substituting the x values of the coordinate information of each input key point into formula (4), the coefficient Similarly for solving the y(t) and z(t) terms in the parametric equation (2), and thus the coefficients of the curve can be obtained.
[0105] Traverse each key point of the Map class container m_KeyPointMap selected by the mouse, obtain the polynomial interpolation control point set between all control points, and connect the control point set with straight lines to obtain a smooth curve;
[0106] After traversing the key points, save the key points in the Direct3D vertex buffer object m_pVB; then generate all the point sets of the curve through the key points, and save the created vertex buffer to the vertex buffer object m_pVB2. Render the curve point set in the way of rendering points and lines in the Direct3D primitive, and finally draw a smooth path curve highlighting the key points.
[0107] The specific steps involved in driving the model movement in the fifth step are as follows:
[0108] The model and the path are designed as independent modules during design. Therefore, any model to be bound can be arbitrarily selected for the path. The name of the model is assigned to the ObjName variable in the Path class of each path. The flag bit of IsRun is changed to motion. The interface of the model library is requested through the QueryInterface("IC3DEDITMD") function. The position of the model is changed. In the main rendering function, the position of the model is continuously updated frame by frame, so that the model moves along the planned path. The driving function is as follows:
[0109] pC3DEDITMD->PositionPart(ObjName,XX,YY,ZZ);
[0110] Among them, pC3DEDITMD is a pointer variable of type IC3DEDITMD for managing entity models obtained through QueryInterface. This variable adjusts the position of the corresponding model in three-dimensional space by calling the method PositionPart. Among them, ObjName is the model name of the corresponding model, and (XX,YY,ZZ) are the respective spatial coordinate values of the point set of the generated curve;
[0111] By looping through each point in the curve point set and calling PositionPart, the model can be made to continuously change its spatial position along each point of the curve in real time, achieving the effect of continuous movement along the curve.
[0112] The beneficial effect of the present invention is to use 3dmax to complete a series of multi-domain battlefield entity model modeling, load it into the situation simulation platform, and complete classification management according to its affiliated combat domain. The polynomial curve interpolation method is used to interpolate a number of coordinate points selected by the mouse in the situation simulation platform to form a point set after discretization of the polynomial curve. The discrete point set is rendered into a visual curve through the Direct3D vertex buffer technology. Then, the battlefield entity model is bound to the generated curve, and the model is driven to continuously move along the generated curve. It provides support for improving the commander's cognitive battlefield effect and gaining the initiative in battlefield operations in a multi-domain combat environment.
Claims
1. A method for multi-domain battlefield situation element simulation and path planning, characterized in that it includes the following steps: Step 1: Modeling and importing multi-domain battlefield entity models Using 3ds max 3D modeling and rendering software, complete the 3D modeling of various entity elements in different combat domains of air, space, land, and sea. Then, through the reading interface of the mesh model by Direct3D, read the relevant model files into the situation simulation system; Step 2: Constructing a multi-domain battlefield entity model library Identify and correspond to the entity models according to the combat domains to which the entity models belong. Add parameters of the attributes of the combat domains to which they belong to the entity models through different labels for classification management. And through the Direct3D model loading interface, complete the addition operation of rendering and drawing each entity model in the 3D simulation system by means of single-click addition with the mouse; Step 3: Path planning and generation 3.1) Obtaining path key points by manual selection or external data import Through the Direct3D picking technology, capture the three-dimensional coordinate values (x, y, z) of the path key points selected by the mouse on the terrain in the situation simulation platform, and store each coordinate value in an array container; 3.2) Interpolating to generate a curve based on the above key points According to the array container of all path key points read in step 3.1), perform interpolation processing on the key points according to the polynomial interpolation algorithm to form a path curve. Through the Direct3D vertex buffer technology, draw the key points of the path and the interpolated curve according to the drawing methods of the basic primitives points and lines of Direct3D, and control the smoothness of the curve by controlling the number of interpolation points in the form of a parameterized interface; Step 4: Associating and binding the entity model with the generated path By capturing the entity models in the scene, associate and bind the generated path with the selected scene entity models to support driving the models to move in real time according to the generated path; Step 5: Driving the model to move in real time according to the bound path After binding the entity model with the generated path, by changing the Boolean value of the drive response parameter, realize adjusting the model to a moving state or a static state. If adjusted to the moving state, the entity model adjusts the position of the entity model in real time and cyclically according to the generated path curve, so as to achieve the effect that the entity continuously moves along the generated path. If adjusted to the static state, the entity model stops moving and becomes stationary.
2. The multi-domain battlefield situation element simulation and path planning method according to claim 1, characterized in that: The steps for constructing the entity model library in step 2 are: Save the 3D modeling of each combat domain entity element completed in step 1 as an.x type file that can be read by Direct3D. Then, call the D3DXLoadMeshFromX(L"plane.x", …) of the ID3DXBuffer interface of the Direct3D library function to read each information in the.x file of the model into the process of the situation simulation platform, where plane.x is the model file name; After reading the system process, the material and texture information of the 3D object model in the model's.x file will be saved in the ID3DXBuffer interface object, which is stored in a continuous memory block. Then, when adding an entity model to the 3D scene, each subset in the mesh model is drawn through the DrawSubset method in the ID3DXMseh interface, and the SetMaterial and SetTexture methods are called during the rendering process to set the material and texture of the model; The information of the read model file is stored in the Acess database, and an additional parameter attribute type related to the combat domain type is added to it. Among them, the type value of 0 represents a land domain entity model, 1 represents a sea domain entity model, 2 represents an air domain entity model, and 3 represents a celestial domain entity model.
3. The multi-domain battlefield situation element simulation and path planning method according to claim 1, characterized in that: The specific steps of obtaining path key points by mouse selection in step 3.1) are as follows: Through the object pCamera declared by the scene camera IC3DEngCamera class, the following member functions are called: pCamera->Pick(&pick_x,&pick_y,&pick_z) Inside this function, the Direct3D picking technology is called to capture the 3D coordinate points selected by the mouse on the 3D geographic information system, and the results of the captured 3D coordinate points are passed to the double-type variables pick_x, pick_y, and pick_z, representing the 3D geodetic coordinate values in the simulation system, and the coordinate values of the remaining required points are captured in this way; After that, a KeyPoint class object is constructed with these three coordinate values as parameters to represent the coordinate point: KeyPoint keypoint(pick_x,pick_y,pick_z,) To uniformly manage the KeyPoint objects of the coordinate points added each time, the path object keypoint and its corresponding ID number m_Id are stored in the Map class container m_KeyPointMap in the C++ STL: m_KeyPointMap.insert(pair<int,KeyPoint>(keypoint.m_Id,keypoint)) In this way, the path key points are obtained.
4. The multi-domain battlefield situation element simulation and path planning method according to claim 1, characterized in that: The specific steps of interpolating to generate a curve in step 3.2) are as follows: Interpolating to generate a curve means giving several control points and constraint conditions to construct a curve that passes through or approximates the control points. Using polynomial interpolation, N + 1 control points given by mouse selection in the situation simulation platform scene are used to construct an N-degree curve that passes through the control points in sequence; The parametric equation of the n-degree parametric curve is: p n p(t) = a n t n + a n-1 t n-1 +....+ a 0 t 0 (1) Among them is the step length during curve interpolation. The spatial coordinate information of a point in a three-dimensional scene includes the three-dimensional coordinate values of (x, y, z), that is, for n + 1 points (x 0 , y 0 , z 0 ), (x 1 , y 1 , z 1 )...(x n , y n , z n ), substituting into formula (1), it can be changed into a parametric equation about (x, y, z): For the parametric equation (2), taking the x(t) term as an example, the x values of the coordinate information of n + 1 key points in space are substituted: It can be obtained that: To calculate the coefficient Taking the inverse transformation of the Vandermonde matrix on the left side of the matrix equation gives: By substituting the x values of the coordinate information of each key point in the input into formula (4), the coefficients are obtained Similarly, for solving the y(t) and z(t) terms in the parametric equation (2), the coefficients of the curve can be obtained accordingly; Traverse each key point of the Map class container m_KeyPointMap selected by the mouse, obtain the polynomial interpolation control point set between all control points, and connect the control point set with straight lines to obtain a smooth curve; After traversing the key points, save the key points in the Direct3D vertex buffer object m_pVB; then generate all point sets of the curve through the key points, and save the created vertex buffer to the vertex buffer object m_pVB2. Render the curve point set in the way of rendering points and lines in the Direct3D primitive, and finally draw a smooth path curve highlighting the key points.
5. The multi-domain battlefield situation element simulation and path planning method according to claim 1, characterized in that: The specific steps of driving the movement of the model involved in step five are as follows: The model and the path are independent modules during design. Therefore, any model to be bound can be arbitrarily selected for the path. Assign the name of the model to the ObjName variable in each path of the Path class, change the flag bit of IsRun to motion, request the interface of the model library through the QueryInterface("IC3DEDITMD") function, change the position of the model, and continuously update the position of the model frame by frame in the main rendering function, so that the model moves along the planned path. The driving function is as follows: pC3DEDITMD->PositionPart(ObjName,XX,YY,ZZ); Where pC3DEDITMD is a pointer variable of type IC3DEDITMD that manages the entity model obtained through QueryInterface. This variable adjusts the position of the corresponding model in the three-dimensional space by calling the method PositionPart. Where ObjName is the model name of the corresponding model, and (XX,YY,ZZ) are the respective spatial coordinate values of the point set that generates the curve; By looping through each point in the curve point set and calling PositionPart, the model can continuously change its spatial position along each point of the curve in real time, achieving the effect of continuous movement along the curve.
Citation Information
Patent Citations
Fight simulation system generating military strength based on computer and simulation method
CN106682351A
3 dimensional electronic writting method using 3 dimensional electronic writting system
KR1020130041023A