Content

 

Examples of formation the NURBS templates of analytic curves 1

An example of approximation of the clothoid by NURBzS curve. 2

NURBzS ;. 2

An example of approximation of the clothoid by b-spline curve. 10

b- .. 10

An example of approximation of sinusoids by NURBzS curve. 18

NURBzS .. 18

An example of approximation of sinusoids by b-spline curve. 25

b- .. 25

An example of approximation of the spatial spiral-helix curve Helix by NURBzS curve. 33

- Helix NURBzS 33

An example of approximation of the spatial spiral-helix curve Helix by b-spline curve. 41

- Helix b- 41

 

Examples of formation the NURBS templates of analytic curves

NURBS

 

Prepared examples of formation of NURBS templates of three types of analytic curves:

1) An example of approximation of the clothoid by NURBzS curve in note book

Analytic Curve to NURBS (Example Clothoid to NURBzS).nb;

2) An example of approximation of the clothoid by b-spline curve in note book

Analytic Curve to NURBS (Example Clothoid to NURBS).nb;

3) An example of approximation of sinusoids by NURBzS curve in note book

Analytic Curve to NURBS (Example Sinusoid to NURBzS).nb;

4) An example of approximation of sinusoids by b-spline curve in note book

Analytic Curve to NURBS (Example Sinusoid to NURBS).nb;

5) An example of approximation of the spatial spiral-helix curve Helix by NURBzS curve in note book

Analytic urve to NURBS (Example Helix to NURBzS).nb;

6) An example of approximation of the spatial spiral-helix curve Helix by b-spline curve in note book

Analytic urve to NURBS (Example Helix to NURBS).nb.

 

NURBS :

1) NURBzS

Analytic Curve to NURBS (Example Clothoid to NURBzS).nb;

2) b-

Analytic Curve to NURBS (Example Clothoid to NURBzS).nb;

3) NURBzS

Analytic Curve to NURBS (Example Sinusoid to NURBzS).nb;

4) b-

Analytic Curve to NURBS (Example Sinusoid to NURBS).nb;

5) - Helix NURBzS

Analytic urve to NURBS (Example Helix to NURBzS).nb;

6) - Helix b-

Analytic urve to NURBS (Example Helix to NURBS).nb.

An example of approximation of the clothoid by NURBzS curve

NURBzS ;

Specify path and name for output file

Specify

OUTFILE = "Fair_NURBS\\FClothoidBz.dxf";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\FClothoidBz.dxf"; *)

and set Path and Name by browsing (press button BROWSE).

OUTFILE = "Fair_NURBS\\FClothoidBz.dxf";

(* OUTFILE = "Fair_NURBS\\FClothoidBz.dxf"; *)

( BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

.

Define formulas of First derivatives, Second derivatives, Curvature.

, .

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points.

 

.

:

IntP ,

intDP ,

intD2P - ,

intCvt ,

intLen u-u0 .

 

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of interpolated points NintP.

To interpolate specify u0 = 0.; uk = 2.; NintP = 100;

Draw the Graph of the curve on interpolated points

u0 uk [u0,uk] r(u) NintP.

u0 = 0.; uk = 2.; NintP = 100;

 

 

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 15;

, (NHermite) [u0,uk]

NHermite = 15;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 2; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 2; (* 1- Off, 2 - on *)

FixCvtUk = 1;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

Interpolate the created NURBS curve

NURBS

Specify hs = 0.1; (* step of interpolaton *)

hs = 0.1;

Display the NURBS curve

NURBS

Analyze the quality of NURBS curve

NURBS

Display the Graph of curvature as function k=F(l) on length param

k=F(l)

Display Graph of the curvature over the curve

 

Write the NURBS model to external systems

NURBS

Convert NURBS model to Mathematica primitive

Mathematica

Write NURBS model to DXF-file

NURBS DXF-

 

Write NURBS model to XLSX-file

NURBS XLSX--

 

 

 

An example of approximation of the clothoid by b-spline curve

b-

 

Specify path and name for output file

 

Specify

OUTFILE = "Fair_NURBS\\FClothoidBs.xlsx";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\FClothoidBs.xlsx"; *)

and set Path and Name by browsing (press button BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

Define formulas of First derivatives, Second derivatives, Curvature.

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points,

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of intrpolated points NintP.

To interpolate specify u0 = 0.; uk = 2.; NintP = 100;

Draw the Graph of the curve on interpolated points

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 15;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 2; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 2; (* 1- Off, 2 - on *)

FixCvtUk = 1;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

Interpolate the created NURBS curve

Specify hs = 0.1; (* step of interpolaton *)

 

Display the NURBS curve

Analyze the quality of NURBS curve

 

Display the Graph of curvature as function F(x)

Display Graph of the curvature over the curve

Write the NURBS model to external systems

 

Convert NURBS model to Mathematica primitive

Write NURBS model to DXF-file

 

Write NURBS model to XLSX-file

 

An example of approximation of sinusoids by NURBzS curve

NURBzS

Specify path and name for output file

 

Specify

OUTFILE = "Fair_NURBS\\ FSinusoidBz.dxf";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\ FSinusoidBz.dxf"; *)

and specify Path and Name by browsing (press button BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

Define formulas of First derivatives, Second derivatives, Curvature.

 

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points,

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of intrpolated points NintP.

To interpolate specify u0 = 0.; uk = 3.*Pi; NintP = 200;

Draw the Graph of the curve on interpolated points

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 16;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 1; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 2; (* 1- Off, 2 - on *)

FixCvtUk = 2;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

Interpolate the created NURBS curve

Specify hs = 0.1; (* step of interpolaton *)

 

Display the NURBS curve

Analyze the quality of NURBS curve

 

Display the Graph of curvature as function F(x)

Display Graph of the curvature over the curve

 

Write the NURBS model to external systems

 

Convert NURBS model to Mathematica primitive

Write NURBS model to DXF-file

 

Write NURBS model to XLSX-file

and then transfer NURBS model to Web FairCurveModeler

 

 

 

 

 

 

 

An example of approximation of sinusoids by b-spline curve

b-

Specify path and name for output file

 

Specify

OUTFILE = "Fair_NURBS\\ FSinusoidBs.dxf";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\ FSinusoidBs.dxf"; *)

and specify Path and Name by browsing (press button BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

Define formulas of First derivatives, Second derivatives, Curvature.

 

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points,

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of intrpolated points NintP.

To interpolate specify u0 = 0.; uk = 3.*Pi; NintP = 200;

Draw the Graph of the curve on interpolated points

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 13;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 2; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 2; (* 1- Off, 2 - on *)

FixCvtUk = 2;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

Interpolate the created NURBS curve

Specify hs = 0.1; (* step of interpolaton *)

 

Display the NURBS curve

Analyze the quality of NURBS curve

 

Display the Graph of curvature as function F(x)

Display Graph of the curvature over the curve

 

Write the NURBS model to external systems

 

Convert NURBS model to Mathematica primitive

Write NURBS model to DXF-file

 

Write NURBS model to XLSX-file

and then transfer NURBS model to Web FairCurveModeler

 

 

 

 

 

 

 

 

 

 

An example of approximation of the spatial spiral-helix curve Helix by NURBzS curve

- Helix NURBzS

Specify path and name for output file

 

Specify

OUTFILE = "Fair_NURBS\\ FAHelixBz.dxf";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\ FAHelixBz.dxf"; *)

and specify Path and Name by browsing (press button BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

Define formulas of First derivatives, Second derivatives, Curvature.

 

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points,

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of intrpolated points NintP.

To interpolate specify u0 = 0.; uk = 2.*Pi; NintP = 200;

Draw the Graph of the curve on interpolated points

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 7;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 1; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 2; (* 1- Off, 2 - on *)

FixCvtUk = 2;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

Interpolate the created NURBS curve

Specify hs = 0.1; (* step of interpolaton *)

 

Display the NURBS curve

Analyze the quality of NURBS curve

 

Display the Graph of curvature as function F(x)

Display Graph of the curvature over the curve

 

Write the NURBS model to external systems

 

Convert NURBS model to Mathematica primitive

Write NURBS model to DXF-file

 

Write NURBS model to XLSX-file

and then transfer NURBS model to Web FairCurveModeler

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

An example of approximation of the spatial spiral-helix curve Helix by b-spline curve

- Helix b-

Specify path and name for output file

 

Specify

OUTFILE = "Fair_NURBS\\ FAHelixBS.dxf";

or

Hide the definition in comment

(* OUTFILE = "Fair_NURBS\\ FAHelixBS.dxf"; *)

and specify Path and Name by browsing (press button BROWSE).

 

Define the Formula of analytic curve

 

Define formula of analytic curve in parametric form r(u)=[X(u),Y(u),Z(u)].

Define formulas of First derivatives, Second derivatives, Curvature.

 

 

Write the program of interpolation

 

On the base of formulas of analytic curve write the program of interpolation.

Program of interpolation forms lists:

IntP list of interpolated points,

intDP - list of interpolated first derivatives,

intD2P - list of interpolated second derivatives,

intCvt list of interpolated values of curvature,

intLen - list of parameter u-u0 according to interpolated points,

 

 

 

Interpolate the analytic curve

Specify u0 and uk of domain [u0,uk] of analytic curve r(u) and number of intrpolated points NintP.

To interpolate specify u0 = 0.; uk = 2.*Pi; NintP = 200;

Draw the Graph of the curve on interpolated points

 

Draw graph of curvature on length parameter of the curve

Prepare the Hermite GD for approximation on interpolated points

 

Prepare the Hermite GD specifying number (NHermite) of points for approximation of analytic curve on fixed domain [u0,uk]

Specify NHermite = 9;

 

 

Draw graph of Hermite GD

Specify variables to approximate the Hermite GD

 

(* begin: you may change only this variables *)

 

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

on tangents *)

redistributing = 2; (* 1 - off, 2 - on *)

 

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

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

 

FixCvtU0 = 1; (* 1- Off, 2 - on *)

FixCvtUk = 1;

 

view = 1; (* 1 - Graph of curvature, 2 - Graph of Evolute *)

scale = -0.1; (* for Graph of Curature *)

 

(* end: you may change only this variables *)

 

 

Interpolate the created NURBS curve

Specify hs = 0.1; (* step of interpolaton *)

 

Display the NURBS curve

Analyze the quality of NURBS curve

 

Display the Graph of curvature as function F(x)

Display Graph of the curvature over the curve

 

Write the NURBS model to external systems

 

Convert NURBS model to Mathematica primitive

Write NURBS model to DXF-file

 

Write NURBS model to XLSX-file

and then transfer NURBS model to Web FairCurveModeler