Jump to content
Developer Wiki and Function Reference Links ×

Zig-Zag from NURBS curve


Recommended Posts

Hello, I'm looking for some hits how to solve the following problem.

I want to create a script that converts base curve (any Nurbs in 3D, green curve in the picture) into zigzag line around it, but on the same plane (red curve in the picture).

I thought it might work in following steps:

Base curve (green) -> Offest on both side -> divide curves into same number of points -> sorting points -> creating nurbs Curve based on sorted list

But this fails on sorting step.

I had other idea, using vectors:

base curve (green) -> points on curve -> Perpendicular Vectors from these points -> every 2nd Vector turn -180deg -> move point along vectors in both directions -> creating nurbs Curve based on moved points

But I don't know how to create adequate Vectors in 3D.

 

I will most grateful for any help/hints how to solve this.

Example1.jpg

Link to comment

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...