How to delete points on a curve with a distance of 5+ in x axis?

   1287   2   1
User Avatar
Member
3 posts
Joined: March 2016
Offline
Imagine that you randomly draw a curve with a bunch of random points scattered on top, and you only want to keep the points that has a distance more than 5(units) in x axis? How would you do it?

Attached pic is a failed vex code I wrote, hope someone can help correcting me. Thanks in advance!
Edited by Tae byun - July 13, 2022 12:28:39

Attachments:
viz.png (3.5 MB)

User Avatar
Member
166 posts
Joined: March 2014
Offline
I'm unclear which distance you're calculating. What type of wrangle is this? If it's a point wrangle it can't work because you would be overwriting the attribute multiple times.

Also, line 2 should be double equals ==

Line 8 you only need a single absolute value: abs(pos_x - starting_x)
User Avatar
Member
333 posts
Joined: April 2018
Online
A Group Expression can help here:

  • Quick Links