al.al. Posted April 13, 2023 Share Posted April 13, 2023 Hi there, I am facing a problem where I am trying to create a growth effect with the foreachloop, where it creates a polyline for every new point it found with the nearpoint function and add it to the group "start". So the issue is mainly that the foreach loop starts always from the first point of the starting group and not the last it has been added, therefore it creates overlapping points and lines. :/ How would you solve this in VEX with the foreach loop? Thanks for any help in advance! odForce_growthEffect.hiplc Quote Link to comment Share on other sites More sharing options...
fencer Posted April 13, 2023 Share Posted April 13, 2023 Check an idea. odForce_growthEffect_v02.hiplc 4 1 Quote Link to comment Share on other sites More sharing options...
al.al. Posted April 15, 2023 Author Share Posted April 15, 2023 @Fencer Thanks very much! It's exactly what I was looking for. On 4/13/2023 at 6:52 PM, fencer said: Check an idea. odForce_growthEffect_v02.hiplc 141.68 kB · 11 downloads Quote Link to comment Share on other sites More sharing options...
hannes603 Posted April 18, 2023 Share Posted April 18, 2023 On 4/13/2023 at 6:52 PM, fencer said: Check an idea. odForce_growthEffect_v02.hiplc 141.68 kB · 14 downloads thats interesting.. I dont really get the find function part. how can it avoid that all points connect? Quote Link to comment Share on other sites More sharing options...
fencer Posted April 19, 2023 Share Posted April 19, 2023 On 4/18/2023 at 6:25 AM, hannes603 said: thats interesting.. I dont really get the find function part. how can it avoid that all points connect? For example, you have points 1,2,3. Point 1 found point 2 as closest and add this point into array (taken), then point 3 found point 2 as well, so point 3 checks array if this point is already taken, if taken = skip, if not taken = create line and add this point into array (taken). Function "Find" - Returns the position of the first occurrence of the target value within the array. OR checking array for existing value in it, in our case searching taken point number. 2 Quote Link to comment Share on other sites More sharing options...
hannes603 Posted April 20, 2023 Share Posted April 20, 2023 17 hours ago, fencer said: For example, you have points 1,2,3. Point 1 found point 2 as closest and add this point into array (taken), then point 3 found point 2 as well, so point 3 checks array if this point is already taken, if taken = skip, if not taken = create line and add this point into array (taken). Function "Find" - Returns the position of the first occurrence of the target value within the array. OR checking array for existing value in it, in our case searching taken point number. 19 hours ago, fencer said: For example, you have points 1,2,3. Point 1 found point 2 as closest and add this point into array (taken), then point 3 found point 2 as well, so point 3 checks array if this point is already taken, if taken = skip, if not taken = create line and add this point into array (taken). Function "Find" - Returns the position of the first occurrence of the target value within the array. OR checking array for existing value in it, in our case searching taken point number. thanks a lot! got it 1 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.