XCCurv: the 2D modeller User's Guide

XCCurv: the 2D modeller User's Guide
University of Bologna - Department of Mathematics
Piazza di Porta S.Donato, 5 - 40127 - Bologna
XCCurv:
the 2D modeller
User’s Guide - Version 4.0
G. Casciola
Department of Mathematics
University of Bologna
Bologna 2007
Abstract
This report describes the XCCurv package. This is a program for modelling
free form 2D curves, which is only based on NURBS (Non Uniform Rational
B-Splines) mathematics primitive.
G. Casciola
Department of Mathematics, University of Bologna, P.zza di Porta S.Donato 5,
Bologna, Italy. E-mail: [email protected]
xccurv User’s Guide . . .
Contents
Contents
i
1 What is XCCurv?
1
2 How to work with XCCurv
2.1 What to do with XCCurv . . . . . . . . . . . . . . . . . . . .
3
4
3 Params
7
4 Curve Color, Configuration
4.1 Curve Color menu . . . .
4.2 Configuration button . . .
4.3 Quit button . . . . . . . .
and Quit
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . .
9
9
9
10
5 Options
5.1 Axes . . . . . . . . .
5.2 Polygonal . . . . . .
5.3 Grid . . . . . . . . .
5.4 BackGround Curves
5.5 Zoom Enable . . . .
5.6 Help . . . . . . . . .
5.7 Input selector . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
11
11
11
12
12
12
12
6 File
6.1
6.2
6.3
6.4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
13
14
14
14
14
Load button . .
Save button . .
Import button
Export button
.
.
.
.
.
.
.
.
.
.
.
.
7 New Curve
15
7.1 Shape Approximation . . . . . . . . . . . . . . . . . . . . . . 15
7.2 Interpolation button and IP file . . . . . . . . . . . . . . . . . 17
7.2.1 Norm Approximation button and AP file . . . . . . . 21
ii
8 Edit
8.1 Reset .
8.2 Delete
8.3 Select
8.4 Copy .
8.5 UnDo
8.6 ReDo
Contents
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9 Misc
9.1 Rational Cubic Tension . . . . .
9.2 Curve Lenght . . . . . . . . . . .
9.3 Draw Points . . . . . . . . . . . .
9.4 Span . . . . . . . . . . . . . . . .
9.5 Split . . . . . . . . . . . . . . . .
9.6 Reverse . . . . . . . . . . . . . .
9.7 Join . . . . . . . . . . . . . . . .
9.8 Degree Elevation . . . . . . . . .
9.9 Reparametrization . . . . . . . .
9.9.1 Linear rational button . .
9.9.2 Span button . . . . . . .
9.9.3 kC 0 (t)k button . . . . . .
9.9.4 Root arc button . . . . .
9.9.5 Adaptive span button . .
9.9.6 Adaptive kC 0 (t)k button .
9.9.7 Adaptive root arc button
9.10 Multi Resolution Analysis . . . .
10 Modify
10.1 Knot buttons . . . . . . . .
10.1.1 Insert button . . . .
10.1.2 Move button . . . .
10.1.3 Remove button . . .
10.1.4 Refine button . . . .
10.2 Control Point buttons . . .
10.2.1 Insert button . . . .
10.2.2 Add button . . . . .
10.2.3 Move button . . . .
10.2.4 Delete button . . . .
10.2.5 Weight button . . .
10.3 Geometric buttons . . . . .
10.3.1 One Weight button .
10.3.2 Two Weight button
10.3.3 One CP button . . .
10.3.4 Local button . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
25
25
25
25
25
26
26
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
27
27
27
27
27
28
28
28
28
28
30
30
30
30
31
31
31
31
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
33
33
33
34
34
34
34
34
35
35
36
36
36
36
37
38
38
LIST OF FIGURES
10.4 Transformation buttons .
10.4.1 Translation button
10.4.2 Scaling button . .
10.4.3 Rotation button .
iii
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
38
39
40
40
11 Functions buttons
11.1 RB-Spline button . . . . . . . . . .
11.2 X = C1 (t) and Y = C2 (t) buttons.
11.3 W (t) button . . . . . . . . . . . . .
11.4 X = C10 (t) and Y = C20 (t) buttons
11.5 Slope button . . . . . . . . . . . .
11.6 Curvature button . . . . . . . . . .
11.7 kC 0 (t)k button . . . . . . . . . . .
11.8 Arc test button . . . . . . . . . . .
11.9 Int kC 0 (t)k button . . . . . . . . .
11.10Wavelet button . . . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
41
41
41
41
41
42
42
42
42
42
43
12 Data file formats
12.1 NURBS curve 2D . . . . . . . . . . . . .
12.2 Interpolation/Approximation points . .
12.3 Control Points . . . . . . . . . . . . . .
12.4 IGES entity no.126 (NURBS curve 2D)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
45
45
46
46
46
List of Figures
49
Bibliography
51
xccurv User’s Guide . . .
Chapter 1
What is XCCurv?
XCCurv is the 2D modeller of the XCModel system [XCMODEL00]. This
program is self-contained and executable from the xcmodel console window.
It is distributed with the archive xccurvdev.tar.gz (development version)
and xccurvusr.tar.gz (executable version). Downloading and installation
instructions are in [XCMODEL00].
XCCurv is a system based on NURBS mathematics primitive, for modelling
2D curves. This interactive graphics system was designed bearing in mind
two main objectives:
• to provide a development environment for the experimentation of new
techniques and algorithms in the sector of geometric modelling;
• to provide a learning environment and a practical application of the
theories of geometric modelling presented in many books and papers
(see references).
For these reasons, XCCurv is very different from other 2D CAD systems
on the market. Apart from being based on NURBS, it has general characteristics, not belonging to CAD systems, allowing the user to provide all
the data needed to define a curve (such as knot partition, weights, type
of parametrization), while CAD systems remain more restrictive, imposing
methods that are considered efficient, but are invariable.
For example, XCCurv allows the user to choose the NURBS degree, and this
degree can have up to a maximum value of MAXG (20 in this release). In
CAD systems, much lower degrees of spline are used (at most cubic).
As a result, the algorithms implemented in XCCurv are as general as possible, in order to be applied in all the cases that the user may require. This
could limit the efficiency of the system. For example, the calculation of the
B-spline functions (the basis of the space of the polynomial spline) exploits
the well-known recurrence formula due to C. de Boor [DEB78]. In CAD
systems, on the other hand, algorithms are used that make the calculation
of the B-splines, as long as they are of low degree, through the conversion
2
What is XCCurv?
of each span into the power basis and the use of the Horner method.
Additionally, while in a CAD system ’circle curve’ or ’circle arc curve’, etc.,
are defined as being primitive, XCCurv provides the instruments for the creation of these curves, while waiting for the users to have the basic knowledge
that will allow them to be constructed.
The code is written in ANSI C language and can be executed on various
types of workstation or PC running a Unix operating system with Xwindow. In order to make the system portable, it was decided to use a Graphic
User Interface made with xtools library [XTOOLS00], provided with this
package.
xccurv User’s Guide . . .
Chapter 2
How to work with XCCurv
When XCCurv is set up, it opens the window shown in fig.2.1. The Main
Figure 2.1: Main Window
Window is partitioned in sectors that we have named:
• New Curve creates a curve from scrach; this creation step starts by
control points, or by interpolation/approximation points given interactively or loading a file;
4
What to do with XCCurv
• File to load/save a curve or its points and to import/export a set of
curves in IGES format;
• Edit includes some useful function such as select a curve, delete a
curve, etc.;
• Misc consists of a miscellanea collection of functions;
• Modify contains the functions available to modify the active NURBS
curve;
• Params is a large sector of the Main Window containing the definition
parameters of the active curve;
• Functions consists of 12 buttons corresponding to 12 different function graphs relative to the active curve;
• Options allows the user to set some functions of XCCurv;
• Curve Color box allows the user to choose the color to represent a
non active curve;
• Configuration and Quit bottons allows the user to configure XCCurv, save this configuration for a next work session and quit XCCurv.
As soon as this window appears, you will immediately see which actions are
possible. XCCurv provides help messages viewed along the bottom of the
Main Window whenever the cursor moves over buttons, bars, text-boxes,
etc. Note that there is also an on-line user’s guide, that can be abled by the
check-box Help, and that guides the user, step by step, in his/her actions.
As in any interactive graphics system, XCCurv uses the keyboard and the
mouse. In this text we use the expression ”click on something with the
LMB” (Left Mouse Button) or ”the CMB” (Centre Mouse Button) or ”the
RMB” (Right Mouse Button), when the user places the mouse pointer on
something on the screen and presses and releases (to click) a mouse button.
This manual is organised to explain all the functionalities and how XCCurv
works.
2.1
What to do with XCCurv
XCCurv is used to model and examine traditional and free-form 2D curves.
It is possible to work simultaneously on several curves. The selected (active)
curve is visualized in white and it can be modelled or examined. The nonactive curves are shown in the selected color from the Curve Color menu in
which they were created. There are several techniques for creating curves,
from interactive to automatic by interpolation and approximation methods
How to work with XCCurv
5
(see New Curve sector). XCCurv allows the user to examine the active
curve parameters and some useful test functions, such as slope, curvature,
etc. (see Functions sector). XCCurv allows the user to apply and analyze
some modelling tools, such as knot-insertion, knot-removal, knot-refinement,
etc. (see Modify sector). The active curve can be modified by working
directly on its parameters or aided by the system giving some geometric
constraints. The active curve can be modified by geometric transformation,
such as translation, scaling and rotation. XCCurv allows the user to save
the active curve in a file (.db extension), such as save its control points and
interpolation/approximation points (.cp and .ip extensions) and to load a
curve or other file previously saved. It is also possible to import and export the modelled curves in the standard IGES format (see File sector).
In this release there are a lot of new functions and greater graphics interaction. Of particular interest we underline the Multiresolution Analysis
option, implemented in a prototypal version, that uses a multiresolution
curve representation.
xccurv User’s Guide . . .
Chapter 3
Params
In the Params sector, the numeric parameters that define the active curve,
are permanently shown and up-date; namely, the degree, the number of
knots in the extended partition, the number of control points and, if the
curve was generated by interpolating or approximating data points, the
number of these informations. Two tables show the knot values, the control points coordinates within their weights or, in alternative, the interpolation/approximation point coordinates. It is also graphically represented the
knot partition. These information are not only useful to be inspected (as
output parameters), but overall to be modified and then change the shape
of the curve (as input parameters); this is the case when the input has been
chosen to be given by keyboard; when it is the text-boxes under the tables,
the OK and Done buttons are able.
Figure 3.1: Params Area
xccurv User’s Guide . . .
Chapter 4
Curve Color, Configuration
and Quit
4.1
Curve Color menu
By clicking on a color with LMB this menu allows us to set the color for
the curve that will be modelled; more precisely this will be the color of the
curve when it will be no more the active curve. In fact we remember that
when a curve is active its color is white. If the user does not set a color, the
system automatically uses the next color in the menu for the curve.
4.2
Configuration button
This button opens the following Configuration Window (see fig.4.1) from
which is possible to change the resolution or better to choose the resolution
used from the graphics display so that XCCurv can be properly used. In
Figure 4.1: Configuration Window
this window are able the Load and Default buttons that allow the user
10
Quit button
respectively to set the state of each check-point, check-box, function window
dimensions and the values in all the text-boxes of XCCurv by loading a
configuration file or by some default values. It is also possible to save the
current state of all these objects in a configuration file using the Save button.
4.3
Quit button
This button allows the user to quit XCCurv.
xccurv User’s Guide . . .
Chapter 5
Options
This sector allows the user to choose some functions of XCCurv. The checkboxes indicate the selection of a yes/no option.
Figure 5.1: Option Area
5.1
Axes
This option ables/unables the drawing of the coordinate axes in the Curves
window.
5.2
Polygonal
This option ables/unables the viewing of the control polygon of the modelled
curves.
5.3
Grid
This option allows the user to able/unable a reference grid in the Curves
window. If this is abled, every operation following it will be carried out in
a system of discrete coordinates, that is, every point is approximated to the
nearest point on the grid.
The linked bar, if the grid is active, allows it to be doubled or halved obtaining a grid finer or coarser.
12
Input selector
5.4
BackGround Curves
This option ables/unables the viewing of all the non-active curves. This
is useful to better view the active curve and to speed-up the interactive
operation on the active curve.
5.5
Zoom Enable
This check-box allows us the following facilities:
• Zoom In
• Zoom Out
• Reset
Zoom In and Zoom Out respectively allow you to magnify and reduce
the image curves in the Curves window and are actived respectively by the
LMB and RMB clicking on the center of the region to magnify or reduce.
To reset the Curves window to [−1, 1] × [−1, 1] use the CMB.
5.6
Help
This check-box is used to able/unable the on-line help of XCCurv. For
every selected operation, this help guides the user on how to carry out the
operation correctly.
Figure 5.2: Help Window
5.7
Input selector
The Mouse and Keyboard check-boxes are mutually exclusive. If Mouse
is chosen, almost all the operations for data insertion will be carried out using
the mouse, whereas, by choosing Keyboard, these will be made using the
keyboard.
xccurv User’s Guide . . .
Chapter 6
File
These buttons (see the Main Window in fig. 2.1) allow the user to to
read/write from/on the data files for the NURBS curves.
Figure 6.1: File Request Window
14
6.1
Export button
Load button
This button allows a file, with the extension .db, to be loaded. The files with
this extension contain all the data needed to define a 2D NURBS curve in a
standard format (see Data file formats section). The curve defined by this
type of data file will be visualized and will be the active curve.
6.2
Save button
This button allows all the definition data for a 2D NURBS curve active in
a file, with a .db extension, to be saved (see db format).
If the active curve has been created by a process of interpolation or
approximation of data, this button allows the interpolation or approximation
points used to be saved in a file with an .ip extension.
It is also possible to save the control points of the active curve in a file
with the .cp extension.
6.3
Import button
This button allows the user to load a file in IGES standard format (see
Data file format section) containing a set of NURBS 2D curves (IGES entity
no.126).
6.4
Export button
This button allows the user to save a set of curves, selected with LMB
from the modelled curves, or all the curves clicking CMB, in a file in IGES
standard format (see Data file format section).
xccurv User’s Guide . . .
Chapter 7
New Curve
This sector presents the three different curve creation modes provided by
XCCurv:
- Shape approximation from a set of 2D points (Control Points (CP));
- Interpolation from a set of 2D points (Interpolation Points (IP));
- Norm Approximation from a set of 2D points (Approximation Points
(AP))
For each of these modes, the user can input the 2D points using the mouse
or the keyboard. In this latter case the coordinate values must be digitized
in the properly fields in the Params sector. If the check-box labelled ”by
file” is setted at on , these points can be loaded from a data file.
7.1
Shape Approximation
After the input of the Control Points, the window of fig.7.1 is shown where
the user must:
1. set the degree of the curve: digit the degree in the text-box;
2. choose extended partition ∆∗ . The following choices are able:
• Equally spaced knots
• Uniform knots
• Periodic knots
• Manual knots
• Chord lenght parametrization knots
We describe the possible choices for extended partitions; in any case the
knots tm and tK+m+1 are set to the end interval domain points, that is to 0
and 1.
16
Shape Approximation
Figure 7.1: Shape Approximation Window
• Equally spaced and Periodic knots
– interior knots are set equally spaced in the [0,1] parametric domain. Let K be the number of interior knots (it holds K =
ncp − m where ncp is the CP number and m is the curve order),
then ti are given by:
ti =
i−m
K +1
i = m + 1, . . . , K + m
– exterior knots are defined by
ti = a − (b − ti+K+1 ) i = 1, . . . , m − 1
ti = b + (ti−K−1 − a) i = K + m + 2, . . . , K + 2m
where [a, b] is the parametric domain ([0, 1] in this release). Since
interior knots are equally spaced, we have the same extended partition
both in Equally spaced and Periodic selections.
• Uniform knots
– interior knots are equally spaced;
– exterior knots are coincident with the end interval points:
ti = 0.0 i = 1, . . . , m − 1
ti = 1.0 i = K + m + 2, . . . , 2m + K
• Manual knots
The extended partition can be setted by the user. With the mouse
he/she can set all the knots, except for tm and tK + m + 1 that are
automatically set to be coincident with the end interval points; with
the keyboard he/she can set all the knots.
17
New Curve
– Mouse → click K + 2m − 2 times on the interval domain with
LMB (knot partition window)
– Keyb → digit all knot values, that is K + 2m values, in the textbox.
• Chord length parametrization knots
– interior knots are chosen so that:
i−1
ti+1 − ti
j=i−m+1 kPj − Pj−1 k2
= Pi
ti+2 − ti+1
j=i−m+2 kPj − Pj−1 k2
P
where Pj are the curve CPs.
– exterior knots are coincident with the end interval points:
Note that all automatic extended partitions have interior knots with
a multiplicity to 1. It is only possible to set knots manually with a
multiplicity greater than 1. In this case to elevate the multiplicity of
a knot click on it with CMB.
The weights are set automatically to 1. To change their values, you must
use the Modify Weight button in the Options sector. To summarise, once
we have given all the following information:
• control points (CPs);
• degree g;
• knot partition (∆∗ );
• weights (optionally);
XCCurv can proceed to compute and graphically represent the curve.
7.2
Interpolation button and IP file
This button provides the creation of an interpolation curve starting from
some given 2D points (IP). After these points have been given, the window
of fig.7.2 is shown, and the user must:
1. choose an interpolation Method:
• Lagrange interpolation
• Hermite interpolation
• Periodic interpolation
18
Interpolation button and IP file
Figure 7.2: Interpolation Window
• Rational cubic interpolation C 1 with tension
• Rational cubic interpolation C 2 with tension
2. choose a Parametrization strategy:
• Uniform
• Chord length
• Centripetal
• Exponential
3. Choose NURBS weights:
• Non rational
• Manual
We describe the available interpolation methods:
19
New Curve
• Lagrange interpolation
Let {Qi } i = 1, . . . , n, be the interpolation points. This method computes the NURBS curve C(t), so that:
C(τi ) = Qi
i = 1, . . . , n
The degree of the curve must be given. The knot partition will be
computed automatically so that the Schoenberg-Whitney conditions
are satisfied. Exterior knots are coincident with the end interval points.
• Hermite interpolation
Let {Q`i } i = 1, . . . , n, and ` = 0, . . . , `i be the interpolation points.
This method computes the NURBS curve C(t) so that:
C ` (τi ) = Q`i
i = 1, . . . , n ` = 0, . . . , `i
This option allows the following choices:
– F/L Derivative
This method, in addition to the interpolation points {Q0i }, i =
1, . . . , n, interpolates the first derivative at the end interval points;
that is Q11 and Q1n (`1 = `n = 1 and `i = 0 for i = 2, . . . , n − 1)
must be given. The interpolation curve is of degree 3. The interior knots are chosen to coincide with the interpolation parameter
values τi ; the exterior knots are coincident with the end interval
points.
– Manual Derivative
In addition to the interpolation points {Q0i }, i = 1, . . . , n, the
Max. Order d ∈ {1, 2, 3, 4} must be given and then the information {Q`i }, i = 1, . . . , n, and ` = 1, . . . , d. The interpolation curve
is of degree 2d + 1. The interior knots are chosen to coincide with
the interpolation parameter values τi and are of multiplicity d+1.
The exterior knots are coincident with the end interval points.
– Akima
Start from the given points {Q0i }, i = 1, . . . , n. This option computes, the points {Q1i }, i = 1, . . . , n with Akima technique. Then
an interpolation of all this information, with a curve of degree 3,
is performed. The interior knots are chosen to coincide with the
interpolation parameter values τi and have multiplicity 2. The
exterior knots are coincident with the end interval points.
• Periodic interpolation
Let {Qi }i=1,...,n , be the interpolation points. This method computes
20
Interpolation button and IP file
the NURBS curve C(t) so that:


 C(τi ) = Qi
i = 0, . . . , n
C 1 (τ1 ) = C 1 (τn )

 C 2 (τ ) = C 2 (τ )
1
n
The interior knots are chosen to coincide with the interpolation parameter values iτi . The exterior knots are chosen to satisfy the periodic
conditions automatically.
• Rational cubic C 1 interpolation
Let {Q`i }i=1,...,n , and ` = 0, 1 be the interpolation points and wi i =
1, . . . , n − 1, be tension parameters associated with each pair {Q`i }
{Q`i+1 } of points. This option allows the following choices:
– Manual Derivative
– Akima
that are the same already seen in the Hermite interpolation case.
This method computes the interpolation NURBS curve (cubic over
quadratic) with the property of being globally C 1 and for wi → ∞ ∀i
to converge to the polygonal defined by the interpolation points. If
wi = 1 ∀i, it is the cubic Hermite interpolation curve.
• Rational cubic C 2 interpolation
Let {Q`i }i=1,...,n , and ` = 0, · · · , `i where `1 = `n = 1 and `i = 0 i =
2, · · · , n − 1 be the interpolation points and wi i = 1, . . . , n − 1, be
tension parameters associated with each pair {Q`i } {Q`i+1 } of points.
This method computes the interpolation NURBS curve (cubic over
quadratic) with the property of being globally C 2 . If wi = 1 ∀i, it
is the cubic Hermite interpolation curve that we called F/L Derivative.
After the choice of an interpolation method, the user must choose the
parametrization strategy, that is, the rule to set the interpolation parameter
values τi . XCCurv provides four strategies:
• Chord length parametrization
Sets the τi parameters in the interval [0, 1], so that:
τi+1 − τi
kQi+1 − Qi k2
=
τi+2 − τi+1
kQi+2 − Qi+1 k2
• Uniform parametrization
Sets the τi parameters equally spaced in the interval [0, 1].
21
New Curve
• Centripetal parametrization
Sets the τi parameters in the interval [0, 1], so that:
τi+1 − τi
=
τi+2 − τi+1
µ
kQi+1 − Qi k2
kQi+2 − Qi+1 k2
¶1/2
• Exponential parametrization
Sets the τi parameters in the interval [0, 1], so that:
τi+1 − τi
=
τi+2 − τi+1
µ
kQi+1 − Qi k2
kQi+2 − Qi+1 k2
¶α
with
α>0
Finally, the user must set the NURBS weights to define the NURBS space.
• Non Rational
Each weight is set to 1. Thus the NURBS space is a non-rational
spline space.
• Manual
This input can be performed with the keyboard only. For each weight
digit its value in the properly text-box.
Remember that the same number of weights must be set as the number
of the interpolation points.
7.2.1
Norm Approximation button and AP file
This button allows the computation of a least square weighted approximation curve starting from some given 2D points (AP). After these points have
been given, the window of fig.7.3 is shown, and the user must:
1. choose the values to weight the approximation points:
• Equal
• Manual
2. choose an approximation Method:
• Least square
• Constrained least square
• Periodic least square
3. choose curve degree;
4. choose a Parametrization strategy:
• Uniform
22
Interpolation button and IP file
Figure 7.3: Norm Approximation Window
• Chord length
• Centripetal
• Exponential
5. choose Extended partition:
• Automatic
• Manual
6. choose the number of knots;
7. choose NURBS weights:
23
New Curve
• Non rational
• Manual
The weights to associate to the approximation points can be:
• Equal
This option sets all the weights to 1; non-weighted approximation.
• Manual
This option allows to input the weights by keyboard. In the AP table,
in the Params sector, the x, y coordinate points are shown within all
the weights to 1; click with LMB the weight to be changed and give
the new value in the properly text-box; OK to confirm and Done to
quit the input step.
Approximation methods:
• Least square approximation method
Let {Qi }i=1,...,n , be the approximation points. This method computes
the NURBS curve C(t), so that the following expression is the minimum value:
n
X
kC(τi ) −
Qi k22
i=1
=
n
X
((C1 (τi ) − xi )2 + (C2 (τi ) − yi )2 )
i=1
• Constrained least square approximation method
In addition to satisfying the least square approximation, this method
constrains the curve to pass from the first and last given points, that
is:
C(τ1 ) = Q1 e C(τn ) = Qn
• Periodic least square approximation method
In addition to satisfying the least square approximation, this method
constrains the curve to be periodic, that is:


C(τ1 ) = C(τn )



 C 0 (τ1 ) = C 0 (τn )
..

.




C (m−2) (τ1 ) = C (m−2) (τn )
Then the user must give the degree curve and choose the parametrization
strategy, that is, the rule to set the interpolation parameter values τ i . XCCurv provides four strategies:
24
Interpolation button and IP file
• Chord length parametrization
This option sets the τi parameters in the interval [0, 1], so that:
kQi+1 − Qi k2
τi+1 − τi
=
τi+2 − τi+1
kQi+2 − Qi+1 k2
• Uniform parametrization
This option sets the τi parameters equally spaced within the interval
[0, 1].
• Centripetal parametrization
This option sets the τi parameters in the interval [0, 1], so that:
τi+1 − τi
=
τi+2 − τi+1
µ
kQi+1 − Qi k2
kQi+2 − Qi+1 k2
¶1/2
• Exponential parametrization
This option sets the τi parameters in the interval [0, 1], so that:
τi+1 − τi
=
τi+2 − τi+1
µ
kQi+1 − Qi k2
kQi+2 − Qi+1 k2
¶α
with
α>0
The next steps are the choice of the knot partition strategy: The latter can
be:
• Manual
The user can set the position of the interior knots by the mouse or the
keyboard; in the mouse case to quit the input click with RMB while
in the keyboard case press the Done button.
• Automatic
In this case the number of knots must be given; XCCurv sets the
interior knots so that the least square approximation curve will be
unique. The exterior knots are set to coincide with the end interval
points.
The final step is to define the NURBS space by giving the NURBS weights:
• Non Rational
Each weight is set to 1. Thus the NURBS space is a non-rational
spline space.
• Manual
This input can be performed with the keyboard only; digit its value
in the properly text-box.
Remember that the same number of weights must be set as the number
of the approximation points.
xccurv User’s Guide . . .
Chapter 8
Edit
This sector allows the user to manage the curve environment by classic
functions as:
8.1
Reset
This button resets XCCurv. If the curves have not been saved they will be
lost.
8.2
Delete
This option allows the user to delete the active curve. After this operation,
no curve will be active. Proceed immediatly to select a curve to be active
or create a new curve.
8.3
Select
XCCurv allows the user to model up to MAXC curves at the same time
(100 in this release). One of these must be selected as active (appearing in
white). All the operations that XCCurv provides are only able for the active
curve. To select a curve as being active, click on one CP of a curve with
LMB and click with RMB to confirm. Note that the last curve created or
loaded by a file is set active.
8.4
Copy
This option allows the user to duplicate the active curve. The two curves
are one over the other and only moving the last can be appreciated the
duplication effect.
26
8.5
ReDo
UnDo
This option allows the user to return to the curve situation previous up to
the latest 16 modifications.
8.6
ReDo
This option allows the user to repeat the latest modifications eliminated
with UnDo.
xccurv User’s Guide . . .
Chapter 9
Misc
This sector presents a miscellanea collection of useful modelling functions.
9.1
Rational Cubic Tension
This button refers to the two methods of interpolation called Rational Cubic C 1 and Rational Cubic C 2 . For a curve created with these interpolation
methods this button is abled and provides to change the length of the curve
mantaining the interpolation. This is realized by using some tension parameters with local or global effect. To change the tension of the curve between
two interpolation points, click with CMB on these two points. Press LMB
and drag on the right or on the left respectively to increase or decrease the
tension value.
9.2
Curve Lenght
Computes the length of the active curve.
9.3
Draw Points
XCCurv graphically represents the active curve using dots. These dots correspond to curve points with equally spaced parameter values.
This option is useful to test curve parametrization. In fact, if the curve is
well-parametrized, these curve points will be equally spaced, even on the
curve. To continue and redisplay the curve in the standard mode, click with
LMB.
9.4
Span
This button allows the user to visualize and match a knot interval with a
curve span.
28
Reparametrization
• mouse: to select a knot interval, click on it with LMB; repeat for
other knot intervals. RMB to stop.
• keyb: to select a knot interval inserts a value belonging to the desired
interval or selects directly the left interval knot in the knot list; Done
to exit.
9.5
Split
This option allows the user to split the active curve into two curves.
• To split, click on the chosen curve point with LMB.
9.6
Reverse
This button allows for reverse the parametrically definition of the active
curve. In other words, the zero parameter value will be now associated to
the last curve point and the one parameter value to the first.
9.7
Join
Select the first curve with LMB, then the second curve to join with LMB;
the first point of the second curve will be joined to the last point of the first
curve.
9.8
Degree Elevation
This button allows the user to make a degree elevation of the curve by
1 degree. This procedure does not modify the curve shape, but only its
analytical representation.
To make a degree elevation greater than 1, click on the button more than
once.
9.9
Reparametrization
This button opens the following menu, from which it is possible to choose
different reparametrization techniques:
• Linear rational
• Span
• kC 0 (t)k
29
Misc
• Root arc
• Adaptive span
• Adaptive kC 0 (t)k
• Adaptive root arc
Figure 9.1: Reparametrization Window
These consist in changing the current parameter of the active curve with
another parameter using a linear rational reparametrization function that
keeps the curve a NURBS too.
All the proposed techniques use a linear rational or a piecewise linear rational
function to approximate the arc length parametrization function
ϕ(t) =
Z
t
0
kC 0 (u)k2 du
by interpolation or uniform approximation.
For each chosen technique, the following approximation modes are available:
• C 1 interpolation
• C 0 uniform approximation
30
Reparametrization
• C 0 interpolation
The proposed techniques partition the parametric interval in different ways
and consequently use a different piecewise reparametrization function.
9.9.1
Linear rational button
This option reparametrizes the whole active curve using a single linear
rational function. In this case the choise of C 1 or C 0 interpolation gives
the same approximation function for ϕ(t).
9.9.2
Span button
This option performs piecewise reparametrization of the active curve after
splitting the parametric domain at the knots.
9.9.3
kC 0 (t)k button
This option performs a piecewise reparametrization of the active curve after
splitting the parametric domain at the points where the ϕ(t) function
ϕ(t) =
Z
t
0
kC 0 (u)k2 du
changes convexity (concavity).
Because a linear rational function is always convex (concave), this option
allows the user to approximate the ϕ(t) shape.
9.9.4
Root arc button
This option performs a piecewise reparametrization of the active curve after
splitting the parametric domain at the zeroes of the arc test function a(t)
a(t) =
Rt
0
kC 0 (u)k du
− t t ∈ [0, 1]
L
where L is the curve length (L = 01 kC 0 (u)k du).
A well-parametrized curve, in the arc length sense, results in a(t) = 0 ∀t.
Splitting the reparametrization at the a(t) zeroes means reparametrizing the
curve only where necessary.
R
The following three techniques, called Adaptive, approximate the arc length
parametrization function ϕ(t) adaptively, up to a given tolerance.
The first step is to compute an approximate linear rational function over
the whole parametric domain. If tolerance is not reached, the parametric
interval is divided into two intervals, and so on:
31
Misc
9.9.5
Adaptive span button
This option divides the interval in correspondence with a knot. Otherwise,
it splits the interval in half, if it does not contain knots.
9.9.6
Adaptive kC 0 (t)k button
This option divides the interval into two intervals to respect the concave/convex
behaviours of the kC 0 (t)k function. Otherwise, it splits the interval in half,
if the kC 0 (t)k function is already concave or convex, but tolerance has not
been reached.
9.9.7
Adaptive root arc button
This option divides the interval into two intervals to respect the roots of the
a(t) function. Otherwise, it splits the interval in half, if it does not contain
other a(t) roots.
9.10
Multi Resolution Analysis
This is an interesting facility of XCCurv. Its implementation is prototypal
and for this reason is abled only for an active curve of degree 3, with uniform
knot partition and with 2k + 3 control points with k an integer value.
This option uses a multiresolution curve representation, based on wavelets,
that conveniently supports a variety of operations: smoothing a curve; editing the overall form of a curve while preserving its details; and so on. This
implementation supports continuous level of smoothing.
When the bar and the text-box are abled, they have position/value k
(the initial resolution level of the curve); changing this position/value we
smooth or refine the curve mantaining its details (see [FINK94]).
xccurv User’s Guide . . .
Chapter 10
Modify
This sector provides the capability to modify the active NURBS curve by:
• Knot partition
• Control Points
• Geometric constraints
• Geometric Transformations
By Modify we mean variation of the curve parameters. Sometimes this
involves a shape curve variation, and sometimes only a different analytical
representation.
10.1
Knot buttons
10.1.1
Insert button
This button allows the user to make a knot insertion of 1 or more knots in
the actual knot partition. This procedure does not modify the shape of the
curve, but only its analytical representation.
Mouse → click on chosen position inside
parametric interval with LMB;
→ click CMB on an existing knot to elevate its multeplicity;
→ click with RMB to stop.
Keyb
→ digit new knot value in the properly text-box;
→ OK to confirm;
→ Done to exit.
34
Control Point buttons
10.1.2
Move button
This button allows the user to move one or more interior knots on the actual
partition from their initial position to a new one. This procedure modifies
the curve shape.
Mouse → press on a knot with LMB, drag to new position,
then release;
→ click with RMB to confirm.
Keyb
10.1.3
→ select a knot by clicking on it with LMB
in the knot table;
→ digit its new value
(use Backspace to delete the old value);
→ OK to confirm;
→ Done to exit.
Remove button
This option tries to remove a knot from the actual knot partition without
modifying the curve shape. If this procedure is successful, the effect will be
a curve with a different analytical representation.
Mouse → click on a knot with LMB;
→ click with RMB to confirm.
Keyb
10.1.4
→ select a knot by clicking on it with LMB
in the knot table;
→ OK to confirm;
→ Done to exit.
Refine button
The knot partition wil be refined; in the middle point of each knot interval
will be insert a new knot.
10.2
Control Point buttons
These buttons allow the user to modify the control points and weights.
10.2.1
Insert button
This button performs the operation known as Inverse Knot-Insertion. This
consists in the specification of a point on the control polygon. XCCurv
identifies a point on the parametric domain from which, by knot insertion, a
new polygonal can be obtained having the chosen point as one of the control
35
Modify
points.
This procedure does not modify the curve shape, but only its analytical
representation.
Mouse → click on chosen polygonal point with LMB.
Keyb
→ digit its coordinates and weight values;
→ OK to confirm each value;
→ Done to exit.
Note that, in the Keyboard case, if the new coordinate point does not belong
to the polygonal, a message appear and the user must digit others coordinate
points.
10.2.2
Add button
This button allows the user to add new control points. This procedure
modifies the curve shape.
Mouse → to select where to add a CP,
click on a polygonal segment with CMB;
→ click on new position with LMB;
→ click with CMB on an existing CP to elevate
its multiplicity;
→ clicking with LMB without a previous segment selection,
inserts a CP as first.
Keyb
10.2.3
→ to select the position at which to add a CP,
click on CP table with LMB;
→ digit its coordinates and weight values;
→ OK to confirm each value;
→ Done to exit.
Move button
This button allows the user to move a control point. This procedure modifies
the control polygon and therefore the curve shape.
Mouse → press on chosen CP with LMB and drag
to the new position;
→ release to exit.
Keyb →
→
→
→
click on a CP with LMB in CP table;
digit its coordinate values;
OK to confirm;
Done to exit.
36
10.2.4
Geometric buttons
Delete button
This button allows the user to delete a control point. This procedure modifies the control polygon and therefore the curve shape.
Mouse → click on chosen CP with LMB.
Keyb → click on a CP with LMB in CP table;
→ OK to confirm;
→ Done to exit.
10.2.5
Weight button
This button allows the user to modify a weight value associated with a
control point. This procedure modifies the curve shape.
Mouse → press on chosen CP with LMB and
drag on the right to increase the weight value,
on the left to decrease the weight value;
→ release to exit.
Keyb →
→
→
→
10.3
click on chosen CP with LMB in CP table;
digit new weight value;
OK to confirm;
Done to exit.
Geometric buttons
These buttons allow the user to make some geometric modifications to the
shape of the curve. By Geometric modify we mean that it is possible to
impose some geometric constraints, such as, passing over a given point.
10.3.1
One Weight button
This button allows the user to modify the active curve so that it passes over
a point S ∗ by only changing a weight. More precisely, the user must select a
curve point (S) and a point on the control polygon (P ). Then he/she must
choose S ∗ on the straight segment M P (see fig.10.1), where M is the analog
of S, when the weight associated to the control point P is zero.
mouse → click on a curve point (S) with CMB;
→ click on a polygonal point (P ) with CMB;
The line defined by S and P and the segment M P on this line will be shown.
→ press with LMB and drag to the chosen S ∗ ;
→ release to exit.
Note that, the dragging stage quit if S ∗ touches P or M .
37
Modify
Figure 10.1: One weight modify
10.3.2
Two Weight button
This button allows the user to modify the active curve so that it passes over
a point S ∗ by changing only two weights. More precisely, the user must
select two control points Pi and Pj ; XCCurv shows a curve point S and a
point M . S is the curve point that will be moved to S ∗ , while M represents
the curve point S, if the weights associated with the two selected control
points were zeroes. Now the user can set S ∗ to be in the triangle Pi Pj M
(see fig. 10.2).
XCCurv also shows the line through S and M . If the user chooses S ∗ in
the triangle, but also on SM , the curve will be modified to be simmetry
preserving.
Figure 10.2: Two weights modify
38
Transformation buttons
mouse → click on a CP (Pi ) with CMB;
→ click on a CP (Pj ) with CMB;
→ press on a point inside the Pi Pj M triangle with LMB
and drag to the chosen S ∗ ;
→ released to exit.
10.3.3
One CP button
This button allows the user to modify the active curve so that it passes over
a point S ∗ by changing only one control point. More precisely, the user must
select a curve point (S); XCCurv finds the control point P nearest to S and
shows the line through S and the control point. The user must set S ∗ to be
on this line.
Mouse → press on a curve point (S) with LMB
and drag to the new position;
→ released to exit.
XCCurv shows the line defined by S and P .
10.3.4
Local button
This button allows the user to select a curve segment and modify only the
shape of this curve segment only. This procedure consists in local knot
refinement and in a control point movement.
Mouse → click on a curve point with CMB to select the first
segment end point;
→ click on a curve point with CMB to select the last
segment end point;
→ press with LMB and drag to a new position;
→ released to exit.
XCCurv computes the parametric interval associated with this curve segment and inserts m+1 knots (with m as the order curve) inside this interval.
Now there is a basis function with this interval as support. By moving the
control point associated with this basis function, only the curve segment will
be modified.
10.4
Transformation buttons
These buttons allow the user to make the following geometric transformations:
39
Modify
10.4.1
Translation button
This button allows the user to translate the active curve from its position
to a new one or some its control points only.
Mouse → select with CMB the control points to be translated;
nobody selection means all control points;
→ press with LMB to define the center of translation;
→ drag to define the translation vector;
→ released to exit.
Keyb
→ digit the translation vector coordinates
in the Window Transformation;
→ OK to confirm
Figure 10.3: Tranformation Window
40
Transformation buttons
10.4.2
Scaling button
This button allows the user to scale the active curve.
Mouse → select with CMB the control points to be scaled;
nobody selection means all control points;
→ press with LMB to define the center of scale;
→ drag to define the scaling factors;
→ released to exit.
Keyb
10.4.3
→ digit the coordinates of the center of scale
in the Window Transformation;
→ digit the scaling factors;
→ OK to confirm
Rotation button
Mouse → select with CMB the control points to be rotated;
nobody selection means all control points;
→ press with LMB to define the center of rotation;
→ drag to define the angle of rotation;
→ released to exit.
Keyb
→ digit coordinates of the center of rotation
in the Window Transformation;
→ digit the angle in degree;
→ OK to confirm
xccurv User’s Guide . . .
Chapter 11
Functions buttons
These buttons provide the visualization of some different functions. These
are very useful when you need to inspect the analytic and shape characteristics of the active curve.
XCCurv is able to show all these functions contemporarily and to resize each
function window to better understand the function details.
11.1
RB-Spline button
This option shows the graphs of the basis function for the NURBS space
R(Pm , M, ∆, W ) to which the active curve belongs.
11.2
X = C1 (t) and Y = C2 (t) buttons.
These options show the graphs of the components of the active curve. The
control polygons of these functions that have vertices (ξi , xi )i=1,...,m+K (or
(ξi , yi )i=1,...,m+K ) are also shown. The ξi are the nodes and (xi , yi ) are the
control point coordinates.
If the active curve has been created by interpolation or approximation, the
points (ti , xi ) (o (ti , yi )) where ti are the parameter values associated to the
interpolation or approximation points (xi , yi ) will be shown.
11.3
W (t) button
This option shows the graph of the weight function, that is the denominator
function of the rational active curve.
11.4
X = C10 (t) and Y = C20 (t) buttons
These options show the graphs of the first derivative functions of the curve
component functions.
42
11.5
Int kC 0 (t)k button
Slope button
This option shows the graph of the slope function v(t), defined by:
v(t) =
11.6
C20 (t)
C10 (t)
Curvature button
This option shows the graph of the curvature function k(t), defined by:
C10 (t)C200 (t) − C20 (t)C100 (t)
([C10 (t)]2 + [C20 (t)]2 )3/2
k(t) =
11.7
kC 0 (t)k button
This option shows the graph of the function kC 0 (t)k2 − L, where L is the
curve length.
This graph is useful to show the user whether the active curve is wellparametrized or not. In fact, if a curve is well-parametrized, in the arc
length sense, then
kC 0 (t)k −→ L
and therefore kC 0 (t)k − L must zero.
In addition, the minimum and maximum function values are shown.
11.8
Arc test button
This option shows the graph of the function a(t), defined by:
a(t) =
Rt
0
kC 0 (u)k du
− t t ∈ [0, 1],
L
where L is the curve length (L = 01 kC 0 (u)k du). This graph is useful to
show the user whether the active curve is well-parametrized or not. In fact,
if a curve is well-parametrized, in the arc length sense, then a(t) must be
zero.
In addition the minimum and maximum function values are shown.
R
11.9
Int kC 0 (t)k button
This option shows the graph of the function ϕ(t), defined by:
ϕ(t) =
Z
t
0
kC 0 (u)k2 du
Functions buttons
43
This graph is useful to show the user whether the active curve is wellparametrized or not. In fact, if a curve is well parametrized, in the arc
length sense, then ϕ(t) approximates a linear function; ϕ(t) is the analytic
reparametrization function. When you choose to reparametrize the active
curve, you can compare the ϕ(t) function with the reparametrization function that XCCurv uses.
11.10
Wavelet button
This option shows the graphs of the wavelet functions associated to the
RB-spline functions; this button is able when the active curve allows us to
perform a MultiResolution Analysis.
xccurv User’s Guide . . .
Chapter 12
Data file formats
In this section the sintax of each file format used by XCCurv is given and
explained. The data files created or used by XCCurv are stored in the
directory xcmodel/curves2d as default. The # character in the following
is a comment to the data in the file.
12.1
NURBS curve 2D
The following example file is xcmodel/curves2d/c9p.db. The .db extension
identifies a NURBS entity.
FILENAME:c9p.db
# the curve file name
DEGREE
# introduces the curve degree
2
# curve degree
N.C.P.
# introduces the Number of Control Points
9
# number of control poins
N.KNOTS
# introduces the Number of Knots
12
# number of knots
COORD.C.P.(X,Y,W)
# introduces the CPs coord. and weight
2.775558e-17 3.000000e-01 1.000000e+00
# X Y W values
3.000000e-01 3.000000e-01 7.071070e-01
....
-3.000000e-01 -2.775558e-17 1.000000e+00
-3.000000e-01 3.000000e-01 7.071070e-01
2.775558e-17 3.000000e-01 1.000000e+00
KNOTS
# introduces the knot vector
0.000000e+00
# knot values in not decrescent order
0.000000e+00
....
1.000000e+00
1.000000e+00
46
12.2
IGES entity no.126 (NURBS curve 2D)
Interpolation/Approximation points
The following example file is xcmodel/curves2d/fgo.ip. The .ip extension
identifies a list of points.
FILENAME fgo.ip
# the file name
N.P. 18
# introduces the Number of Points and the value
-0.030516 -0.373239
# X Y point coordinates
-0.098592 -0.295775
....
0.105634 -0.316901
0.037559 -0.373239
-0.021127 -0.377934
12.3
Control Points
The following example file is xcmodel/curves2d/spiral.cp. The .cp extension identifies a list of control points.
FILENAME spiral.cp
# the file name
N.C.P. 10
# introduces the Number of CPs and the value
0.000000 0.000000 1.000000
# X Y W 2d coordinates and weight
0.000000 -0.100000 1.105168
....
0.400000 -0.300000 7.178994
0.400000 0.400000 13.317328
-0.400000 0.400000 20.908569
-0.400000 -0.500000 26.867794
12.4
IGES entity no.126 (NURBS curve 2D)
IGES is the first standard exchange format developed to address the concepts
of communicating product data among dissimilar CAD system [ZEID91].
XCCurv, being based exclusively on NURBS, implements the entity no.126
only.
The foolowing example file is xcmodel/curves2d/three circ.igs.
S
1H,,1H;,,14Hthree_circ.igs,
G
38HXCMODEL ver.3.0 Universita’ di Bologna,
G
22Hformato IGES Nov. 2001,32,38,6,308,15,,1.000000E+00,2,2HMM,1,
G
1.000000E-02,13H020507.225522,1.000000E-02,3.000000E-01,,,10,0,
G
13H020507.225522;
G
126
1
0
1
0
0
0
000000000D
126
0
5
14
0
0D
126
15
0
1
0
0
0
000000000D
1
1
2
3
4
5
1
2
3
47
Data file formats
126
0
5
14
0
126
29
0
1
0
0
0
126
0
5
14
0
126,8,2,0,1,0,0,0.000000E+00,0.000000E+00,0.000000E+00,
2.500000E-01,2.500000E-01,5.000000E-01,5.000000E-01,
7.500000E-01,7.500000E-01,1.000000E+00,1.000000E+00,
1.000000E+00,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,3.038869E-01,2.929329E-01,
0.000000E+00,6.038869E-01,2.929329E-01,0.000000E+00,
6.038869E-01,-7.067138E-03,0.000000E+00,6.038869E-01,
-3.070671E-01,0.000000E+00,3.038869E-01,-3.070671E-01,
0.000000E+00,3.886926E-03,-3.070671E-01,0.000000E+00,
3.886926E-03,-7.067138E-03,0.000000E+00,3.886926E-03,
2.929329E-01,0.000000E+00,3.038869E-01,2.929329E-01,
0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,
0.000000E+00,1.000000E+00;
126,8,2,0,1,0,0,0.000000E+00,0.000000E+00,0.000000E+00,
2.500000E-01,2.500000E-01,5.000000E-01,5.000000E-01,
7.500000E-01,7.500000E-01,1.000000E+00,1.000000E+00,
1.000000E+00,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,2.775558E-17,6.003534E-01,
0.000000E+00,3.000000E-01,6.003534E-01,0.000000E+00,
3.000000E-01,3.003534E-01,0.000000E+00,3.000000E-01,
3.533569E-04,0.000000E+00,2.775558E-17,3.533569E-04,
0.000000E+00,-3.000000E-01,3.533569E-04,0.000000E+00,
-3.000000E-01,3.003534E-01,0.000000E+00,-3.000000E-01,
6.003534E-01,0.000000E+00,2.775558E-17,6.003534E-01,
0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,
0.000000E+00,1.000000E+00;
126,8,2,0,1,0,0,0.000000E+00,0.000000E+00,0.000000E+00,
2.500000E-01,2.500000E-01,5.000000E-01,5.000000E-01,
7.500000E-01,7.500000E-01,1.000000E+00,1.000000E+00,
1.000000E+00,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,7.071070E-01,1.000000E+00,
7.071070E-01,1.000000E+00,2.775558E-17,3.000000E-01,
0.000000E+00,3.000000E-01,3.000000E-01,0.000000E+00,
3.000000E-01,-2.775558E-17,0.000000E+00,3.000000E-01,
-3.000000E-01,0.000000E+00,2.775558E-17,-3.000000E-01,
0.000000E+00,-3.000000E-01,-3.000000E-01,0.000000E+00,
-3.000000E-01,-2.775558E-17,0.000000E+00,-3.000000E-01,
3.000000E-01,0.000000E+00,2.775558E-17,3.000000E-01,
0.000000E+00,0.000000E+00,1.000000E+00,0.000000E+00,
0.000000E+00,1.000000E+00;
T
1G
5D
6P
42
0D
000000000D
0D
1P
1P
1P
1P
1P
1P
1P
1P
1P
1P
1P
1P
1P
1P
3P
3P
3P
3P
3P
3P
3P
3P
3P
3P
3P
3P
3P
3P
5P
5P
5P
5P
5P
5P
5P
5P
5P
5P
5P
5P
5P
5P
T
4
5
6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
1
xccurv User’s Guide . . .
List of Figures
2.1
Main Window . . . . . . . . . . . . . . . . . . . . . . . . . . .
3
3.1
Params Area . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
4.1
Configuration Window . . . . . . . . . . . . . . . . . . . . . .
9
5.1
5.2
Option Area . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Help Window . . . . . . . . . . . . . . . . . . . . . . . . . . .
11
12
6.1
File Request Window
. . . . . . . . . . . . . . . . . . . . . .
13
7.1
7.2
7.3
Shape Approximation Window . . . . . . . . . . . . . . . . .
Interpolation Window . . . . . . . . . . . . . . . . . . . . . .
Norm Approximation Window . . . . . . . . . . . . . . . . .
16
18
22
9.1
Reparametrization Window . . . . . . . . . . . . . . . . . . .
29
10.1 One weight modify . . . . . . . . . . . . . . . . . . . . . . . .
10.2 Two weights modify . . . . . . . . . . . . . . . . . . . . . . .
10.3 Tranformation Window . . . . . . . . . . . . . . . . . . . . .
37
37
39
xccurv User’s Guide . . .
Bibliography
[BBB87] R.H.Bartels, J.C.Beatty, B.A.Barsky, An introduction to splines
for use in computer graphics and geometric modelling, Morgan Kaufman publishers (1987).
[DEB78] C.deBoor, A practical guide to splines, Springer Verlag (1978).
[FAR93] G.Farin, Curves and surfaces for CAGD: a practical guide, III Edition, Academic press (1993).
[FINK94] A.F.Finkelstein, D.H.Salesin, Multiresolution Curves, Computer
Graphics, (1994).
[HOLA93] J.Hoschek, D.Lasser, Fundamentals of Computer Aided Geometric Design, A.K.Peters (1993).
[PITI95] L.Piegl, W.Tiller, The NURBS book, Springer Verlag (1995).
[ROAD90] D.F.Rogers, J.A.Adams, Mathematical elements for computer
graphics II, McGraw-Hill (1990).
[YAM88] F.Yamaguchi, Curves and Surfaces in Computer Aided Geometric
Design, Springer (1988).
[ZEID91] I.Zeid, CAD/CAM Theory and Practice, McGraw-Hill Inc.
(1991).
[XCMODEL00] G.Casciola, xcmodel: a system to model and render NURBS
curves and surfaces; User’s Guide - Version 1.0, Progetto MURST:
”Analisi Numerica: Metodi e Software Matematico”, Ferrara (2000),
http://www.dm.unibo.it/∼casciola/html/xcmodel.html
[XTOOLS00] S.Bonetti, G.Casciola, xtools library, Programming Guide Version 2.0, (2000)
http://www.dm.unibo.it/∼casciola/html/xcmodel.html
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement