DiegoAP Posted July 20 Share Posted July 20 hi, everyone, I'm trying to make a function that gets the minimum value in P.y and colors the dot in case it's the minimum. Quote Link to comment Share on other sites More sharing options...
Atom Posted July 20 Share Posted July 20 You can use a point wrangle for that and type code. This will make points lower than 0.1 on 1 the color red. if(v@P.y<0.1){v@Cd = set(1,0,0);} Quote Link to comment Share on other sites More sharing options...
Ziyad Posted July 20 Share Posted July 20 You can also run a point wrangle to set a detail attribute for the minimum value: setdetailattrib(0, "minY", @P.y, "min"); Then followed by another point wrangle to read that & assign red to the point that matches that value in Y: float min = detail(0, "minY", 0); if(@P.y == min) @Cd = {1,0,0}; Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted July 21 Share Posted July 21 In attribute wrangle, over points: float bounds[] = detailintrinsic(0, "bounds"); if(@P.y <= bounds[2] + 1e-5) @Cd = set(1,0,0); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.