The long story short is that geometry A has a "accumulated area" attribute describing cumulative area covered by each consecutive point on a curve. Geometry B needs to copy the position of a point on Geometry A when "cumulative area" on Geometry A has just exceeded the index of Geometry B. I cannot simply filter geometry A because sometimes two points on Geometry B will map to the same position on geometry A.
I've hit a brick wall so I'll also describe what I am trying to do generally in case there could be a different approach.
I am trying to create a "phyllotaxis" pattern generator that takes an input curve C (flat on the X and Z axes). Imagine that Curve C describes a 3D shape when rotated around the Z axis. The geometry nodes distributes points evenly on that 3D surface in a phyllotaxis pattern.
The math is all from this paper "The use of positional information in the modeling of plants" (Prusinkiewicz et al., 2001). I've got the whole thing implemented in Geometry Nodes except for the one step described above. Here's a slide to summarize the process, and the red box is the step I'm stuck on:
I successfully created an attribute with the cumulative Area divided by "petal" area. Now, when Area is greater than an integer, I want to place a new point (one point = one "petal") at that position. That is where I am super stuck because Blender Geometry nodes doesn't make it easy to make "for" loops!
Thank you in advance for any help or suggestions at all. This node setup would be incredibly useful for generating all sorts of plants and organic type structures. All you would need to do is change the input curve, "petal" size, and instance your petals on each point.
And finally it would end up looking something like this, but with the balls/petals evenly spaced:
Solution by Markus von Broady (see replies)
I used the solution by Markus von Broady to complete the node tree! Here is the portion that I added at the end:
And the result is, now you can make all sorts of shapes by tweaking the input curve and the petal radius!