CN102222353A - Curve drawing method based on secondary B spline iteration - Google Patents
Curve drawing method based on secondary B spline iteration Download PDFInfo
- Publication number
- CN102222353A CN102222353A CN2011101340685A CN201110134068A CN102222353A CN 102222353 A CN102222353 A CN 102222353A CN 2011101340685 A CN2011101340685 A CN 2011101340685A CN 201110134068 A CN201110134068 A CN 201110134068A CN 102222353 A CN102222353 A CN 102222353A
- Authority
- CN
- China
- Prior art keywords
- curve
- vector
- individual
- coordinate
- iteration
- 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.)
- Pending
Links
Images
Abstract
The invention discloses a curve drawing method based on secondary B spline iteration. In the method, a curve passing through each coordinate point is drawn by using a computer according to a given periodic coordinate point. The method comprises the following steps of: inputting a super vector of the given periodic coordinate point; performing boundary supplementation on the super vector with a boundary supplementation method to obtain a new super vector; computing an approximate B spline curve by taking the new super vector as an initial control point; recording a coordinate value on the approximate B spline curve; and computing an error super vector and judging whether next iteration is needed according to the condition of whether the error super vector meets a given accuracy requirement. Compared with the prior art, the method has the advantages of high convergence rate of a drawn curve, high convergence accuracy, convenience for local modification and the like.
Description
Technical field
The present invention relates to a kind of method of utilizing computing machine to carry out curve plotting, relate in particular to a kind of curve plotting method based on the Quadric Spline iteration.
Background technology
So-called curve approach rendering technique be exactly with computer realization to needing the drafting of curve, make it approach actual required curve as far as possible.The key problem that the realization curve approaches rendering technique is to find a kind of algorithm with high efficiency and accuracy, makes it can draw out curve required in the actual production easily and fast.Curve not only has a wide range of applications in Precision Machinery Designs such as aircraft, steamer, automobile, aerospace flight vehicle, and the important research content in it still is computational mathematics fields such as data are approached, numerical differentiation, Numerical solution of partial defferential equatio, computational geometry, computer graphics.Enter the nineties in 20th century, the research that develops into curve soft, hardware of computing machine provides powerful expulsive force.Develop into now, curve approach, the theory of aspects such as interpolation, match has been very perfect, and successfully be used in the industrial and agricultural production.But also formed simultaneously the matured product of large quantities of curve plottings in the world, as AUTOCAD, 3DMax, corelDraw, Photoshop etc., the domestic well-known software such as CAD of hoping in also having.Realize at present the several different methods of having approached of curve, existing curve approaches, fitting algorithm is generally based on interpolating spline or approach batten, and the drafting of carrying out curve based on SPL has become a kind of trend of curve plotting technology.During concrete enforcement, very crucial to the selection of SPL.In " Computer-aided Geometric Design and non-uniform rational B-spline " (Higher Education Publishing House) and " numeric representation of curve curve and approach " (Shanghai science tech publishing house), multiple interpolation method and approach method have been introduced.But because all there are certain shortcoming in these two kinds of battens, such as interpolating spline can not carry out local modification, and the degree of accuracy of approaching batten is not high.So in actual applications, if require product both to have good degree of accuracy and slickness, can conveniently carry out local modification again, existing algorithm just can not meet the demands.Therefore, how to overcome the limitation of prior art, propose a kind of new curve and approach rendering technique, make new rendering technique under the prerequisite that keeps the prior art advantage, overcome the defective of prior art, just become the focus of scholar's concern of association area.
Summary of the invention
Technical matters to be solved by this invention is to overcome the deficiencies in the prior art, and a kind of curve plotting method based on the Quadric Spline iteration is provided, and this method both can make curve have higher degree of accuracy and slickness, was convenient to carry out local modification again.
The present invention is specifically by the following technical solutions:
A kind of curve plotting method based on the Quadric Spline iteration according to given periodicity coordinate points, utilizes the curve of computer drawing through each coordinate points, may further comprise the steps:
The super vector of steps A, the given periodicity coordinate points of input
, super vector
Expression formula as follows,
In the formula,
Be respectively the 1st, the 2nd ...,
NThe coordinate vector of individual given periodicity coordinate points,
NBe the number of given periodicity coordinate points,
,
,
Represent respectively
Individual
Axle,
Axle,
Coordinate components on the axle,
Step B, usefulness border replenishment are to super vector
Carrying out the border replenishes and to obtain new super vector
Step C, with coordinate points
As initial control point, calculate approximate B-spline curves according to following formula
,
Wherein
Be given
Individual some process
The curve of approximation that obtains after the inferior iteration;
Step D, usefulness
The approximate B-spline curves of record
Go up corresponding to
Coordinate figure;
Step e, error of calculation super vector
, and whether error in judgement reach given accuracy requirement, if then stop algorithm and curve of output; If not, then change step F;
Step F, pass through
Calculate new reference mark
, use
The approximate B-spline curves of record
Go up corresponding to
Coordinate figure, pass through then
Error of calculation super vector carries out iteration successively once more, up to reaching default accuracy requirement, curve of output.
Preferably, described in the step B to super vector
Carry out the additional interpolation end-point data that is meant in border
,
, obtain new super vector then
, wherein
, wherein
NNumber for given periodicity coordinate points.
Preferably, the specific implementation method of step D is as follows:
With
Write down approximate B-spline curves
Go up corresponding to
Coordinate figure; Wherein
And
,
,
NNumber for given periodicity coordinate points.
The present invention is by improving on the basis of existing curve approximate algorithm, overcome that the prior art precision is not high, the defective of curve local modification inconvenience.Compared to existing technology, the present invention has advantages such as institute's curve plotting fast convergence rate, convergence precision height and local modification convenience.
Description of drawings
Fig. 1 is the principle schematic of the inventive method;
The curve that Fig. 2 draws for coordinate points given in advance;
The fabric fibre structure of Fig. 6 for adopting the inventive method to draw.
Embodiment
Below in conjunction with accompanying drawing technical scheme of the present invention is elaborated:
Curve plotting method based on the Quadric Spline iteration of the present invention, its principle specifically may further comprise the steps as shown in Figure 1:
The super vector of steps A, the given periodicity coordinate points of input
Super vector herein
Refer in the space given in advance with x, y, z axle to be a series of coordinate points of coordinate, these coordinate points all need on the curve of being drawn, super vector
Expression formula as follows,
In the formula,
Be respectively the 1st, the 2nd ...,
NThe coordinate vector of individual given periodicity coordinate points,
NBe the number of given periodicity coordinate points,
,
,
Represent respectively
Individual
Axle,
Axle,
Coordinate components on the axle,
7 coordinate points given in advance in the present embodiment are as follows:
Step B, usefulness border replenishment are to super vector
Carrying out the border replenishes and to obtain new super vector
Specifically be meant the interpolation end-point data
,
, obtain new super vector then
, wherein
, wherein
NNumber for given periodicity coordinate points;
Step C, with coordinate points
As initial control point, calculate approximate B-spline curves according to following formula
,
Wherein
Be given
Individual some process
The curve of approximation that obtains after the inferior iteration;
Step D, usefulness
The approximate B-spline curves of record
Go up corresponding to
Coordinate figure; Specifically can adopt following method: use
Write down approximate B-spline curves
Go up corresponding to
Coordinate figure; Wherein
And
,
,
NNumber for given periodicity coordinate points;
Step e, error of calculation super vector
, and whether error in judgement reach given accuracy requirement, if then stop algorithm and curve of output; If not, then change step F; Wherein, error super vector
Obtain according to following formula:
Step F, pass through
Calculate new reference mark
, use
The approximate B-spline curves of record
Go up corresponding to
Coordinate figure, pass through then
Error of calculation super vector carries out iteration successively once more, up to reaching default accuracy requirement, curve of output; In the present embodiment, the numerical value approximate procedure data variation in the curve plotting process is as shown in table 1 below, and wherein, k represents iterations.
Table 1
? | i=0 | i=1 | i=2 | i=3 | i=4 | i=5 | i=6 | i=7 | I=8 |
k=1 | -4.25 | 4.25 | 3.75 | 1.125 | 4.125 | 2.375 | -3.375 | -4.25 | 4.25 |
k=2 | -5.4219 | 5.375 | 4.0156 | 0.42188 | 4.7188 | 2.875 | -3.9844 | -5.4219 | 5.375 |
k=3 | -5.7793 | 5.7695 | 4.0293 | 0.13867 | 4.8926 | 3.002 | -4.0527 | -5.7793 | 5.7695 |
k=4 | -5.9094 | 5.9111 | 4.0188 | 0.044434 | 4.9556 | 3.0205 | -4.041 | -5.9094 | 5.9111 |
k=5 | -5.9611 | 5.9641 | 4.0103 | 0.014313 | 4.9808 | 3.0158 | -4.0241 | -5.9611 | 5.9641 |
k=6 | -5.9828 | 5.9849 | 4.0053 | 0.0046997 | 4.9914 | 3.0094 | -4.0129 | -5.9828 | 5.9849 |
k=7 | -5.9922 | 5.9934 | 4.0026 | 0.0015888 | 4.9961 | 3.005 | -4.0065 | -5.9922 | 5.9934 |
k=8 | -5.9964 | 5.9971 | 4.0013 | 0.00055784 | 4.9982 | 3.0026 | -4.0032 | -5.9964 | 5.9971 |
k=9 | -5.9983 | 5.9987 | 4.0006 | 0.00020481 | 4.9992 | 3.0013 | -4.0016 | -5.9983 | 5.9987 |
k=10 | -5.9992 | 5.9994 | 4.0003 | 7.8903e-005 | 4.9996 | 3.0006 | -4.0008 | -5.9992 | 5.9994 |
k=11 | -5.9996 | 5.9997 | 4.0001 | 3.1865e-005 | 4.9998 | 3.0003 | -4.0004 | -5.9996 | 5.9997 |
k=12 | -5.9998 | 5.9999 | 4.0001 | 1.3422e-005 | 4.9999 | 3.0001 | -4.0002 | -5.9998 | 5.9999 |
k=13 | -5.9999 | 5.9999 | 4 | 5.8523e-006 | 5 | 3.0001 | -4.0001 | -5.9999 | 5.9999 |
k=14 | -6 | 6 | 4 | 2.6204e-006 | 5 | 3 | -4 | -6 | 6 |
k=15 | -6 | 6 | 4 | 1.1962e-006 | 5 | 3 | -4 | -6 | 6 |
The reference mark | -6.00 | 6.00 | 4.00 | 0.00 | 5.00 | 3.00 | -4.00 | -6.00 | 6.00 |
Resulting curve passes through after the iteration 15 times as shown in Figure 2 as we can see from the figure during iteration 15 times, and the curve of being drawn has approached actual required curve very much; And by table 1 as can be seen, the curve plotting precision of this moment is unusual height, and 15 operations on computers of iteration are very fast, and this speed that this method operation is described is very fast also.
Fig. 3-Fig. 5 is the curve that adopts the common mathematical function that the inventive method draws, and wherein, Fig. 3 is a function
Curve, Fig. 4 is a function
Curve, Fig. 5 is a function
Curve.Concrete drawing process is identical with a last embodiment, repeats no more herein.
The inventive method can be write out corresponding computer programs easily according to actual conditions, thereby can be widely used in the middle of the industrial design, the fibrous structure chart of a cloth that Fig. 6 draws for the software that is used for textile industry that adopts the inventive method to write.
Claims (4)
1. the curve plotting method based on the Quadric Spline iteration according to given periodicity coordinate points, utilizes the curve of computer drawing through each coordinate points, it is characterized in that, may further comprise the steps:
The super vector of steps A, the given periodicity coordinate points of input
, super vector
Expression formula as follows,
In the formula,
Be respectively the 1st, the 2nd ...,
NThe coordinate vector of individual given periodicity coordinate points,
NBe the number of given periodicity coordinate points,
,
,
Represent respectively
Individual
Axle,
Axle,
Coordinate components on the axle,
Step B, usefulness border replenishment are to super vector
Carrying out the border replenishes and to obtain new super vector
Step C, with coordinate points
As initial control point, calculate approximate B-spline curves according to following formula
,
Wherein
Be given
Individual some process
The curve of approximation that obtains after the inferior iteration;
Be given
Individual some process
The vector that obtains after the inferior iteration;
Step D, usefulness
The approximate B-spline curves of record
Go up corresponding to
Coordinate figure;
Step e, error of calculation super vector
, and whether error in judgement reach given accuracy requirement, if then stop algorithm and curve of output; If not, then change step F;
2. according to claim 1 based on the curve plotting method of Quadric Spline iteration, it is characterized in that, described in the step B to super vector
Carry out the additional interpolation end-point data that is meant in border
,
, obtain new super vector then
3. according to claim 1 based on the curve plotting method of Quadric Spline iteration, it is characterized in that the specific implementation method of step D is as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101340685A CN102222353A (en) | 2011-05-24 | 2011-05-24 | Curve drawing method based on secondary B spline iteration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2011101340685A CN102222353A (en) | 2011-05-24 | 2011-05-24 | Curve drawing method based on secondary B spline iteration |
Publications (1)
Publication Number | Publication Date |
---|---|
CN102222353A true CN102222353A (en) | 2011-10-19 |
Family
ID=44778897
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2011101340685A Pending CN102222353A (en) | 2011-05-24 | 2011-05-24 | Curve drawing method based on secondary B spline iteration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102222353A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103676786A (en) * | 2013-12-23 | 2014-03-26 | 北京航空航天大学 | Curve fairing method based on accelerated speed principle |
CN103680177A (en) * | 2013-12-03 | 2014-03-26 | 上海交通大学 | Intelligent vehicle speed prompting driving system based on mobile phone |
CN104931362A (en) * | 2015-06-09 | 2015-09-23 | 中华人民共和国昆山出入境检验检疫局 | Drop height fitting method |
CN109614574A (en) * | 2018-11-23 | 2019-04-12 | 成都景中教育软件有限公司 | The implementation method of iteration in a kind of dynamic geometry software |
CN110097613A (en) * | 2019-05-08 | 2019-08-06 | 广西大学 | A kind of B-spline curves generation method and system based on probability calculation |
CN111325815A (en) * | 2020-03-05 | 2020-06-23 | 成都威爱新经济技术研究院有限公司 | Editing method of multi-level B-spline curve |
-
2011
- 2011-05-24 CN CN2011101340685A patent/CN102222353A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103680177A (en) * | 2013-12-03 | 2014-03-26 | 上海交通大学 | Intelligent vehicle speed prompting driving system based on mobile phone |
CN103680177B (en) * | 2013-12-03 | 2016-06-01 | 上海交通大学 | Based on the intelligent vehicle speed prompting driving system of mobile phone |
CN103676786A (en) * | 2013-12-23 | 2014-03-26 | 北京航空航天大学 | Curve fairing method based on accelerated speed principle |
CN103676786B (en) * | 2013-12-23 | 2016-05-25 | 北京航空航天大学 | A kind of curve smoothing method based on acceleration principle |
CN104931362A (en) * | 2015-06-09 | 2015-09-23 | 中华人民共和国昆山出入境检验检疫局 | Drop height fitting method |
CN104931362B (en) * | 2015-06-09 | 2018-02-02 | 中华人民共和国昆山出入境检验检疫局 | Falling height approximating method |
CN109614574A (en) * | 2018-11-23 | 2019-04-12 | 成都景中教育软件有限公司 | The implementation method of iteration in a kind of dynamic geometry software |
CN110097613A (en) * | 2019-05-08 | 2019-08-06 | 广西大学 | A kind of B-spline curves generation method and system based on probability calculation |
CN110097613B (en) * | 2019-05-08 | 2023-08-25 | 广西大学 | B spline curve generation method and system based on probability calculation |
CN111325815A (en) * | 2020-03-05 | 2020-06-23 | 成都威爱新经济技术研究院有限公司 | Editing method of multi-level B-spline curve |
CN111325815B (en) * | 2020-03-05 | 2023-05-02 | 成都威爱新经济技术研究院有限公司 | Editing method of multi-level B spline curve |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102222353A (en) | Curve drawing method based on secondary B spline iteration | |
CN109683552B (en) | Numerical control machining path generation method on complex point cloud model guided by base curve | |
CN106156383A (en) | A kind of parametrization aerodynamic configuration digital-to-analogue and structured grid automatic generation method | |
Xiu et al. | A constructive approach toward a parametric pattern-making model | |
CN105005673A (en) | Whole machine static stiffness matching and designing method in view of machine tool top-down design | |
CN102023616A (en) | Triangle Bezier curved surface numerical-control finishing tool-path quick generation method | |
Wang et al. | Design and implementation of five-axis transformation function in CNC system | |
CN107145643B (en) | Intelligent design system and design method for sheet metal sculpture profile steel frame | |
CN113987610B (en) | Matching method of different-resolution clothing curved surface meshes based on mesh mapping | |
Du et al. | Sliding mode control with third-order contour error estimation for free-form contour following | |
CN103942397A (en) | Shape-correction gear digital modeling method based on power function | |
CN105243183A (en) | Product structure parameterized design optimization method and system | |
Kukreja et al. | An efficient iso-scallop toolpath planning strategy using voxel-based computer aided design model | |
Yu et al. | On the efficiency of the advancing-front surface mesh generation algorithm | |
Sun et al. | Realizing product serialization by Grasshopper parametric design | |
Li et al. | Automatic design for trimming die insert of automotive panel | |
CN108875153A (en) | A kind of text engraving method based on CATIA three-dimensional geological model | |
Lee et al. | Cross-directional feed rate optimization using tool-path surface | |
CN104573846A (en) | Polymorphic job shop layout optimization method based on CA-PSO (Cellular Automata-Particle Swarm Optimization) hybrid optimization algorithm | |
CN112330679B (en) | Numerical control machining-oriented free-form surface segmentation method and system | |
CN110555267A (en) | Parameterized horizontal set structure topology optimization method based on implicit B-spline | |
CN113111553A (en) | Interpolation deformation grid-based large deformation motion numerical simulation method | |
Kim et al. | Development of a platform for realistic garment drape simulation | |
CN101499180A (en) | Visualization conversion method for clothing collar two-dimension parameter to three-dimension effect drawing | |
Chen | Development and application of CAD technology |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20111019 |