Jump to content


Connect points to lines


  • Please log in to reply
3 replies to this topic

#1 sparkChan

sparkChan

    Peon

  • Members
  • Pip
  • 75 posts
  • Joined: 08-November 09
  • Location:china
  • Name:spark chan

Posted 06 June 2012 - 08:54 PM

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:
lines.JPG
this is the file
Attached File  pointsTolines.hip   334.14K   21 downloads
thanks

#2 sadhu

sadhu

    Initiate

  • Members
  • PipPip
  • 172 posts
  • Joined: 09-July 09
  • Location:Mumbai, India
  • Name:Sandeep Doshi

Posted 06 June 2012 - 10:29 PM

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, 06 June 2012 - 10:32 PM.


#3 kare

kare

    Peon

  • Members
  • Pip
  • 29 posts
  • Joined: 03-January 12
  • Location:london, UK
  • Name:ka re

Posted 07 June 2012 - 01:59 AM

View Postsadhu, on 06 June 2012 - 10:29 PM, said:

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, 07 June 2012 - 02:01 AM.


#4 sadhu

sadhu

    Initiate

  • Members
  • PipPip
  • 172 posts
  • Joined: 09-July 09
  • Location:Mumbai, India
  • Name:Sandeep Doshi

Posted 07 June 2012 - 03:33 AM

Quote

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

Attached Thumbnails

  • Connection.jpg

Edited by sadhu, 07 June 2012 - 03:55 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users