Jump to content

Finding max and min value of an attribute in VOPPOPs.


Symbolic

Recommended Posts

Hi,

I have a vector attribute inside a POP network that goes into VOPPOPs.

ex:

val: {1.619553,0.423548,-21.839031}

val: {1.608211,0.420283,-21.810768}

val: {1.603649,0.420570,-21.822512}

val: {1.606146,0.420864,-21.819849}

I can isolate the Y component.

val: 0.422827

val: 0.423548

val: 0.420283

val: 0.420570

val: 0.420864

then I need to find the lowest value and use it in the rest of the VOPPOP network. So I get:

val: 0.420283

val: 0.420283

val: 0.420283

val: 0.420283

val: 0.420283

per particle.

It sounds easy, I mean you can do that kind of stuff with an Attribute Promote (Max / Min) at SOP level. But I could not find a way to do it inside VOPPOPs.

Any ideas? Thanks.

Link to comment
Share on other sites

Yo dude. You'll want to use a for loop in a VOP POP to test the values of all of the particles in your system. You can set the end value to be Npt, and inside the loop use an Import Attribute VOP to get your attribute. You can then test this value against min and max values, returning the value of the current point or the previous point depending on the results of the test.

Good luck dude.

Link to comment
Share on other sites

  • 4 weeks later...

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.   Paste as plain text instead

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