Cloud Hidden Posted September 15, 2003 Share Posted September 15, 2003 I'm trying to create a nurbs curve that's a half circle w/ 10'R. My base curve for comparison is drawn with a half arc and converted to nurbs. So I used code with parameters so that every vertex in the oip looks like the base curve. code: h1 := CreateNurbsCurve(-120, 0, 0, true, 2); AddVertex3D(h1, -120, 120, 0); AddVertex3D(h1, 0, 120, 0); AddVertex3D(h1, 120, 120, 0); AddVertex3D(h1, 120, 0, 0); NurbsSetWeight(h1, 0, 1, sin(Deg2Rad(45))); NurbsSetWeight(h1, 0, 3, sin(Deg2Rad(45)));[/code] Except the curves don't match visually, even though everything in the OIP looks the same. code: h1 := CreateNurbsCurve(-120, 0, 0, false, 2); AddVertex3D(h1, -120*sin(Deg2Rad(45)), 120*sin(Deg2Rad(45)), 0); AddVertex3D(h1, 0, 120, 0); AddVertex3D(h1, 120*sin(Deg2Rad(45)), 120*sin(Deg2Rad(45)), 0); AddVertex3D(h1, 120, 0, 0);[/code] So I changed the code to the second sample--with byCtrlPts false--and now the curve matches the base curve visually. My question is why the first code doesn't match the base curve, even though every vertex looks the same in the OIP? Quote Link to comment
kiwi Posted September 26, 2003 Share Posted September 26, 2003 I found some interesting info about the nurbs, with a point on your circle problem (a bit more than half way down the doc). http://devworld.apple.com/dev/techsupport/develop/issue25/schneider.html But yes : these are complex beasts! Quote Link to comment
Alexandre Villares Posted September 28, 2003 Share Posted September 28, 2003 Very nice article! Thanks for the link Kiwi! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.