I have a surface where points have been scattered uniformly and I would like to distribute the pscale in a random function but the sum of them will not overcome the area of the surface including a gap between them.
(pscale_sum + gap) <= area_sum
Any ideas?
Distribute Random Pscale
6101 5 2- csp
- Member
- 230 posts
- Joined: Oct. 2009
- Offline
- KMcNamara
- Member
- 228 posts
- Joined: Dec. 2012
- Offline
Hi, the attached example should do this.
The general idea is that you measure the area with a measure SOP, then feed that into a VOPSOP. In the VOPSOP you use (area+gap)/numPoints as a multiplier to set your range on the random number output. Gap is a parameter on the VOPSOP, so you can change the value there.
The result is that you get a combined pscale < area+gap. There is no guarantee that the combined pscale is close to area+gap, but it will always be less than.
Let me know if you have any questions
The general idea is that you measure the area with a measure SOP, then feed that into a VOPSOP. In the VOPSOP you use (area+gap)/numPoints as a multiplier to set your range on the random number output. Gap is a parameter on the VOPSOP, so you can change the value there.
The result is that you get a combined pscale < area+gap. There is no guarantee that the combined pscale is close to area+gap, but it will always be less than.
Let me know if you have any questions
- csp
- Member
- 230 posts
- Joined: Oct. 2009
- Offline
I am afraid it wasn't what I had in mind. I want to give a number of points and a gap and the vopsop be able to distribute the pscale the available area to all the points randomly, in order to use the maximun possible space taking in count all the above variables.
In your fhip file the sum of the area is 10000 and the pscale sum of 500 points is 60. The goal is not to only to be 60 < 10000 but also as close as possible to that. The gap was 0.
In your fhip file the sum of the area is 10000 and the pscale sum of 500 points is 60. The goal is not to only to be 60 < 10000 but also as close as possible to that. The gap was 0.
- Infernalspawn
- Member
- 229 posts
- Joined: May 2006
- Offline
hm, not sure what you want to do, i see 2 options:
1) you have an area that you want to cover evenly with points, so you have minimum gaps & even distribution of points
2) you have your points already distributed on a surface, but you want to get the best radius/pscale on to these points to minimize the gaps.
is any of this what you're looking for ?
Seb
1) you have an area that you want to cover evenly with points, so you have minimum gaps & even distribution of points
2) you have your points already distributed on a surface, but you want to get the best radius/pscale on to these points to minimize the gaps.
is any of this what you're looking for ?
Seb
- csp
- Member
- 230 posts
- Joined: Oct. 2009
- Offline
- sadhu
- Member
- 112 posts
- Joined: Feb. 2010
- Offline
-
- Quick Links