4
$\begingroup$

Lets say i have a graph and i want to distribute points on that graph. But i want them to have a equal distance to each other based on the X vector. Does anyone know how to achieve this? enter image description here

My Node tree: enter image description here

$\endgroup$

2 Answers 2

8
$\begingroup$

Some variation on this.

In the case of an XY graph:

  1. Capture the positions of the input graph (You could resample it to greater density, if you needed to, for a closer linear interpolation, later)
  2. Scale the graph to 0 in Y
  3. Evenly resample the curve, while a straight line, to your desired resolution.
  4. Offset, (project,) the newly sampled points to an interpolation of the original curve, in Y only.

enter image description here

Which takes you from here, evenly distributed along the curve's length:

enter image description here

to here, evenly distributed in X:

enter image description here

$\endgroup$
1
  • $\begingroup$ That would be the better solution, because no duplicate points are being created. Thank you! $\endgroup$
    – jdnkr
    Mar 3, 2022 at 11:43
2
$\begingroup$

Blocks evenly distributed Geometry Node graph

You can resample a lot and only use some of the new points by limiting the selection using a modulo on the relevant axis.

$\endgroup$
2
  • $\begingroup$ That did it! Thank you! $\endgroup$
    – jdnkr
    Mar 3, 2022 at 11:14
  • $\begingroup$ Ah, i found an issue with this. Because of the resample by a lot, there are duplicate points that are being created and multiple instancens on one location. $\endgroup$
    – jdnkr
    Mar 3, 2022 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .