Descriptions of examples:

Описания примеров:

1) Example of construction of NURBS curve on closed polyline. 1

2) Example of structuring the curve (circle) by tangent polyline and of construction NURBzS curve approximating the geometrically exactly circle. 10

3)  Example of Creation on s - formed Polyline. 18

4) Example of modeling of curve with one inflection point using a tangent polyline. 23

5)  Example of improvement of closed NURBS curve third degree, drawn in AutoCAD on nodal points (edited points)  28

6) Example of  improvement of NURBS curve tenth degree, modeled using s-polygon in AutoCAD.. 33

7) Example of improving spatial curve Helix drawn in AutoCAD. 37

8) Example of improvement of NURBS curve seventh degree constructed on edited points in Alias Design   40

 

 

1) Example of construction of NURBS curve on closed polyline.

 

Polyline represented as the NURBS-sketch of degree 1.  Draw the spline order 1 on circle.

 

Vertices are distributed non uniform along the circle.

Save the drawing in folder CAD_NURBS as Circle1Degree.dxf in format of AutoCAD 2004 DXF

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\Circle1Degree.dxf";

OUTFILE = "Fair_NURBS\\FCircle1Degree.dxf";

 

Don’t change default params:

(*  Refining options for create v-curve *)

fairings =   2;  (* 1 - None, 2 - Fairing on base points, 3 - Fairing on tangents *)

NHermite = 1; (* Number of reparametrisation points,

if  NHermite < 5, then Number of points = Number of segments + 1 *)

redistributing =   2; (* 1 - off, 2 - on, option redistributes points on v-curve for improving the quality of approximation *)

 

subdivide =   1; (*  1 - off, 2- on, subdivision of v-curve increases twice the \

number of segments *)

 

NHermite = 1; (* Number of reparametrisation points,

if  NHermite < 5, then Number of points = Number of segments + 1 *)

uCreate = 2; (* 3 - NURBzS approximation, 2 - BSpline approximation *)

 (* set options for approximation by b-  spline curve  *)

 

  order = 2; (* 1 - 6 degree, 2 - 8 degree, 3 - 10 degree *)

 

  FixCvtU0 = 1; (* 1-Off, 2-On, on refining program uses the value of curvature in start point *)

  FixCvtUk =  1;(* 1-Off, 2-on, on refining program uses the value of curvature in end point*)

  

 

Evaluate notebook.

Notebook prepares the Hermite GD

In accordance with the specified options and the application logic is constructed NURBS curve on the Hermite GD.

 

Notebook displays the Curve,

 

curvature graph  as k=F(l) and curvature graph over the curve

 

 

This example demonstrates the robustness of the methods to the non-uniformity of arrangement of base points on the contour of the curve.

 

From macroparams the param

Variation of Curvature = 0.0000143947

shows very high quality of approximation by b-spline degree 8 at this fairing options .

 

Go to section Dynamic Editing

 

In the section of dynamic editing, press ReCreate [on]. Then go to Fairings [on Tangents] and repeat the rebuilding curve ReCreate [on]. Make sure that the dual geometric determinant defines the same curve.

You may edit the curve on Hermite GD by moving base points

 

By changing directions of tangent vectors

 

By changing the values of curvature in base points (at option fairing None)

 

 

 

 

Пример построения NURBS кривой на полилинии. Вершины неравномерно распределены по окружности. Пример демонстрирует устойчивость методов к неравномерности расположения опорных точек по контуру кривой. Полилиния представлена NURBS-эскизом степени 1. В соответствии с заданными опциями  и логикой программы формируется NURBS кривая на опорной ломаной. В разделе динамического редактирования нажмите ReCreate [on]. Затем перейдите к Fairings [on Tangents] и повторите перестроение кривой  ReCreate [on]. Убедитесь, что дуальный геометрический определитель определяет ту же кривую.

 

2) Example of structuring the curve (circle) by tangent polyline and of construction NURBzS curve approximating the geometrically exactly circle

 

 

Draw the polyline tangent to circle. Tangent polyline represented as NURBS curve of degree 2. Create spline degree 2 with control polygon coincident with tangent polyline.

 

Save the drawing in folder CAD_NURBS as TngOnCircle.dxf in format of AutoCAD 2004 DXF.

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ TngOnCircle.dxf";

OUTFILE = "Fair_NURBS\\FTngOnCircle.dxf";

 

Don’t change other params.

Evaluate the notebook.

Notebook prepares the Hermite GD on NURBS-sketch

 

In accordance with the specified options and the application logic is constructed NURBS curve on the Hermite GD.

 

Notebook displays the Curve,

 

and curvature graphs

 

From macroparams the params

Min Curvature = 0.00999999

Max Curvature = 0.01

Variation of Curvature = 2.34453*10^-8

show very high quality of approximation by b-spline degree 8 at this fairing options .

 

Go to the section Dynamic Editing

 

In the section of dynamic editing, press ReCreate [on].

 

 

Then switch on the type of refining Fairings [on Points] and repeat the rebuilding curve by ReCreate [on].

 

 

Make sure that the dual geometric determinant defines the same curve. Change the method of approximation by Approximation [B-Spline].

B-spline passes exactly through the base points, but the quality is worse than the approximation by NURBzS curve.

 

For improving the quality switch on the option Redistributing

Visually the excellent result is obtained. Check the curvature graph. Select the Cell after  title “Drawing the graphs of  curvature of Faired Curve” and press Shift+Enter

Check the params. Select the Cell after  title “Macroparams of faired NURBS curve” and press Shift+Enter.

 

Min Curvature = 0.00999967

Max Curvature = 0.0100003

Variation of Curvature = 6.56173*10^-7

 

Obtained also the high quality of approximation with enable option Redistributing.

 

Using the enable option “Subdivide all” you may also increase the quality of b-spline approximation.

   

See graphics

and params

Min Curvature = 0.00990887

Max Curvature = 0.0100919

Variation of Curvature = 0.000183066

 

You may combined this options - Subdivide and Redistributing.

 

This example demonstrates the wide arsenal of types of geometrical determinants and accuracy modeling of conics.

 

 

Пример структуризации кривой (окружность) касательной ломаной и построения NURBzS кривой, аппроксимирующей геометрически точно окружность. Пример демонстрирует широкий арсенал видов геометрических определителей и точность моделирования конических кривых.   

Касательная ломаная представлена NURBS кривой степени 2. В разделе динамического редактирования нажмите ReCreate [on]. Затем переключите тип рафинирования на Fairings [on Points] и повторите перестроение кривой  ReCreate [on]. Убедитесь, что дуальный геометрический определитель определяет ту же кривую. Измените способ аппроксимации на Approximation [B-Spline].

 

3)  Example of Creation on s - formed Polyline

 

Draw the s-formed polyline. The inflection point is important element of structure of curve. Put this point exactly on the segment or close to the segment formed by two points covering an inflection point. Polyline represented as the NURBS-sketch of degree 1.  Draw the spline order 1 on polyline.

 

Save the drawing in folder CAD_NURBS as BSpline1degree.dxf in format of AutoCAD 2004 DXF

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ BSpline1degree.dxf";

OUTFILE = "Fair_NURBS\\FBSpline1degree.dxf";

 

Don’t change default params.

Evaluate notebook.

Notebook prepares the Hermite GD

In accordance with the specified options and the application logic is constructed NURBS curve on the Hermite GD.

 

Notebook displays the Curve,

curvature graph  as k=F(l) and curvature graph over the curve

 

Go to section Dynamic Editing.

In the section of dynamic editing, press ReCreate [on].

 

Configuration with inflection points approximated with higher quality by b-spline curve. Change the type of approximation on Approximation [B-Spline]. Rebuild curve by ReCreate [on].

 

You may edit the curve on Hermite GD by moving base points.  Controlling the position of the control points, achieve the desired curvature graph.

Check the graphics of curvature

Make sure that movement of control points within a given structure is quite predictable change of curvature graph.

 

 

 

 

 

 

Пример построения NURBS кривой на s-образной полилинии.

Перейдите к динамическому редактированию. Конфигурации с точками перегиба более качественно аппроксимируются b-сплайновой кривой.  Измените тип аппросимции на Approximation [B-Spline]. Перестройте кривую ReCreate [on]. Управляя положением контрольных опорных точек, добейтесь желаемого графика кривизны. Убедитесь в том, что перемещение опорных точек в пределах заданной структуры вызывает вполне прогнозируемое изменение графика кривизны.

 

4) Example of modeling of curve with one inflection point using a tangent polyline

 

This example demonstrates the modeling of curve with one inflection point using a tangent polyline.

Draw the s-formed polyline. Tangent polyline represented as the NURBS-sketch of degree 2.  Draw the spline order 2 on polyline.

 

Save the drawing in folder CAD_NURBS as BSpline2degree.dxf in format of AutoCAD 2004 DXF

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ BSpline2degree.dxf";

OUTFILE = "Fair_NURBS\\FBSpline2degree.dxf";

 

Don’t change default params.

Evaluate notebook.

Notebook prepares the Hermite GD

In accordance with the specified options and the application logic is constructed NURBS curve on the Hermite GD.

 

Notebook displays the Curve,

curvature graph  as k=F(l) and curvature graph over the curve

 

Go to section Dynamic Editing.

 

In the section of dynamic editing, press ReCreate [on].

 

Configurations with inflection points are approximated with higher quality by b-spline curve. Change the type of approximation by Approximation [B-Spline]. Rebuild curve ReCreate [on].

 

You may edit the curve on Hermite GD by changing the directions of tangent vectors.

 

 

 Controlling the direction of the tangent vectors, achieve the desired curvature graph.

Check the graphics of curvature

 

 

Make sure that the change in direction of the tangent vectors within the given structure of the curve is quite predictable change in the graph of curvature.

 

 

Пример демонстрирует моделирование кривой с одной точкой перегиба с помощью касательной ломаной. Перейдите  к динамическому редактированию. Конфигурации с точками перегиба более качественно аппроксимируются b-сплайновой кривой.  Измените тип аппроксимации на Approximation [B-Spline]. Перестройте кривую ReCreate [on].

Перейдите на редактирование касательными векторами. Управляя направлением касательных векторов, добейтесь желаемого графика кривизны. Убедитесь в том, что изменение направлений касательных векторов  в пределах заданной структуры кривой вызывает вполне прогнозируемое изменение графика кривизны.

 

5)  Example of improvement of closed NURBS curve third degree, drawn in AutoCAD on nodal points (edited points)

 

Draw the polyline. Create spline degree 3 with control polygon coincident with polyline.

 

Save the drawing in folder CAD_NURBS as BSpline_Degree3.dxf in format of AutoCAD 2004 DXF.

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ BSpline_Degree3.dxf";

OUTFILE = "Fair_NURBS\\FBSpline_Degree3.dxf";

 

Don’t change other params.

Evaluate the notebook.

Notebook displays the graphics of NURBS-sketch

 

 

 

and macroparams:

Length = 5693.05

N Inflection = 2

N Extreme Curvature = 13

Min Curvature = 0.0000203666

Max Curvature = 0.00225294

Variation of Curvature = 0.00223258

Max Change of Curvature = 5.39184*10^-6

Energy = 0.00817466

N Dir Torsion Changes = 0

 

 

 

 

 

 

 

Notebook prepares the Hermite GD on NURBS-sketch

 

In accordance with the specified options and the application logic is constructed NURBS curve on Hermite GD.

 

Notebook displays the Faired Curve

and curvature graphics

and nacroprams:

Length = 5727.04

N Inflection = 0

N Extreme Curvature = 8

Min Curvature = 0.000274991

Max Curvature = 0.00306058

Variation of Curvature = 0.00278559

Max Change of Curvature = 8.70835*10^-6

Energy = 0.00871641

N Dir Torsion Changes = 0

Compare curves. Form of the original NURBS curve does not fit the shape of a polyline of nodal points.

Compare graphics of curvature over curves. AutoCAD method does not provide for smoothness of curve. Graph of curvature is continuous, but with kinks. Curvature graph over improved curve is smooth curve. We note that the smoothness of the v-curve is order 5.

Compare macroparameters. The number of vertices of the curve is reduced from 13 to 7 ! That is radically eliminated ripple curvature. Minimum number of vertices and the structure of the curve exactly defined by form of base polyline.

 

Пример улучшения замкнутой NURBS кривой 3-ей степени, построенной в AutoCAD по узловым точкам (edited points). Отработайте пример. Форма исходной NURBS кривой не соответствует форме ломаной узловых точек.

Сравните графики кривизны над кривыми. Метод AutoCAD не обеспечивает плавности кривой. График кривизны непрерывный, но с изломами. График кривизны у улучшенной кривой плавный. Отметим, у v-кривой гладкость 5-го порядка.

Сравните макропараметры. Количество вершин кривой снижено от 13 до 7! То есть радикально устраняется пульсация кривизны. Количество вершин минимально и соответствует структуре кривой, заданной опорными точками.

6) Example of  improvement of NURBS curve tenth degree, modeled using s-polygon in AutoCAD

 

Draw in AutoCAD  spline degree 10 on control polygon.

 

Save the drawing in folder CAD_NURBS as BSpline_Degree10.dxf in format of AutoCAD 2004 DXF.

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ BSpline_Degree10.dxf";

OUTFILE = "Fair_NURBS\\FBSpline_Degree10.dxf";

 

Don’t change other params.

Evaluate the notebook.

Notebook displays the graphics of NURBS-sketch

and macroparams:

Length = 32.0335

N Inflection = 0

N Extreme Curvature = 7

Min Curvature = 0.115853

Max Curvature = 0.342159

Variation of Curvature = 0.226306

Max Change of Curvature = 0.0722619

Energy = 1.48623

N Dir Torsion Changes = 0

 

Notebook prepares the Hermite GD on NURBS-sketch

In accordance with the specified options and the application logic is constructed NURBS curve on Hermite GD.

 

Notebook displays the Faired Curve

curvature graphics

and macroparams:

Length = 31.9198

N Inflection = 0

N Extreme Curvature = 3

Min Curvature = 0.122183

Max Curvature = 0.332916

Variation of Curvature = 0.210733

Max Change of Curvature = 0.0469699

Energy = 1.47532

N Dir Torsion Changes = 0

 

Obtained a significant improvement of NURBS curve tenth degree, modeled using the most popular modeling method in modern CAD systems.

 

 

Пример улучшения NURBS кривой 10-ой степени, построенной с помощью s-полигона в AutoCAD. Достигается  существенное улучшение NURBS кривой 10-ой степени, смоделированной наиболее популярным в современных САПР методом моделирования кривых высокого качества.

 

 

7) Example of improving spatial curve Helix drawn in AutoCAD.

 

Draw the primitive _Helix in AutoCAD.

Then _explode the primitive and save drawing in folder CAD_NURBS as Helix.dxf in format of AutoCAD 2004 DXF.

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ Helix.dxf";

OUTFILE = "Fair_NURBS\\FHelix.dxf";

 

Don’t change other params.

Evaluate the notebook.

Notebook displays the graphics of NURBS-sketch

 

and curvature graphics

and macroparams:

Length = 941.036

N Inflection = 0

N Extreme Curvature = 21

Min Curvature = 0.0096716

Max Curvature = 0.0208277

Variation of Curvature = 0.0111561

Max Change of Curvature = 110978.

Energy = 0.174837

N Dir Torsion Changes =  0

 

 

Notebook prepares the Hermite GD on NURBS-sketch

 

 

In accordance with the specified options and the application logic is constructed NURBS curve on Hermite GD.

 

Notebook displays the Faired Curve

 

Curvature graphics

 

 

Compare the curves and curvature graphs form k = F (l) and in 3D on a 3D graphics. Ensure  high quality of improved spatial curve. Provides smooth and monotonic change of curvature, compared with sawtooth form of curvature graph of the original curve.

 

 

 

 

Пример улучшения пространственной кривой Helix. Сравните кривые и графики кривизны вида k=F(l) и в 3D пространстве на 3D графиках. Убедитесь в высоком качестве улучшенной пространственной кривой.  Обеспечивается плавное и монотонное изменение кривизны, по сравнению с пилообразной формы графика кривизны исходной кривой.

 

 

 

8) Example of improvement of NURBS curve seventh degree constructed on edited points in Alias Design

 

Construct in Alias Design an arbitrary non-closed NURBS curve of degree 7 on a uniform grid on the locally-convex polygon.

 

 

 

Export the primitive to AutoCAD

 

Save the drawing in folder CAD_NURBS as Unclosed_ 7Degree_Alias.dxf in format of AutoCAD 2004 DXF.

 

Open the document-notebook Mathematica “Modeling Curves on NURBS-sketches from CAD-systems.nb”. On page for setting params set

 

INFILE = "CAD_NURBS\\ Unclosed_ 7Degree_Alias.dxf";

OUTFILE = "Fair_NURBS\\ FUnclosed_ 7Degree_Alias.dxf";

 

Don’t change other params.

Evaluate the notebook.

Notebook displays the graphics of NURBS-sketch

 

 

 

 

and macroparams:

Length = _1357.92

N Inflection = 2

N Extreme Curvature = 13

Min Curvature = 0.0000702838

Max Curvature = 0.0209715

Variation of Curvature = 0.0209012

Max Change of Curvature = 0.000760825

Energy = 0.0604292

N Dir Torsion Changes = 0

Notebook prepares the Hermite GD on NURBS-sketch

In accordance with the specified options and the application logic is constructed NURBS curve on Hermite GD.

 

Notebook displays the Faired Curve

 

 

curvature graphics

and nacroprams:

Length = _1333.01

N Inflection = _0

N Extreme Curvature = 5

Min Curvature = 0.00210498

Max Curvature = 0.00781949

Variation of Curvature = 0.00571451

Max Change of Curvature = 0.0000241093

Energy =_0.0467075

N Dir Torsion Changes = 0

 

The example shows the possibility of a radical improvement of the quality of NURBS curves of high degrees, constructed on edited points in the Alias Design. The example also shows a higher robustness of the proposed approximation methods in app FairCurveModeler compared to the method for constructing the spline on edited points in Alias Design.

 

Пример улучшения NURBS кривой 7-ой степени, построенной по определяющим точкам (edited points) в Alias Design. Пример показывает возможность радикального улучшения качества NURBS кривых высоких степеней, построенных по определяющим точкам в Alias Design. Пример также демонстрирует более высокую устойчивость предложенных методов аппроксимации в приложении FairCurveModeler по сравнению с методом построения сплайнов по определяющим точкам в Alias Design.