3
$\begingroup$

I would like to make a pattern of points following a phyllotaxis (like on a sunflower).

The algorithm I use is:

for (int i = 0; i < 50; i++)
{
        float r = sqrt(i);
        float t = 2.4 * i;      // (137.5° to radians multiplied by i)
        float x = r * cos(t);
        float y = r * sin(t);
}

I would like to use the repeat zone node introduced in Blender 4.0. I don’t know how to use it properly, though.

I have made a setup using the algorithm above, without the for loop: It works but I would like to do the same thing with a loop.

Node Group

Set Point Position

Repeat the setup

3D viewport

That is the beginning of setup I have made with the repeat zone (it does not work, though):

Repeat Zone try

Does anyone have any hint?

Thank you.

(Blender 4.0)

$\endgroup$
2
  • 2
    $\begingroup$ You don't need a repeat zone for that, since the formula for each point does not depend on the data of the previous point. Your code snippet is a loop, but only because you have to iterate over all values of i. In geometry nodes however, you're always operating in a loop over all vertices, so the repeat zone is moot. You can just do this outside of a repeat zone by using the point index as the value of i. $\endgroup$
    – Hadriscus
    Oct 8, 2023 at 12:36

1 Answer 1

4
$\begingroup$

Thank you very much @Hadriscus, no need for Repeat Zone in this case. A simple Point Index makes the job.

Point Index Setup

3D viewport

$\endgroup$
1
  • $\begingroup$ Cool, looking good ! $\endgroup$
    – Hadriscus
    Oct 12, 2023 at 1:05

You must log in to answer this question.

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