|
From: James W. W. <ja...@wr...> - 2004-08-30 21:57:17
|
Bruce Director <ba...@ds...> wrote: >Last year, in the process of working with Yotam Gingold on a NURB >bug, I thought that the row and column definitions were reversed. >I had provided an example where there were 3 "rows" and 58 >"columns", but in order to render the NURB curve correctly I had to >set numRows to 58 and numColumns to 3. Here is his answer: > >>I re-read the QD3D documentation regarding rows and columns, and I believe >>what you think is "reversed" is actually correct. To QD3D, your model's >>controlPoints[0-2] are the first row, [3-5] are the second row, and so on. >>Thus there are 58 rows and 3 columns. It is good to know then that QD3D >>is "correct". That discussion doesn't say anything about what's u and what's v, so I don't see how it sheds any light on my argument. >I think my misunderstanding had to do with thinking the 2-D array of >control points was stored as a 1-D array in column major order >instead of row major order. I am aware that the array is stored in row major order, so if I have a misunderstanding, that's not it. Let's consider the code in Geom Test, createGeomNURBPatch. Since uKnots is an array of 8 values, and uOrder is 4, there should be 4 control points on the u axis. Similarly, vKnots has 6 values, and vOrder is 3, so there should be 3 control points on the v axis. However, numRows is 3 and numColumns is 4, which according to the documentation means that there are 3 control points in the u direction and 4 control points in the v direction. -- James W. Walker, ScriptPerfection Enterprises, Inc. <http://www.write-brain.com/> |