CN113192158A - 3D model lofting method based on computer geometric migration algorithm - Google Patents

3D model lofting method based on computer geometric migration algorithm Download PDF

Info

Publication number
CN113192158A
CN113192158A CN202110588305.9A CN202110588305A CN113192158A CN 113192158 A CN113192158 A CN 113192158A CN 202110588305 A CN202110588305 A CN 202110588305A CN 113192158 A CN113192158 A CN 113192158A
Authority
CN
China
Prior art keywords
vertex
offset
obtaining
point
line
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
CN202110588305.9A
Other languages
Chinese (zh)
Other versions
CN113192158B (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.)
Jiangsu University
Original Assignee
Jiangsu 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 Jiangsu University filed Critical Jiangsu University
Publication of CN113192158A publication Critical patent/CN113192158A/en
Application granted granted Critical
Publication of CN113192158B publication Critical patent/CN113192158B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses a 3D model lofting method based on a computer geometric migration algorithm, which comprises the following steps: (1) according to the input of hardware equipment/interaction with other software, obtaining a cross section fold line with M vertex number and a fold line to be deviated; (2) obtaining an initial offset vector group with the length equal to the number M of the vertex points according to the cross section folding line and the first vertex of the folding line to be offset; (3) respectively obtaining M offset folding lines corresponding to M vertexes in the cross section folding lines by adopting an offset algorithm, wherein the M offset folding lines form a folding line group; (4) generating triangular patch data by adopting the offset broken line and the broken line to be offset; (5) and adopting triangular patch data to carry out meshing to generate a 3D model. The invention overcomes the overlapping problem formed by the operation of externally expanding the input broken line and reduces the calculated amount; the method can be used for generating the lofting grids, and can also be used as any grid generation calculation scheme, so that the generated 3D grids or 2D grids are more excellent.

Description

3D model lofting method based on computer geometric migration algorithm
Technical Field
The invention relates to the fields of computer graphics and 3D modeling and game animation, in particular to a 3D model lofting method based on a computer geometric migration algorithm.
Background
Common animation generation methods include skinning animation and lofting technology.
The two core data in skinning animation are the skeleton and the model. The bone data describes the parent-child relationship so as to facilitate the subsequent pose freezing and animation production; the model data describes a static object that it is desired to drive. The designer will make everything in the model data including the image of the object described by the model, the number of bones driving the model, and the description of the effect of the driving. The animation software generates the position sequence of the model skeleton and interpolates the position sequence to obtain the coherent skeleton animation. The skeletal animation will adjust the pose of the static object at each moment using the skeletal bindings and the deformation weight data to ultimately generate an animation. The same is true of the technology in the game engine.
Lofting is a modeling technique that uses a path datum plus a cross-section datum to generate a 3D model. Briefly, lofting produces a model effect of translating a cross-section along a path, drawing an outline of a volume in three-dimensional space. The specific modeling technology of the lofting technology is that a path curve and a cross section curve ring are firstly subdivided to a certain extent to generate a broken line and a broken line ring. The polyline rings are then spatially transformed by the polyline information to describe the location of the polyline rings moving along the path. By this time the data has been built, the next step is to generate a mesh model for rendering. The specific implementation mode is that the adjacent broken line rings are operated pairwise to generate a grid of the middle part. The mesh at the sealing point of the cross section is obtained by triangulating a polygonal line ring at the head and tail parts, and the specific triangulation method is a cutting ear method and a Deluranay triangulation method.
Both prior art lofting techniques and skinning have a disadvantage in that they do not allow any optimization of the corner patches, whether path-generated or skeleton-driven. The actual behavior for the non-optimization process is: when lofting, if the cross section is too large, the curve will have a mold penetration phenomenon at the break angle; the 3D skin object can have a mold penetrating phenomenon after the bone joint is bent to a certain degree. The cost of this optimization process is often large. For the static condition, entrusting to the art designing treatment; for the dynamically generated case, either no processing is done or the scheme is changed.
Disclosure of Invention
The purpose of the invention is as follows: the invention aims to provide a 3D model lofting method based on a computer geometric migration algorithm, which solves the overlapping problem existing in the die punching phenomenon and the fold line outward expansion operation.
The technical scheme is as follows: the invention discloses a 3D model lofting method based on a computer geometric migration algorithm, which comprises the following steps of:
(1) according to the input of hardware equipment/interaction with other software, obtaining a cross section fold line with M vertex number and a fold line to be deviated;
(2) obtaining an initial offset vector group with the length equal to the number M of the vertex points according to the cross section folding line and the first vertex of the folding line to be offset;
(3) respectively obtaining M offset folding lines corresponding to M vertexes in the cross section folding line by adopting an offset algorithm, wherein the M offset folding lines form a folding line group;
(4) generating triangular patch data by adopting the offset broken line and the broken line to be offset;
(5) and generating the 3D model mesh by adopting the triangular patch data.
Further, the offset algorithm in step (3) comprises the following steps:
(31) eliminating and recording vertexes of parallel lines formed in the broken lines to be offset;
(32) sequentially obtaining the offset results of vertexes which do not form parallel lines in the to-be-offset folding line corresponding to the kth vertex of the cross-section folding line, wherein k is 1, 2 and 3 ┄ M;
(33) restoring the culled vertices from the record of step (31);
(34) and sequentially obtaining an offset folding line corresponding to the kth vertex of the cross-section folding line according to the offset result, wherein k is 1, 2 and 3 ┄ M.
Further, the step (32) comprises the following steps:
(321) according to the sequence of the broken lines to be offset from the starting point to the end point, declaring indexes i for vertexes which do not form parallel lines, wherein i starts from 0, i is less than or equal to 0 and less than N, and N is the number of vertexes which do not form parallel lines for the broken lines to be offset;
(322) obtaining the offset result of the vertex 0;
(323) sequentially obtaining the offset results of the vertexes with indexes from 1 to N-2 and recording the offset results needing to be repaired;
(324) obtaining the offset result of the vertex No. N-1;
(325) the offset result which needs to be repaired and is recorded in the repairing step (323);
(326) and outputting the deviation result of each vertex of the polyline to be deviated.
Further, the step (322) comprises the following steps:
(3221) let the 0 vertex be point A and the 1 vertex be point B;
(3222) respectively adding the input offset vector by using two points AB to obtain two offset results A 'and B' for initialization; the input offset vector is obtained through the initial offset vector group in the step (2);
(3223) obtaining a plane passing through the point A and perpendicular to the line segment AB;
(3224) and obtaining the intersection point of the straight line where the A 'B' is positioned and the plane, wherein the intersection point is the offset result of the 0 th vertex.
Further, the step (323) comprises the following steps:
(3231) obtaining an input index i;
(3232) let vertex i-1 be point E, vertex i be point F, and vertex i +1 be point G;
(3233) obtaining an angular bisector of the line segment EF and the line segment FG and being perpendicular to a plane formed by the two line segments;
(3234) obtaining a vector of a deviation result of the position of the E point pointing to the E point;
(3235) obtaining a directional line segment E 'F' obtained by shifting the line segment EF by using the vector of the step (3234), wherein the direction of the directional line segment E 'F' is E 'pointing to F';
(3236) obtaining the intersection point of the straight line of the line segment in the step (3235) and the plane obtained in the step (3233);
(3237) judging whether the intersection point is on a ray which takes the E ' point as a starting point and is opposite to the line segment E ' F ', if so, executing a step (3238), and if not, executing a step (3239);
(3238) recording the vertex i as a vertex to be repaired;
(3239) this intersection is the result of the offset of vertex i.
Further, the step (324) comprises the following steps:
(3241) let vertex No. N-2 be J point and vertex No. N-1 be H point;
(3242) obtaining a plane passing through the point H and perpendicular to the segment JH;
(3243) obtaining a vector of the offset result of the J point pointing to the J point;
(3244) obtaining a line segment J 'H' formed by respectively shifting two points of JH by using the vector of the step (3243);
(3245) the intersection of the line segment J 'H' and the plane is obtained, which is the result of the shift of vertex No. N-1.
Further, the step (325) comprises the following steps:
(3251) sequentially inputting recorded indexes of vertexes to be repaired, and reversely repairing each vertex;
(3252) inputting the recorded index of the last vertex of the vertices to be repaired in a reverse order, and repairing each vertex in a forward direction;
(3253) and finishing the repair.
Further, step (3251) includes the following steps:
(32511) Recording a deviation result j of a vertex i to be repaired as a point to be covered, and recording the deviation result j as a default value;
(32512) Obtaining a cylinder determined by a vertex i to be repaired and a next vertex i +1 of the vertex to be repaired;
(32513) Obtaining a directed line segment pointing from the offset result j-2 of the vertex i-2 to the offset result j-1 of the vertex i-1;
(32514) Recording an end point j-1 of the directed line segment as a point to be covered;
(32515) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing step (32519); if so, judging whether the intersection point is on a ray which takes the starting point j-2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing step (32516), otherwise, executing step (32518);
(32516) J-1, i-1, if i is larger than or equal to 2, executing step (32513), otherwise executing step (32517);
(32517) Covering all the points to be covered by using a default value, and executing the step (32519);
(32518) Covering all the points to be covered by using the intersection points obtained in the step (32515);
(32519) And finishing reverse repair.
Further, step (3252) includes the following steps:
(32521) Recording an offset result j of a vertex i to be repaired as a point to be covered, and recording the offset result j as a default value;
(32522) Obtaining a cylinder determined by a vertex i to be repaired and a vertex i-1 above the vertex i to be repaired;
(32523) Obtaining a directed line segment pointing from the offset result j +2 of the vertex i +2 to the offset result j +1 of the vertex i + 1;
(32524) Recording an end point j +1 of the directed line segment as a point to be covered;
(32525) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing the step (32529); if the intersection point exists, continuously judging whether the intersection point is on a ray which takes the starting point j +2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing a step (32526), otherwise, executing a step (32528);
(32526) If j is j +1 and i is i +1, if i ≦ N-3, perform step (32523), otherwise perform step (32527);
(32527) Covering all the points to be covered by using a default value, and executing the step (32529);
(32528) Covering all the points to be covered by using the intersection points obtained in the step (32525);
(32529) The forward repair is finished.
Further, the method for obtaining the cylinder in the step (32512) comprises the following steps:
(325121) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j +1 of the next vertex i +1 to be repaired;
(325122) obtaining the infinite curved surface of the straight line of step (325121) which rotates 360 degrees by taking the straight line passing through the vertex i and the vertex i +1 as the rotating axis;
(325123) obtaining a chamfered cylinder surrounded by the curved surface of step (325122), the plane of vertex i in step (3233), and the plane of vertex i + 1;
further, the method for obtaining the cylinder in step (32522) comprises the following steps:
(325221) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j-1 of the next vertex i-1 to be repaired;
(325222) obtaining an infinite curved surface which is rotated by 360 degrees by the straight line passing through the vertex i and the vertex i-1 as the rotating axis in the step (325221);
(325223) obtaining a chamfered cylinder surrounded by the curved surface of step (325222), the plane of vertex i in step (3233), and the plane of vertex i-1.
Has the advantages that: compared with the prior art, the invention has the obvious advantages of overcoming the overlapping problem formed by the die punching phenomenon and the fold line outward expansion operation and greatly reducing the calculated amount. The method can be used for generating the lofted grid, and can also be used as a calculation scheme for any grid generation, so that the generated 3D grid or 2D grid can be more excellent.
Drawings
FIGS. 1(a) -1 (d) are schematic illustrations of a first apex offset of the present invention;
FIGS. 2(a) -2 (b) are schematic illustrations of the medial apex offset of the present invention;
FIGS. 3(a) -3 (b) are schematic illustrations of the final vertex offset of the present invention;
FIG. 4 is a graph of the vertex offset results of the present invention;
FIGS. 5(a) -5 (d) are schematic diagrams of the reverse repair of the present invention;
FIG. 6 is a diagram of an embodiment of a 3D model lofting method according to the present invention.
Detailed Description
The technical scheme of the invention is further explained by combining the attached drawings.
The invention discloses a 3D model lofting method based on a computer geometric migration algorithm, which comprises the following steps:
(1) according to the input of hardware equipment/interaction with other software, obtaining a cross section fold line with M vertex number and a fold line to be deviated;
(2) obtaining an initial offset vector group with the length equal to the number M of the vertex points according to the cross section broken line and the first vertex of the broken line to be offset, wherein the step (2) is implemented specifically as follows:
(21) declaring a counter k to be 0, and setting the coordinate of the first vertex of the fold line to be shifted as p 0;
(22) acquiring the (k + 1) th vertex coordinate p of the cross section broken line;
(23) assigning the k +1 th element of the offset vector set to a vector p-p 0;
(24) if k is less than M, jumping to (22) after k + +, otherwise jumping to (25);
(25) outputting the initial offset vector group.
(3) And respectively obtaining the offset broken line corresponding to each vertex in the cross section broken line by adopting an offset algorithm. This step is the main innovative point of the present invention and its implementation is described in detail later.
(4) And (3) generating triangular patch data by adopting the offset folding line and the folding line to be offset, wherein M offset folding lines form a folding line group, and the step (4) comprises the following steps:
(41) generating a vertex normal line for each vertex of each offset folding line in the folding line group by using the folding line group and the folding line to be offset; the method for obtaining the vertex normal line comprises the steps of obtaining the coordinate p of the vertex v of the offset polygonal line, then obtaining the coordinate p0 of the vertex corresponding to the polygonal line to be offset, and generating the vertex normal line of the vertex v, wherein the vertex normal line is a normalized vector of a vector (p-p0), namely normaize (p-p 0). Each vertex of each offset polyline is traversed.
(42) Side triangle patch data is generated using the fold groups and vertex normal data and added to the buffer. Sequentially acquiring two adjacent offset folding lines in the folding line group, and utilizing the ith vertex v00 and the (i + 1) th vertex v01 of one offset folding line and the ith vertex v10 and the (i + 1) th vertex v11 of the other offset folding line; 2 pieces of triangle patch data are generated with 4 vertices, the set of vertices of the triangle is { v00, v01, v10}, and the normal is a normalized vector of the sum of normals of the vertices, i.e., normaize (v00.normal + v01.normal + v10.normal), and triangle patch data t1 is generated. The set of vertices of the triangle is { v01, v11, v10}, and the normal is a normalized vector of the sum of the normals of the vertices, i.e., normaize (v01.normal + v11.normal + v10.normal), triangle patch data t2 is generated, and 2 pieces of triangle patch data, t1, t2, are added to the buffer. And traversing all the offset folding lines in sequence according to the sequence numbers, then generating triangular patch data by using the same method for the first offset folding line and the last offset folding line, and storing the triangular patch data into a buffer area. And finally, outputting all the triangular patch data in the buffer area.
(43) The triangle patch data of the top and bottom are generated using the polyline group and the polyline to be offset and added to the buffer.
Acquiring a 1 st vertex v0 and a 2 nd vertex v1 of the vertex to be offset; calculating a bottom surface normal vector n0 ═ normaize (v0-v 1); sequentially assigning the (i + 1) th vertex coordinate of the ground line folding ring as the first vertex coordinate of the (i + 1) th folding line of the folding line group, traversing all the vertexes of the cross-section folding lines, and obtaining a bottom line folding ring r 0; using any triangulation algorithm to subdivide r0 to obtain triangular patch data; assigning all triangle surface normals of the triangle patch data as n 0; and outputting all triangle patch data.
Acquiring an nth-1 vertex v0 and an nth vertex v1 of a vertex to be offset; calculating a top surface normal vector n1 ═ normaize (v1-v 0); assigning the (i + 1) th vertex coordinate of the top surface broken line ring as the last vertex coordinate of the (i + 1) th broken line l of the obtained broken line group, traversing all the vertexes of the cross section broken lines, and obtaining a top surface broken line ring r 1; using any triangulation algorithm to subdivide r1 to obtain triangular patch data; all triangle surface normals of the triangle patch data are assigned as n 1.
(44) And outputting all triangle patch data in the buffer area.
(5) And generating the 3D model mesh by adopting the triangular patch data.
And (3) adopting an offset algorithm to sequentially obtain an offset broken line corresponding to each vertex in the cross section broken lines. In the step, the initial offset vector corresponding to each vertex in the cross-section broken line is sequentially obtained from the initial offset vector group in the step (2), and the initial offset vector is used as the input vector in the step (3) to carry out the operation of the step (3). And sequentially obtaining the offset broken line corresponding to each vertex of the cross section broken line by adopting the initial offset vector and utilizing an offset algorithm.
Taking the k-th vertex in the cross-section broken line as an example, the specific process of the offset algorithm comprises the following steps:
(31) eliminating and recording vertexes of parallel lines formed in the broken lines to be offset;
(32) obtaining the offset result of the vertex which does not form a parallel line in the to-be-offset broken line corresponding to the kth vertex of the cross section broken line;
(33) restoring the culled vertices from the record of step (31);
(34) and obtaining an offset broken line corresponding to the kth vertex of the cross-section broken line according to the offset result.
The step (32) comprises the following steps:
(321) according to the sequence of the broken lines to be offset from the starting point to the end point, declaring indexes i for vertexes which do not form parallel lines, wherein i starts from 0, i is less than or equal to 0 and less than N, and N is the number of vertexes which do not form parallel lines for the broken lines to be offset;
(322) obtaining the offset result of the vertex 0; the step (322) comprises the following steps:
(3221) let the 0 vertex be point A and the 1 vertex be point B;
(3222) respectively adding the input offset vector by using two points AB to obtain two offset results A 'and B' for initialization; the input offset vector is obtained through the initial offset vector group in the step (2);
(3223) obtaining a plane passing through the point A and perpendicular to the line segment AB;
(3224) and obtaining the intersection point of the straight line where the A 'B' is positioned and the plane, wherein the intersection point is the offset result of the 0 th vertex.
(323) Sequentially obtaining the offset results of the vertexes with indexes from 1 to N-2 and recording the offset results needing to be repaired; the step (323) comprises the following steps:
(3231) obtaining an input index i;
(3232) let vertex i-1 be point E, vertex i be point F, and vertex i +1 be point G;
(3233) obtaining an angular bisector of the line segment EF and the line segment FG and being perpendicular to a plane formed by the two line segments;
(3234) obtaining a vector of a deviation result of the position of the E point pointing to the E point;
(3235) obtaining a directional line segment E 'F' obtained by shifting the line segment EF by using the vector of the step (3234), wherein the direction of the directional line segment E 'F' is E 'pointing to F';
(3236) obtaining the intersection point of the straight line of the line segment in the step (3235) and the plane obtained in the step (3233);
(3237) judging whether the intersection point is on a ray which takes the E ' point as a starting point and is opposite to the line segment E ' F ', if so, executing a step (3238), and if not, executing a step (3239);
(3238) recording the vertex i as a vertex to be repaired;
(3239) this intersection is the result of the offset of vertex i.
(324) Obtaining the offset result of the vertex No. N-1; the step (324) comprises the following steps:
(3241) let vertex No. N-2 be J point and vertex No. N-1 be H point;
(3242) obtaining a plane passing through the point H and perpendicular to the segment JH;
(3243) obtaining a vector of the offset result of the J point pointing to the J point;
(3244) obtaining a line segment J 'H' formed by respectively shifting two points of JH by using the vector of the step (3243);
(3245) the intersection of the line segment J 'H' and the plane is obtained, which is the result of the shift of vertex No. N-1.
(325) The offset result which needs to be repaired and is recorded in the repairing step (323); the step (325) comprises the following steps:
(3251) sequentially inputting recorded indexes of vertexes to be repaired, and reversely repairing each vertex; the step (3251) comprises the following steps:
(32511) Recording a deviation result j of a vertex i to be repaired as a point to be covered, and recording the deviation result j as a default value;
(32512) Obtaining a cylinder determined by a vertex i to be repaired and a next vertex i +1 of the vertex to be repaired; the method for obtaining the cylinder in the step (32512) comprises the following steps:
(325121) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j +1 of the next vertex i +1 to be repaired;
(325122) obtaining the infinite curved surface of the straight line of step (325121) which rotates 360 degrees by taking the straight line passing through the vertex i and the vertex i +1 as the rotating axis;
(325123) obtaining a chamfered cylinder surrounded by the curved surface of step (325122), the plane of vertex i in step (3233), and the plane of vertex i + 1.
(32513) Obtaining a directed line segment pointing from the offset result j-2 of the vertex i-2 to the offset result j-1 of the vertex i-1;
(32514) Recording an end point j-1 of the directed line segment as a point to be covered;
(32515) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing step (32519); if so, judging whether the intersection point is on a ray which takes the starting point j-2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing step (32516), otherwise, executing step (32518);
(32516) J-1, i-1, if i is larger than or equal to 2, executing step (32513), otherwise executing step (32517);
(32517) Covering all the points to be covered by using a default value, and executing the step (32519);
(32518) Covering all the points to be covered by using the intersection points obtained in the step (32515);
(32519) And finishing reverse repair.
(3252) Inputting the recorded index of the last vertex of the vertices to be repaired in a reverse order, and repairing each vertex in a forward direction; the step (3252) comprises the following steps:
(32521) Recording an offset result j of a vertex i to be repaired as a point to be covered, and recording the offset result j as a default value;
(32522) Obtaining a cylinder determined by a vertex i to be repaired and a vertex i-1 above the vertex i to be repaired; the method for obtaining the cylinder in step (32522) comprises the following steps:
(325221) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j-1 of the next vertex i-1 to be repaired;
(325222) obtaining an infinite curved surface which is rotated by 360 degrees by the straight line passing through the vertex i and the vertex i-1 as the rotating axis in the step (325221);
(325223) obtaining a chamfered cylinder surrounded by the curved surface of step (325222), the plane of vertex i in step (3233), and the plane of vertex i-1.
(32523) Obtaining a directed line segment pointing from the offset result j +2 of the vertex i +2 to the offset result j +1 of the vertex i + 1;
(32524) Recording an end point j +1 of the directed line segment as a point to be covered;
(32525) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing the step (32529); if the intersection point exists, continuously judging whether the intersection point is on a ray which takes the starting point j +2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing a step (32526), otherwise, executing a step (32528);
(32526) If j is j +1 and i is i +1, if i ≦ N-3, perform step (32523), otherwise perform step (32527);
(32527) Covering all the points to be covered by using a default value, and executing the step (32529);
(32528) Covering all the points to be covered by using the intersection points obtained in the step (32525);
(32529) The forward repair is finished.
(3253) And finishing the repair.
(326) And outputting the deviation result of each vertex of the polyline to be deviated.
And respectively obtaining the offset results corresponding to other vertexes in the cross section broken line by adopting the same method.
In the implementation, a common scheme for obtaining a cross section folding line with the number of vertexes M and a folding line to be offset with the number of vertexes N in the step (1) is as follows:
in the first method, a user interactively creates and adjusts software on a computer in real time. The operation speed of the computer can support real-time adjustment of the model, and as a 3D modeling engineer edits the grid in real time, 2 fold line data for the cross section fold line input and the fold line input to be shifted can be obtained in a drawing and result observing mode and an adjusting and result observing mode which is not in accordance with expectation. The polyline data is a set of vertices arranged in sequence, and both the cross-sectional polyline and the polyline to be offset are polyline data, which is only used for different purposes. For example, the user may first add vertices sequentially in the 3D space of the software, such as vertex A may be added1Vertex B1Vertex C1Vertex D1Then connecting the vertexes through the connection operation to obtain broken line data A1B1C1D1. Both the fold line to be offset and the cross-section fold line can be added according to the above steps, and finally we can obtain 2 fold line data for the cross-section fold line input and the fold line input to be offset. And then, 2 fold line data can be used as input data to be linked to an input end of a software functional component with a fold line offset algorithm, after the component is operated and modeled, a user can check a rendering result, and the current computer operation speed can support that a subsequent calculation stack is refreshed after any modification of the input data is detected, so that the display effect of the model is refreshed in real time, and the user can check a final result in real time. In this way, in the state of viewing the refresh result, the 2 pieces of broken line data are still in the editable state, and the user can adjust the positions of the vertexes which are not in expectation until the satisfactory broken line data is adjusted.
The second method is obtained by converting a computer common curve created by a user. If the software supports the drawing of the Bezier curve, a user can draw the Bezier curve, and a secondary Bezier curve is taken as an exampleThe user draws a secondary Bezier curve, and can acquire data P of the Bezier curve from a Bezier curve module0、P1、P2Formula b (t) ═ P for obtaining a quadratic bezier curve0*(1-t)^2+2t(1-t)P1+P2T ^2(t is between 0 and 1), the quadratic Bessel curve can be converted into broken line data through different pairs of subdivision numbers, if the subdivision number is 5, t is 0, t is 0.25, t is 0.5, t is 0.75 and t is 1, the broken line vertex data A are respectively and sequentially obtained2B2C2D2E2This can be entered as polyline data, and only 2 bezier curves are needed to obtain 2 polyline data for the cross-sectional polyline input and the polyline input to be offset. Meanwhile, the user can adjust the Bezier curve in real time by observing the rendering result in real time until satisfactory broken line data is adjusted.
And in the third method, the real-time track input by the hardware equipment is obtained. If the user sends a signal to the computer through mouse hardware, the position of the mouse is refreshed by the operating system after the driving processing, and the position of the mouse can be acquired in software and stored according to the time sequence. The required polyline data can be obtained through the sequentially stored mouse positions, namely the real-time motion track of the mouse. Only 2 real-time traces are needed to obtain 2 polyline data for the cross-sectional polyline input and the polyline input to be offset. However, in practice, only real-time trajectories are typically used to obtain the polyline data for the polyline input to be offset, and real-time trajectories are not typically used to generate the polyline data for the cross-sectional polyline input. Other hardware device inputs may also be used, such as a keyboard, camera, scanner, light pen, handwriting input pad, joystick, voice input device, etc.
And in the fourth method, the method is obtained by physical simulation of software. If the software gives the mass, the current position and the stress condition of an object, and the time t at this time is 0, the position of the object at any time when the time t is greater than 0 can be calculated by a traditional mechanical formula. The formula for this position with respect to time may be P (t), by means of different refinementsThe score translates the trajectory into polyline data. If the subdivision number is 5 and the end time is t1, we can substitute t0, t 0.25 t1, t 0.5 t1, t 0.75 t1 and t1 into p (t), and then find the broken line vertex data a sequentially3B3C3D3E3This can be entered as polyline data, and in practical terms, we generally only use physical simulation to obtain the polyline data for the polyline input to be offset, and generally do not use physical simulation to generate the polyline data for the cross-section polyline input. Meanwhile, the user can also adjust the quality, the current position, the stress condition and the like of the object in real time by observing the rendering result in real time until satisfactory broken line data is adjusted.
In this embodiment, the polyline to be offset and the offset polyline are described by a vertex Array < Vector3 >. The invention expands the path to generate volume. And converting the cross section data into a plurality of offset data, wherein the offset is direction data Vector3 of a 3D space, carrying out outward expansion on the path so as to generate a plurality of path results, and finally generating the mesh of the outer contour by using the obtained path result set.
In the embodiment, the top points of parallel lines formed in the input broken lines are removed and recorded in the step (31); step (32) obtaining the offset result of the top points which do not form parallel lines in the input broken line; step (33) restores the culled vertices from the record of step (311). Respectively, by the following functions. The cached merge information data holds data for each vertex that has been culled by forming parallel lines, IEnumerable < MergeInfo > mergeInfo.
If the adjacent line segments are parallel, a great error is caused on the detection results of the rays which are parallel to each other. The original path data are merged using a merge operation, vertices that would cause adjacent segments to be parallel are culled, and merged information data is generated for restoring them in the result. The merged path data of Array < Vector3> is MergeAjacencyParallel (path data before merging, out mergeInfo).
An outspread operation is performed that does not form parallel polylines, Expansion __ AjacencyParallelNotFixed (merged path data stores result buffer, offset of results).
After the results are generated, the results buffer is modified using each of the merged information data to recover those vertices that were culled. Foreach (mergeInfo in mergeInfo), mergeInfo.
The final result buffer is then the result of the flaring, i.e., the offset result of the input polyline.
As can be seen from fig. 1(a) to fig. 1(d), the specific implementation of the offset result of vertex No. 0 obtained in step (322) in this embodiment is as follows:
first, when the input polygonal line is composed of 0 vertices or top 1 point, a simple process is performed. For 0 points, the null array is returned directly. For the case of 1 point, this point is added directly to the offset, returning the array new Vector3[ ] { (path [0] + offset) }.
In other cases, Offset is initialized to maintain the cross-section in a perpendicular relationship to the path. Firstly, 2 points of the first line segment of the original path are shifted to generate a new line segment. Then, a vertical plane is made through the first line segment of the original path, and the plane passes through the starting point of the original path. The concrete implementation is as follows: creating a Plane, the parameters being, from left to right, a point on the Plane and the normal direction of the Plane, Plane0 being Plane.
Creating an offset Line segment, wherein the Line segment is actually created as a straight Line of the Line segment, and Line0 ═ new Line () { From ═ path [0] + offset, To ═ path [1] + offset }.
The intersection test is performed on the plane and the straight line, a parameter t of the straight line is returned, if null is returned, the intersection does not exist, and the flow result0 is a plane.
For safety, the exception is thrown without intersection, which facilitates maintenance. if (result0 ═ null) throw (new Exception ("path expansion: error occurred when broken line was expanded")).
The straight line is interpolated using the parameter t to obtain an intersection point, which is also the first result vertex of the path result buffer in the actual calculation, but not necessarily the final result, and a repair process follows, buffer [0] ═ line.
The offset vector is corrected so as to be perpendicular to the first path segment by offset [0] -path [0 ].
In step (323) in this embodiment, the offset results of vertices with indices 1 to N-2 are obtained in sequence and the offset results that need to be repaired are recorded. As shown in fig. 2(a) to 2(b), the step is to detect the intersection of a straight line and a plane without stopping the force. The first plane is defined by the bisector of the first line segment and the second line segment. The first straight line is determined by the first line segment after being shifted by the shift vector. And performing intersection test to obtain intersection points. The concrete implementation is as follows:
a specific process of creating a plane, Vector3ba ═ a-b; vector3bc ═ c-b, where points a, b, and c are the consecutive 3 vertices on the path.
A plane is created through point b and the bisecting Vector is found, Vector3d ba. The cross product operation is used to find the normal Vector3 normal ═ Vector3.cross (ba, bc), d) of the plane to be found.
If the length of the obtained normal vector is very small, the ba and bc vectors are too parallel, and this needs to be handled, the normal vector direction is the bc vector, the parameters are one point on the plane and the plane normal direction, and the plane is geometry.
Normally, a plane is created, and parameters are a point on the plane and a plane normal direction else plane.
In this embodiment, the step (3237) determines whether the intersection is implemented on the ray that starts from the point E ' and is opposite to the line segment E ' F ' as follows:
the line segment AB used for intersection detection is regarded as a ray emitted towards the direction of the point B by taking the point A as a starting point according to the vertex sequence of the path, the ray is the same as the direction of the line segment, and if the intersection point after detection is not on the ray, the result obtained by the intersection detection is on the ray opposite to the line segment. If the parameter t is smaller than 0, the intersection point obtained by the intersection detection is on the ray opposite to the line segment, and the intersection point is the result to be repaired and is an undesirable result.
Detecting the intersection of the straight line and the plane, returning a parameter t of the straight line AB, and solving the intersection point to satisfy P-A + T + A and float t-IntersectLinePlane (line); if t is less than 0, the result of the intersection detection is not ideal, i.e. t is less than 0; and recording the index of the corresponding buffer area of the unreasonable intersection point for repairing.
And (3) using a partial external expansion function, performing basic external expansion operation, wherein parameters are three vertexes a, b and c and whether the parameters are non-ideal results, and obtaining b points after basic external expansion, namely buffer [ i-1] ═ expansion _ partial (path [ i-2], path [ i-1], path [ i ], offset and out inverse). When the result is not ideal, the index of the vertex, i.e. the index if (iso negative) negative indexes of the current b point, add (i-1) is recorded.
After the indices are recorded, the repair phase is entered. Once an intersection result is not ideal, its previous result may be repaired. The first line segment of the path is cut into 2 segments from the middle, and the adjacent line segments are not completely parallel after slightly moving, so that the newly added vertex can be found to be repaired although the newly added vertex is judged to be ideal according to the basic outward expansion calculation flow. The repair does not just repair the undesirable one vertex but refreshes many points.
FIGS. 3(a) -3 (b) are schematic illustrations of the final vertex offset of the present invention; FIG. 4 is a graph of the vertex offset results of the present invention.
The concrete implementation of the vertex-to-be-repaired offset result recorded in the repairing step (23) in (25) in this embodiment is as follows:
the repair is divided into 2-way repair, starting from an undesired point, reverse repair, i.e., reverse repair, in the path vertex order, and forward repair in the path vertex order.
Starting from the reverse repair explanation, for an undesired point, starting from the original path of the point, a cylinder is made, the cylinder is composed of an infinitely extensive cylinder and a top surface and a bottom surface, the direction of the cylinder is determined by the original vertex of the undesired point and the next vertex of the point, the radius of the cylinder is the distance of flaring, and the top surface and the bottom surface of the cylinder respectively use the plane for intersection test in the basic flaring algorithm by using 2 points for generating the direction of the cylinder, and the specific generation steps are shown in fig. 5(a) -5 (d). In a specific algorithm, the top and bottom surfaces of the cylinder need to be shifted outward a little bit to make the cylinder slightly larger, so as to overcome the intersection testing error in the subsequent repair. The cylinders were used for intersection testing for reverse repair.
And then, carrying out a reverse intersection test by using the cylinder, wherein the principle of the intersection test is to find a first reasonable point, and assigning all unreasonable points found in the reverse test, including the unreasonable points repaired by the round, as the first reasonable point. The index of the starting point and the index of the end point of the first test line to be repaired are respectively the index of the unreasonable point minus 2 and the index of the unreasonable point minus 1.
The starting index of the test line, i, is 1. If i is 0, the end point of the line is certainly an unreasonable point, which is obtained by basic outward expansion, and the round is executed on the basis of the unreasonable point without judging the rationality, so that i executes int index _ from ═ index _ negative-i-1 from 1; the end point index int index _ to of the test line is index _ from + 1.
The straight line is then used to perform an intersection test on the cylinder, and the parameter t is also found and used to determine the reasonableness of the point. Specifically, if the line degenerates to a point, i.e., the starting point and the ending point are the same, then it is directly considered as an unreasonable point, and the backtracking is continued, i is incremented and the test is continued.
If a line is found, the value t after the intersection test is larger than or equal to 0, all unreasonable points found by the repair are refreshed by using the reasonable vertex position of the intersection test, and meanwhile, the linear end point of the round is also extended to the reasonable vertex position. Namely, the following steps are executed in the round:
assign buffer (buffer, line. pointatpos (line, t), index _ to, index _ negative); wherein, index _ to is the index of index _ negative-i, i.e. the reasonable vertex position is used to assign the value between the index _ negative-i position of the buffer and the index _ negative position, i.e. the left and right closed sections.
Of course, the backtracking is finite, and the backtracking can be terminated by tracing to the first line segment, if it is an unreasonable point all the time, that is, all the ray starting points of the backtracking line segments are in the repaired cylinder at this time, all the ray starting points can be repaired to a basic value, for example, the vertex result of the unreasonable point, which is basically expanded, is cached first as the basic value, and under the condition that the reverse repair is unreasonable, all the ray starting points are assigned to the basic value, that is:
Vector3 v_negative=buffer[index_negative];
for(int i=1;i<n;i++)......;
AssignBuffer(buffer,v_negative,index_negative-n,index_negative)。
one reverse repair will be performed for all unreasonable points. Thereafter, a forward repair is performed for all the irrational points. The principle of forward repair is the same as reverse repair, but the direction of circulation is not the same.
The forward repair is first to generate a cylinder, the direction of the cylinder used is determined by the original vertex of the non-ideal point and the previous vertex of the point, the reverse repair is the next vertex, the radius of the cylinder is also the distance of the flare, and the top and bottom surfaces of the cylinder are also the planes used for intersection tests in the basic flare algorithm using 2 points of the direction of the generated cylinder, respectively.
And then using the cylinder to carry out intersection test of forward propulsion, wherein the principle of the intersection test is to find a first reasonable point and assign all unreasonable points found in the propulsion, including the unreasonable points repaired by the wheel, as the first reasonable point. The indexes of the starting point and the end point of the first test line to be repaired are respectively the index of the unreasonable point plus 2 and the index of the unreasonable point plus 1, namely: int index _ from ═ index _ negative + i + 1; where the starting index of the test line, i, has an initial value of 1. If i is 0, the end point of the line must be an unreasonable point, which has been obtained by basic extrapolation, and this round is executed on the basis of this unreasonable point without judging the rationality, so i is executed from 1. The end point index int index _ to of the test line is index _ from-1.
The straight line is then used to perform an intersection test on the cylinder, and the parameter t is also found and used to determine the reasonableness of the point. Specifically, if the line degenerates to a point, i.e., the starting and ending points are the same, then it is directly considered an unreasonable point, the progression continues, i increments and the test continues.
If a line is found, the value t after the intersection test is larger than or equal to 0, all unreasonable points found by the repair are refreshed by using the reasonable vertex position of the intersection test, and meanwhile, the linear end point of the round is also extended to the reasonable vertex position. Namely, the following steps are executed in the round:
assign buffer (buffer, line. pointatpos (line, t), index _ to, index _ negative); wherein, index _ to is the index of index _ negative + i, namely, the reasonable vertex position is used to assign the value between the position of index _ negative + i of the buffer and the position of index _ negative, namely the left and right closed sections.
Likewise, in the case of all unreasonable propulsion, the base values are likewise assigned in their entirety.
Vector3 v_negative=buffer[index_negative];
for(int i=1;i<n;i++)......;
The assignBuffer (buffer, v _ negative, index _ negative + n, index _ negative) is different from the reverse repair in that + n is used here because the direction is different.
Although the process of forward repair and reverse repair is substantially the same, when reverse repair is used, it is sufficient to bring the position of the irrational point directly. The unreasonable points are obtained in sequence,
for(int i=0;i<negativeIndices_length;i++){
int fixIndex=negativeIndices[i]。
fix a (fix index, other parameters.);
}
the parameters worth noting for reverse repair include the position fix index of the unreasonable point and the maximum number of times of executing the reverse repair loop, that is, the value n in the loop above, note that i starts from 1, the first loop must be skipped, the number of times of executing the loop is still counted herein, it is considered that the maximum number of times of executing the loop is n, the number of times should be filled in the number of segments needing to be repaired from the unreasonable point to the starting point of the path, if the unreasonable point is 2, the segments needing to be repaired are 01 and 12, 2 segments in total, and the index value of the unreasonable point is equal, and at this time, n is the fix index.
When using forward repair, to get the correct result, the index of the point must be subtracted by one as an unreasonable point for forward repair.
for(int i=negativeIndices.Count-1;i>-1;i--){
int fixIndex=negativeIndices[i]-1;
fix B (fix Index, path _ length-fix Index-1, other parameters.);
}
the parameters of the forward repair that are worth noting include the position fixIndex of the unreasonable point and the maximum number of times of the forward repair loop execution, namely the value n in the loop above, note that i is started from 1, and the loop is skipped for the first time, the present invention still counts the number of times of the forward repair loop execution, and considers that the maximum number of times of the loop execution is n, when the forward repair is performed, the number of times to be repaired from the point to the end of the path is filled, such as the unreasonable point is 3, the number of top points of the path is 6, the index is 0 to 5, the line segment to be repaired is 34, 45, and 2 segments in total, the allocated calculation formula is 6-3-1, namely path _ length-fixIndex-1, and the number of times n at this time is path _ length-fix-index-1.
After the offset fold line corresponding to each vertex of the cross section fold line is obtained according to the offset algorithm, triangular patch data can be generated according to the offset fold line and the fold line to be offset, and the triangular patch data is used for carrying out meshing for subsequent storage and rendering work.
The 3D model generated using the present invention is shown in fig. 6. And converting the cross section data into a plurality of offset result data, wherein the offset result is direction data of a 3D space, namely Vector3, outward expanding the path to generate a plurality of path results, and finally generating a mesh of the outer contour by using the obtained path result set. As shown in fig. 6, the "star" -like shape in the lower left corner is a cross-section described by the offset. The corresponding cross-sectional fold line of this cross-section comprises 8 vertices. The polyline on the right is the guide path, i.e. the polyline to be offset or equivalent to the input polyline in the algorithm, comprising 8 vertices that do not constitute parallel lines. The final outward expansion result according to the offset result is shown in the upper left graph of fig. 6.
The invention does not use the cross section as the basic unit to execute the subsequent grid generation, but uses the expansion of the offset result as the basic unit to execute the subsequent grid generation, and can carry out dynamic optimization and repair on the path during the expansion. The invention expands the path to generate a plurality of path results, and finally generates the mesh of the outer contour by using the obtained path result set. The method can be used for generating the lofted mesh, and can also be used as a calculation scheme for any mesh generation, firstly, the feature path of the mesh is expanded to generate the contour path, and finally, the contour path is used for final generation of the mesh, so that the generated 3D mesh or 2D mesh is more excellent.
The method can be used for generating the 3D model or the 2D model, and can also be used in the fields of animation generation, game engines and the like.

Claims (11)

1. A3D model lofting method based on a computer geometric migration algorithm is characterized in that: the method comprises the following steps:
(1) according to the input of hardware equipment/interaction with other software, obtaining a cross section broken line with M vertex number and a broken line to be deviated;
(2) obtaining an initial offset vector group with the length equal to the number M of the vertex points according to the cross section folding line and the first vertex of the folding line to be offset;
(3) respectively obtaining M offset folding lines corresponding to M vertexes in the cross section folding line by adopting an offset algorithm, wherein the M offset folding lines form a folding line group;
(4) generating triangular patch data by adopting the offset broken line and the broken line to be offset;
(5) and generating the 3D model mesh by adopting the triangular patch data.
2. The computer geometry migration algorithm based 3D model lofting method of claim 1, wherein: the offset algorithm in the step (3) comprises the following steps:
(31) eliminating and recording vertexes of parallel lines formed in the broken lines to be offset;
(32) sequentially obtaining the offset results of vertexes which do not form parallel lines in the to-be-offset folding line corresponding to the kth vertex of the cross-section folding line, wherein k is 1, 2 and 3 ┄ M;
(33) restoring the culled vertices from the record of step (31);
(34) and sequentially obtaining an offset folding line corresponding to the kth vertex of the cross-section folding line according to the offset result, wherein k is 1, 2 and 3 ┄ M.
3. The computer geometry migration algorithm based 3D model lofting method of claim 2, wherein: the step (32) comprises the following steps:
(321) according to the sequence of the broken lines to be offset from the starting point to the end point, declaring indexes i for vertexes which do not form parallel lines, wherein i starts from 0, i is less than or equal to 0 and less than N, and N is the number of vertexes which do not form parallel lines for the broken lines to be offset;
(322) obtaining the offset result of the vertex 0;
(323) sequentially obtaining the offset results of the vertexes with indexes from 1 to N-2 and recording the offset results needing to be repaired;
(324) obtaining the offset result of the vertex No. N-1;
(325) the offset result which needs to be repaired and is recorded in the repairing step (323);
(326) and outputting the deviation result of each vertex of the polyline to be deviated.
4. The computer geometry migration algorithm based 3D model lofting method of claim 3, wherein: the step (322) comprises the following steps:
(3221) let the 0 vertex be point A and the 1 vertex be point B;
(3222) respectively adding the input offset vector by using two points AB to obtain two offset results A 'and B' for initialization; the input offset vector is obtained through the initial offset vector group in the step (2);
(3223) obtaining a plane passing through the point A and perpendicular to the line segment AB;
(3224) and obtaining the intersection point of the straight line where the A 'B' is positioned and the plane, wherein the intersection point is the offset result of the 0 th vertex.
5. The computer geometry migration algorithm based 3D model lofting method of claim 3, wherein: the step (323) comprises the following steps:
(3231) obtaining an input index i;
(3232) let vertex i-1 be point E, vertex i be point F, and vertex i +1 be point G;
(3233) obtaining an angular bisector of the line segment EF and the line segment FG and being perpendicular to a plane formed by the two line segments;
(3234) obtaining a vector of a deviation result of the position of the E point pointing to the E point;
(3235) obtaining a directional line segment E 'F' obtained by shifting the line segment EF by using the vector of the step (3234), wherein the direction of the directional line segment E 'F' is E 'pointing to F';
(3236) obtaining the intersection point of the straight line of the line segment in the step (3235) and the plane obtained in the step (3233);
(3237) judging whether the intersection point is on a ray which takes the E ' point as a starting point and is opposite to the line segment E ' F ', if so, executing a step (3238), and if not, executing a step (3239);
(3238) recording the vertex i as a vertex to be repaired;
(3239) this intersection is the result of the offset of vertex i.
6. The computer geometry migration algorithm based 3D model lofting method of claim 3, wherein: the step (324) comprises the following steps:
(3241) let vertex No. N-2 be J point and vertex No. N-1 be H point;
(3242) obtaining a plane passing through the point H and perpendicular to the segment JH;
(3243) obtaining a vector of the offset result of the J point pointing to the J point;
(3244) obtaining a line segment J 'H' formed by respectively shifting two points of JH by using the vector of the step (3243);
(3245) the intersection of the line segment J 'H' and the plane is obtained, which is the result of the shift of vertex No. N-1.
7. The computer geometry migration algorithm based 3D model lofting method of claim 3, wherein: the step (325) comprises the following steps:
(3251) sequentially inputting recorded indexes of vertexes to be repaired, and reversely repairing each vertex;
(3252) inputting the recorded index of the last vertex of the vertices to be repaired in a reverse order, and repairing each vertex in a forward direction;
(3253) and finishing the repair.
8. The computer geometry migration algorithm based 3D model lofting method of claim 7, wherein: the step (3251) comprises the following steps:
(32511) Recording a deviation result j of a vertex i to be repaired as a point to be covered, and recording the deviation result j as a default value;
(32512) Obtaining a cylinder determined by a vertex i to be repaired and a next vertex i +1 of the vertex to be repaired;
(32513) Obtaining a directed line segment pointing from the offset result j-2 of the vertex i-2 to the offset result j-1 of the vertex i-1;
(32514) Recording an end point j-1 of the directed line segment as a point to be covered;
(32515) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing step (32519); if so, judging whether the intersection point is on a ray which takes the starting point j-2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing step (32516), otherwise, executing step (32518);
(32516) J-1, i-1, if i is larger than or equal to 2, executing step (32513), otherwise executing step (32517);
(32517) Covering all the points to be covered by using a default value, and executing the step (32519);
(32518) Covering all the points to be covered by using the intersection points obtained in the step (32515);
(32519) And finishing reverse repair.
9. The computer geometry migration algorithm based 3D model lofting method of claim 7, wherein: the step (3252) comprises the following steps:
(32521) Recording an offset result j of a vertex i to be repaired as a point to be covered, and recording the offset result j as a default value;
(32522) Obtaining a cylinder determined by a vertex i to be repaired and a vertex i-1 above the vertex i to be repaired;
(32523) Obtaining a directed line segment pointing from the offset result j +2 of the vertex i +2 to the offset result j +1 of the vertex i + 1;
(32524) Recording an end point j +1 of the directed line segment as a point to be covered;
(32525) Judging whether the straight line where the directed line segment is located has an intersection point with the cylinder, if not, executing the step (32529); if the intersection point exists, continuously judging whether the intersection point is on a ray which takes the starting point j +2 of the directed segment as a starting point and is opposite to the directed segment, if so, executing a step (32526), otherwise, executing a step (32528);
(32526) If j is j +1 and i is i +1, if i ≦ N-3, perform step (32523), otherwise perform step (32527);
(32527) Covering all the points to be covered by using a default value, and executing the step (32529);
(32528) Covering all the points to be covered by using the intersection points obtained in the step (32525);
(32529) The forward repair is finished.
10. The computer geometry migration algorithm based 3D model lofting method of claim 8, wherein: the method for obtaining the cylinder in the step (32512) comprises the following steps:
(325121) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j +1 of the next vertex i +1 to be repaired;
(325122) obtaining the infinite curved surface of the straight line of step (325121) which rotates 360 degrees by taking the straight line passing through the vertex i and the vertex i +1 as the rotating axis;
(325123) obtaining a chamfered cylinder surrounded by the curved surface of step (325122), the plane of vertex i in step (3233), and the plane of vertex i + 1.
11. The computer geometry migration algorithm based 3D model lofting method of claim 9, wherein: the method for obtaining the cylinder in step (32522) comprises the following steps:
(325221) obtaining a straight line passing through the offset result j of the vertex i to be repaired and the offset result j-1 of the next vertex i-1 to be repaired;
(325222) obtaining an infinite curved surface which is rotated by 360 degrees by the straight line passing through the vertex i and the vertex i-1 as the rotating axis in the step (325221);
(325223) obtaining a chamfered cylinder surrounded by the curved surface of step (325222), the plane of vertex i in step (3233), and the plane of vertex i-1.
CN202110588305.9A 2021-03-09 2021-05-28 3D model lofting method based on computer geometric migration algorithm Active CN113192158B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110254221 2021-03-09
CN2021102542211 2021-03-09

Publications (2)

Publication Number Publication Date
CN113192158A true CN113192158A (en) 2021-07-30
CN113192158B CN113192158B (en) 2022-08-02

Family

ID=76985649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110588305.9A Active CN113192158B (en) 2021-03-09 2021-05-28 3D model lofting method based on computer geometric migration algorithm

Country Status (1)

Country Link
CN (1) CN113192158B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554760A (en) * 2021-08-05 2021-10-26 网易(杭州)网络有限公司 Reloading method and device, computer equipment and storage medium
CN115690361A (en) * 2022-11-09 2023-02-03 浙江大学 Quick robust free-form surface triangulation method and device
CN116562027A (en) * 2023-05-12 2023-08-08 江苏大学 Two-dimensional continuous collision detection method for circle and line segment set

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030227454A1 (en) * 2002-06-07 2003-12-11 Hermann Kellermann Process and computer system for generating a multidimensional offset surface
CN103136790A (en) * 2011-11-29 2013-06-05 达索系统公司 Creating a surface from a plurality of 3d curves
CN109190255A (en) * 2018-09-05 2019-01-11 武汉大学 One kind is towards city three-dimensional property right space multistory reconstructing method
CN109636879A (en) * 2018-12-07 2019-04-16 中南大学 Polygonal Curves migration algorithm with island
CN109887052A (en) * 2019-01-29 2019-06-14 广联达科技股份有限公司 A kind of planar polygons offset method
CN110688713A (en) * 2019-08-26 2020-01-14 国网上海市电力公司 Circuit connection system of three-dimensional design of electric equipment of power transformation engineering

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030227454A1 (en) * 2002-06-07 2003-12-11 Hermann Kellermann Process and computer system for generating a multidimensional offset surface
CN103136790A (en) * 2011-11-29 2013-06-05 达索系统公司 Creating a surface from a plurality of 3d curves
CN109190255A (en) * 2018-09-05 2019-01-11 武汉大学 One kind is towards city three-dimensional property right space multistory reconstructing method
CN109636879A (en) * 2018-12-07 2019-04-16 中南大学 Polygonal Curves migration algorithm with island
CN109887052A (en) * 2019-01-29 2019-06-14 广联达科技股份有限公司 A kind of planar polygons offset method
CN110688713A (en) * 2019-08-26 2020-01-14 国网上海市电力公司 Circuit connection system of three-dimensional design of electric equipment of power transformation engineering

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
XU-ZHENG LIU等: ""An offset algorithm for polyline curves"", 《COMPUTERS IN INDUSTRY》 *
付思源 等: "《3DSMAX游戏动画案例高级教程 中文版》", 31 August 2016 *
张弓 等: ""沿路径放样建模在3维GIS中的设计与实现"", 《测绘与空间地理信息》 *
秦睿等: "基于距离场的二维偏移曲线快速生成方法", 《浙江大学学报(理学版)》 *
许晓萍 等: ""计算机图像处理技术在茶具设计中的应用研究"", 《福建茶叶》 *
赵涛 等: ""3ds_Max中二维图形转三维模型的常用建模方法"", 《电脑知识与技术》 *
黄明等: "三维管网自动建模研究", 《地理信息世界》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113554760A (en) * 2021-08-05 2021-10-26 网易(杭州)网络有限公司 Reloading method and device, computer equipment and storage medium
CN113554760B (en) * 2021-08-05 2024-02-13 网易(杭州)网络有限公司 Method and device for changing package, computer equipment and storage medium
CN115690361A (en) * 2022-11-09 2023-02-03 浙江大学 Quick robust free-form surface triangulation method and device
CN115690361B (en) * 2022-11-09 2024-01-30 浙江大学 Rapid and robust free-form surface triangulation method and device
CN116562027A (en) * 2023-05-12 2023-08-08 江苏大学 Two-dimensional continuous collision detection method for circle and line segment set
CN116562027B (en) * 2023-05-12 2023-11-28 江苏大学 Two-dimensional continuous collision detection method for circle and line segment set

Also Published As

Publication number Publication date
CN113192158B (en) 2022-08-02

Similar Documents

Publication Publication Date Title
CN113192158B (en) 3D model lofting method based on computer geometric migration algorithm
Tang et al. Interactive continuous collision detection between deformable models using connectivity-based culling
JP5361793B2 (en) A method for reconstructing the swept volume distance field at the sample point.
US5710709A (en) NC milling simulation and dimensional verification via dexel representation
US6307554B1 (en) Apparatus and method for generating progressive polygon data, and apparatus and method for generating three-dimensional real-time graphics using the same
US5774124A (en) Finite element modeling method and computer system for converting a triangular mesh surface to a quadrilateral mesh surface
Casale et al. An overview of analytic solid modeling
Zhou et al. 2.5 D building modeling with topology control
US20050146522A1 (en) Accelerated ray-object intersection
CN103649856A (en) Method for simulating machining of objects by motion of tool and system and computer program product therefor
KR102242566B1 (en) Apparatus and method for processing ray tracing
CN111028335B (en) Point cloud data block surface patch reconstruction method based on deep learning
JPH0727579B2 (en) Graphics processing device and method and pixel memory device
JPH07120434B2 (en) Method and apparatus for volume rendering
Dorai et al. From images to models: Automatic 3D object model construction from multiple views
CN1936962A (en) Large-landform generation method based on PC platform in 3-D game
CN112862956A (en) Human body and garment model collision detection and processing method based on HRBFs
US10460506B2 (en) Method and apparatus for generating acceleration structure
Greß et al. Object-space interference detection on programmable graphics hardware
JP3341548B2 (en) Method and apparatus for generating three-dimensional shape data
JP2881389B2 (en) Automatic mesh generation method and system
Hu et al. Optimization of collision detection algorithm based on OBB
JP3410079B2 (en) 3D skeleton data error absorption device
JP6093704B2 (en) Drawing apparatus, drawing method, and drawing program
Weier et al. Generating and rendering large scale tiled plant populations

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211123

Address after: 212013 No. 301, Xuefu Road, Zhenjiang, Jiangsu

Applicant after: JIANGSU University

Address before: 211106 jinwangfu community, heding bridge, Jiangning District, Nanjing City, Jiangsu Province

Applicant before: Liu Mengqi

Applicant before: jiangsu university

GR01 Patent grant
GR01 Patent grant