Jump to content
Developer Wiki and Function Reference Links ×

Nurbs curve curiosity


Cloud Hidden

Recommended Posts

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?

Link to comment
  • 2 weeks later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...