OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cgmo-webcgm message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: NURBS test 01


There was some discussion about what the nurbs01.cgm test file should
look like.

Attached is a .zipped file.  Save it and rename it to .zip (Boeing and
others reject .zip files)
It contains the original NURB cgm, the png results from BoGART, ISOdraw,
and SDI Convert. (Don and Ulrich - sorry my versions of cgm2img and
metaweb don't seem to handle NURBS very well).
It also contains a nurb01_combined_circle cgm file.  This file has a
black NURB with all weights set to 1.0, a red NURB with the original
weights, and a blue "equivalent" circle element.

This NURB test is one that was generated by Dick Fuhr (our resident
NURBS expert.  In his words:

As I recall (but I have not been able to locate in my files all the
details behind the construction of the original CGM file), the way I
computed the NURBS data for the CGM file was as follows. 
1. Create the exact degree 2 representation of a NURBS circle using one
of the standard textbook representations. 
2. Use a standard algorithm to raise the degree of this NURBS circle
from 2 to 3. I did this to provide a more challenging test case. This
does not change the underlying parameterization, only its NURBS
representation. In other words, if you evaluated points along this cubic
NURBS curve, they would all be within some very small tolerance of a
circle, taking into consideration the amount of precision used to
represent the control points, the weights, and the knots.
3. Hand code the NURBS data into a CGM file.
Dick and Stuart and I spend some time analyzing this the other day and
believe the NURB Dick created should indeed approximate a circle.  The
"goodness" of that approximation depends on how may segments are chosen.

Dick then validated his findings by evaluating the NURB at various
points long the NURB and calculating the distance from the center of the
reference circle. In his words:
Specifically, I dumped the NURBS data (see below), evaluated points
along the curve using a standard NURBS evaluator, and computed the
distance of each these points to the point (3000,3000). If this were a
perfect circle, all of these distances would have been 1000 in this
case. However, the actual maximum difference of these distances from
1000.0 was 0.101761, which is a deviation of 0.0101761%. This reflects
the fact that the data that I hand-entered into the CGM file varied
slightly from a perfect circle, due to the number of decimal places used
for the knots, weights and control points. In particular, all the
control points are represented as integers; but in a theoretically exact
NURBS circle, they would not be.
Data for NURBS curve
nind =     1
ndep =     2
rational = 1
order =    4
ncoef =    13

Knots
kt[0] = 0
kt[1] = 0
kt[2] = 0
kt[3] = 0
kt[4] = 25
kt[5] = 25
kt[6] = 25
kt[7] = 50
kt[8] = 50
kt[9] = 50
kt[10] = 75
kt[11] = 75
kt[12] = 75
kt[13] = 100
kt[14] = 100
kt[15] = 100
kt[16] = 100

B-Spline Coefficients
B-Spline Coefficients and weights in homogeneous form
CV[0] = 4000  3000  1  
CV[1] = 3218.95  2885.79  0.804738  
CV[2] = 2885.79  3218.95  0.804738  
CV[3] = 3000  4000  1  
CV[4] = 1942.64  3218.95  0.804738  
CV[5] = 1609.48  2885.79  0.804738  
CV[6] = 2000  3000  1  
CV[7] = 1609.48  1942.64  0.804738  
CV[8] = 1942.64  1609.48  0.804738  
CV[9] = 3000  2000  1  
CV[10] = 2885.79  1609.48  0.804738  
CV[11] = 3218.95  1942.64  0.804738  
CV[12] = 4000  3000  1  
B-Spline Coefficients in non-homogeneous form
each followed by corresponding weight
CV[0] = 4000  3000  
 w[0] = 1
CV[1] = 4000  3586  
 w[1] = 0.804738
CV[2] = 3586  4000  
 w[2] = 0.804738
CV[3] = 3000  4000  
 w[3] = 1
CV[4] = 2414  4000  
 w[4] = 0.804738
CV[5] = 2000  3586  
 w[5] = 0.804738
CV[6] = 2000  3000  
 w[6] = 1
CV[7] = 2000  2414  
 w[7] = 0.804738
CV[8] = 2414  2000  
 w[8] = 0.804738
CV[9] = 3000  2000  
 w[9] = 1
CV[10] = 3586  2000  
 w[10] = 0.804738
CV[11] = 4000  2414  
 w[11] = 0.804738
CV[12] = 4000  3000  
 w[12] = 1
Parameter = 0 and point = ( 4000 , 3000 )
Distance to (3000,3000) = 1000
Parameter = 3.57143 and point = ( 3978.02 , 3208.59 )
Distance to (3000,3000) = 1000.02
Parameter = 7.14286 and point = ( 3907.32 , 3420.61 )
Distance to (3000,3000) = 1000.07
Parameter = 10.7143 and point = ( 3785.63 , 3618.86 )
Distance to (3000,3000) = 1000.1
Parameter = 14.2857 and point = ( 3618.86 , 3785.63 )
Distance to (3000,3000) = 1000.1
Parameter = 17.8571 and point = ( 3420.61 , 3907.32 )
Distance to (3000,3000) = 1000.07
Parameter = 21.4286 and point = ( 3208.59 , 3978.02 )
Distance to (3000,3000) = 1000.02
Parameter = 25 and point = ( 3000 , 4000 )
Distance to (3000,3000) = 1000
Parameter = 28.5714 and point = ( 2791.41 , 3978.02 )
Distance to (3000,3000) = 1000.02
Parameter = 32.1429 and point = ( 2579.39 , 3907.32 )
Distance to (3000,3000) = 1000.07
Parameter = 35.7143 and point = ( 2381.14 , 3785.63 )
Distance to (3000,3000) = 1000.1
Parameter = 39.2857 and point = ( 2214.37 , 3618.86 )
Distance to (3000,3000) = 1000.1
Parameter = 42.8571 and point = ( 2092.68 , 3420.61 )
Distance to (3000,3000) = 1000.07
Parameter = 46.4286 and point = ( 2021.98 , 3208.59 )
Distance to (3000,3000) = 1000.02
Parameter = 50 and point = ( 2000 , 3000 )
Distance to (3000,3000) = 1000
Parameter = 53.5714 and point = ( 2021.98 , 2791.41 )
Distance to (3000,3000) = 1000.02
Parameter = 57.1429 and point = ( 2092.68 , 2579.39 )
Distance to (3000,3000) = 1000.07
Parameter = 60.7143 and point = ( 2214.37 , 2381.14 )
Distance to (3000,3000) = 1000.1
Parameter = 64.2857 and point = ( 2381.14 , 2214.37 )
Distance to (3000,3000) = 1000.1
Parameter = 67.8571 and point = ( 2579.39 , 2092.68 )
Distance to (3000,3000) = 1000.07
Parameter = 71.4286 and point = ( 2791.41 , 2021.98 )
Distance to (3000,3000) = 1000.02
Parameter = 75 and point = ( 3000 , 2000 )
Distance to (3000,3000) = 1000
Parameter = 78.5714 and point = ( 3208.59 , 2021.98 )
Distance to (3000,3000) = 1000.02
Parameter = 82.1429 and point = ( 3420.61 , 2092.68 )
Distance to (3000,3000) = 1000.07
Parameter = 85.7143 and point = ( 3618.86 , 2214.37 )
Distance to (3000,3000) = 1000.1
Parameter = 89.2857 and point = ( 3785.63 , 2381.14 )
Distance to (3000,3000) = 1000.1
Parameter = 92.8571 and point = ( 3907.32 , 2579.39 )
Distance to (3000,3000) = 1000.07
Parameter = 96.4286 and point = ( 3978.02 , 2791.41 )
Distance to (3000,3000) = 1000.02
Parameter = 100 and point = ( 4000 , 3000 )
Distance to (3000,3000) = 1000
maximum difference of dist from 1000.0 = 0.101761

I want to thank Dick for his exhaustive analysis and welcome comments
from the group.  Dick is about to move to another area within Boeing, so
I won't be able to run downstairs and bother him (he'll be about 40
miles away!), but I'm sure he'll still be able to help with issues like
this if we need him.

Dave Cruikshank
Technical Fellow - Graphics/Digital Data Interchange
Boeing Commercial Airplane
206.544.3560, fax 206.662.3734  <-- NEW NUMBERS
david.w.cruikshank@boeing.com



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]