Jump to content
Sign in to follow this  
sparkChan

Connect points to lines

Recommended Posts

hi, I have bunch of spheres, and then scatter points on them. next I want to do is to connect those points to lines, I mean getting each point from two sphere.

like this picture shows:

post-5194-133904473165_thumb.jpg

this is the file

pointsTolines.hip

thanks

Share this post


Link to post
Share on other sites

One solution could be

1)Use foreach operator to work on every sphere

2)Scatter points (You can randomize this if you want) on every sphere inside foreach.

3)Add attrb, say sortno with value == $PT inside foreach

4)After foreach, connect add sop > By Group > Add - By Attribute - sortno it will connect all the points with similar sortno value.

5)If you dont want all the points to be connected, create different groups of points on the any two (or any number of spheres you want) spheres , process these groups using foreach operator and use the add sop inside foreach to connect points with similar sortno value.

I hope this helps.

Edited by sadhu

Share this post


Link to post
Share on other sites

One solution could be

1)Use foreach operator to work on every sphere

2)Scatter points (You can randomize this if you want) on every sphere inside foreach.

3)Add attrb, say sortno with value == $PT inside foreach

4)After foreach, connect add sop > By Group > Add - By Attribute - sortno it will connect all the points with similar sortno value.

5)If you dont want all the points to be connected, create different groups of points on the any two (or any number of spheres you want) spheres , process these groups using foreach operator and use the add sop inside foreach to connect points with similar sortno value.

I hope this helps.

another solution add add SOP->polygons tab->polygon0 0-50(maximum number of points)

another way add add SOP-> polygons tab -> By Group tab -> All Points(in add parameter)

Edited by kare

Share this post


Link to post
Share on other sites

One solution could be

1)Use foreach operator to work on every sphere

2)Scatter points (You can randomize this if you want) on every sphere inside foreach.

3)Add attrb, say sortno with value == $PT inside foreach

4)After foreach, connect add sop > By Group > Add - By Attribute - sortno it will connect all the points with similar sortno value.

5)If you dont want all the points to be connected, create different groups of points on the any two (or any number of spheres you want) spheres , process these groups using foreach operator and use the add sop inside foreach to connect points with similar sortno value.

something like this with randomization in connection control and just to avoid connection between two points on the same sphere (If you have large no of points scattered)

And as Kare has pointed out , If you sort you points by z and then just use add sop > polygon > Add - Group of N points say 2 you can get similar output.

:)

post-4903-133906878341_thumb.jpg

Edited by sadhu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×