I would first like to mention that I am a beginner to Blender and Animation Nodes. I am trying to create an animation where an icosphere orbits above a plane that emits particles, and if the particles are close enough to the sphere as it passes, will create a spline between the icosphere and the particle. So far in my animation nodes, I am able to find the distances between the icosphere and the particles, but I am unsure how to implement a sort of if statement (like the find close points node) to select only the particles that are a certain distance away, and then use the create spline to create a spline between the icosphere and these particles. Any help would be greatly appreciated.
It is very easy to do with Animation Nodes by using the KDTree node.
First construct the KDTree from the position of the particles. Then, use the Find Points in a Radius node to find the points/particles (shown by red color) within a radius from the Vector which is the position of the object (in this case is a Sphere).
Now, to make splines from the Sphere for each red-points/particles, we have to use the Loop node, with which we create a vector list from the sphere's position and each red-points position. Then use the Spline From Points node to create the splines from the previously created vector list, and the Curve Object Output node generates the Curve Object.