[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: FW: [cgmo-webcgm] NURBS test 01
follow-up by Dick Fuhr Dave Technical Fellow - Graphics/Digital Data Interchange Boeing Commercial Airplane 206.544.3560, fax 206.662.3734 <-- NEW NUMBERS david.w.cruikshank@boeing.com -----Original Message----- From: Fuhr, Richard D Sent: Thursday, March 16, 2006 10:18 AM To: Robert Orosz; Cruikshank, David W Subject: RE: [cgmo-webcgm] NURBS test 01 Rob, I don't think that I have privileges to post to the CGM Open list so am sending this to you and to Dave. There is a published algorithm in "The NURBS Book" by Les Piegl and Wayne Tiller. I have the edition that is copyright 1995, and in that book, the section on Degree Elevation is from p. 188 to p. 212. In the actual code I wrote to generate the CGM data, I called a Boeing "Spline Toolkit" function that did the degree elevation. The Boeing Spline Toolkit library has been around for a long time and is used internally. Dick Fuhr -----Original Message----- From: Robert Orosz [mailto:roboro@AUTO-TROL.com] Sent: Thursday, March 16, 2006 9:18 AM To: Cruikshank, David W; CGM Open WebCGM TC Cc: Fuhr, Richard D Subject: RE: [cgmo-webcgm] NURBS test 01 All, I'm still looking at this. I got diverted onto something else yesterday, and I expect similar diversions today. I will post something as soon as I can. Richard, could you describe the "standard algorithm" you used to transform your quadratic curve to the cubic curve. I had a quick glance through a textbook, and couldn't find an algorithm to do that. Thanks, Rob -----Original Message----- From: Cruikshank, David W [mailto:david.w.cruikshank@boeing.com] Sent: Tuesday, March 14, 2006 6:53 PM To: CGM Open WebCGM TC Cc: Fuhr, Richard D Subject: RE: [cgmo-webcgm] NURBS test 01 oops forgot the attachement! Dave Technical Fellow - Graphics/Digital Data Interchange Boeing Commercial Airplane 206.544.3560, fax 206.662.3734 <-- NEW NUMBERS david.w.cruikshank@boeing.com -----Original Message----- From: Cruikshank, David W Sent: Tuesday, March 14, 2006 5:30 PM To: CGM Open WebCGM TC Cc: Fuhr, Richard D Subject: [cgmo-webcgm] 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]