Build curve from points

   22428   4   1
User Avatar
Member
14 posts
Joined: Feb. 2010
Offline
Hi everybody.

I have a problem I can't solve. I need to sort a given number of points in one direction.
The plan is to attach a curve to the point.

Attachments:
sort_direction_01.jpg (40.3 KB)

User Avatar
Member
345 posts
Joined:
Offline
Use a sort sop and create a curve with a add sop (group tab, if I remember corectly - don't have houdini in front)
User Avatar
Member
14 posts
Joined: Feb. 2010
Offline
Sorry,
I didn't fully explain what i wanted. If i sort by just one axis the curve would get jagged towards the center. I need it to be a smooth curve all around like the way the arrows flow.
User Avatar
Member
345 posts
Joined:
Offline
Have a look at the ‘join curves by proximity’ HDA at this website http://www.kubaroth.com/hda/ [kubaroth.com]

There is a pytony sop inside which does exactly what you are looking for. Instead of sorting prims you need to do a loop over points and their neighbours (excluding previous point) and assign lowest possible value of your custom point attribute. This way you will walk through all the points by jumping between closest neighbours.  
Next use sort sop to reorder point numbers and connect them with an add sop. 

The tricky part is to prepare the order of the points. This solution is pretty slow considering complex situation, so i'm waiting for a vex solution to tackle the problem

Kuba
User Avatar
Member
14 posts
Joined: Feb. 2010
Offline
This was exactly what i wanted, but will unfortunately be to slow


Thanks a bunch anyways.
  • Quick Links