三次b样条曲线的公式算法(Formula algorithm of three B spline curve)_第1页
三次b样条曲线的公式算法(Formula algorithm of three B spline curve)_第2页
三次b样条曲线的公式算法(Formula algorithm of three B spline curve)_第3页
三次b样条曲线的公式算法(Formula algorithm of three B spline curve)_第4页
三次b样条曲线的公式算法(Formula algorithm of three B spline curve)_第5页
已阅读5页,还剩8页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、三次b样条曲线的公式算法(Formula algorithm of three B spline curve)Data worth havingFrom the usual study, accumulation and summaryWhere there is a problem, there must be somePlease also criticize and correct me!Import and export of spline curves in IDLAbstract: by introducing IDL language and spline curveElicit

2、 the necessity of importing and exporting in the languageAnd pay for itFinally, the specific problems in the implementation process are prospectedKeywords: IDL; spline curve; import; export1 OverviewIDL (Interactive Data Language) language is a data analysis and visualization application and program

3、ming languageIDL describes interfaces in a neutral wayObjects that run on different platforms and programs written in different languages can communicate and communicate with each otherIDL was originally used in the late 70s to help scientists analyze data sent by Mars exploration satellitesConverti

4、ng vast amounts of data into graphicsFrom then onIDL has been widely usedUser dayGeometrically increasingIDL users can quickly and easily use this software to convert data into imagesFacilitate analysis and understandingImages transformed by software can be simple colorsIt can also be panchromatic 3

5、D images and modelsAt present, in the prediction of Oceanic and atmospheric change modeling (Swiss Meteorological Association IDL is selected as the universal development environment), interactive visualization environment (Zurich GIS laboratory), sea ice monitoring assist ship safety exercise (by t

6、he British National Space Centre (BNSC) fundingIDL is widely used in the field of ice station, founded by Earth Resources Science LimitedHeres a spline curveA spline curve is a smooth curve that passes through a set of pointsFirstSpline curves are obtained by means of a physical splineA thin strip o

7、f wood (or Plexiglas) made of elastic materialFix to the set point of the curve by pressing the ironThe curve drawn by a spline as a natural curve is a spline curveThe spline curves are determined not only by the ordinal valuesAnd the first and two derivatives are continuous at each type of point of

8、 valueThat is, the curve has the characteristics of continuous and uniform curvature variationNon-uniform rational B spline curve (NURBS)It is a spline curve with a wide range of usesIt can be used not only to describe free curves and surfacesIt also provides a uniform expression including various g

9、eometric bodies that can express conic curves and surfaces accuratelySince 1983SDRC has successfully applied the NURBS model to its entity modeling softwareNURBS has become the basis of geometric modeling for computer aided design and computer aided manufacturingHave been widely usedIt is precisely

10、these properties of spline curvesTherefore, in some projects it is necessary to import and export (Note: the spline here mainly refers to the non-uniform rational B spline)At present, smooth import is necessary to import and export spline curvesBut the precise aspect needs to be improvedThe method o

11、f this paper has solved the defect of this aspect very wellHere is how to import and export spline curves in IDL languageImport of spline curve in 2 IDLAnyone familiar with the DXF file format knows itThe DXF file stores file information in the form of segmentsIf you want full and accurate access to

12、 all the information in the DXF format file and display itThis is not very practicalUnless the system itself has a very similar functional orientation and application requirements with the CADthereforeUnder normal circumstancesWe will only be in accordance with the requirements of our development, t

13、he document will be the most important informationGeometric entitieslayerBlock, nesting, etc. read outThen use IDLs own graphical system to express the informationAverageUse IDL to read and display DXF format filesThere are three main ways:1. use IDL to call other language functions available to obt

14、ain the required file information2. read the whole file with the IDL method of readThen, according to the file structure published by DXFRead the various graphic information contained in the file in row and field Tags3. use the idlffdxf class in IDLYou can read most of the entity informationHere, we

15、 mainly use second and third or two ways to read the relevant information of DXFFor example, the spline curve type is 17A brief overview of the implementation process follows:ODXF = OBJ_NEW (IDLffDXF); created object in DXF formatT=oDXF-Read (filename); read the file nameIF T EQ 1 THEN BEGINDxfTypes

16、 = oDXF-GetContents (COUNT=typeCounts); gets the DXF typeIf dxfTypes EQ 17 then beginRead the code operation of DXFEndifENDIFWe know spline curve, it has the fitting point, control point, order, tolerance, color, line and so onThese messages are read when the information is readThe method of reading

17、 is:Temp=Openr, FP, file, /get_lun; file= path + file nameReadf, FP, TempIn this way, read onAnd obtain the relevant information based on the attributes of the desired valueFor example, the coordinate values of the fitted points are obtainedWe know that DXF comes after 70 (X)So judge whether there i

18、s 70 (X value)If there isSee if there are 71 (Y) and 72 (Z) values in the backIf only 70 is not necessarily the coordinate X value of the fitting pointNormallyWe just need to draw by fitting pointsIt should be noted that after reading the property information of the spline curveThe obtained fitting

19、point data is redrawn in IDL by the algorithm of 3 B spline curvesAnd the corresponding attribute valueLinewidthThe color, etc., is assigned to the curveThe implementation is as follows:Obj-setproperty, color=colorThick=b, style=a; color is the color of the curveA is linear, and B is widthThe specif

20、ic implementation effect is shown in figure 1-1:Fig. 1 introduction of spline curveThe derivation of spline curves in 3 IDLOf course, the export of spline curves is very simpleThe specific implementation can be based on the file interface object IDLffDXF of IDLIDL internal data can be exported to a.

21、Dxf format fileThe approximate method is:ODXF = OBJ_NEW (IDLffDXF)Line = IDL_DXF_POLYLINELine.dxf_type = 7Line.layer=layernameLine.extrusion=0.0,0.0,1.0Currobj-getproperty, thick=tempLine.thickness=tempCurrobj-getproperty, data=tempN= (size (Temp) 2Line.vertices=ptr_new (Temp)Currobj-getproperty, po

22、lylines=tempNt=n_elements (Temp)Currobj-getproperty, color=clIcol=op-nearestcolor (cl0, cl1, cl2)Line.color=icolODXF-putentity, linePtr_free, line.verticesPtr_free, line.connectivityOf coursePrior to this, you must parameterize the file structure in accordance with DXFThe specific implementation eff

23、ect is shown in figure 1-2:Fig. 2 the effect drawing of spline curve4 outlookSo far, this functionality has been implementedBut when the function is fittedIf the point of control is not good, the effect is not idealFor example, if the curve has too many pointsAdding too many points is slowerIf the c

24、urve points lessThere are too few points addedThe curve doesnt work very wellInto a fold line and so onAll these things need to be consideredThe selection of the fitting point is the key point and the difficulty we need to considerReference:1 Han Ming,.IDL. Visualization analysis and application. Beijing: Northwestern Polytechnical University press, 2006.2Martin, Gudgin., Song

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论