1
$\begingroup$

I got two lists from other calculations, one with a count (ex.: 6, 11, 16, 19, 20) and a seconed list witch gives me degrees as a step with wich i want to instance objects around a circle (60 , 32.7, 22.5, 18.9, 18).

Specific I want to to instantiate 6 objects along a circle (radius from seperate list) in steps of 60 degree z axis, then 11 Instances with 32.7 degree… etc.

From my little programming expeerience i wanted to do it with a nested loop because it should work parametricly for even longer lists then list.length 5, so i couldnt build a loop for every list.element by hand.

My Problem ist that from the VectorList.outs of the lower one of the nested loops i only get the last Vector List and cant combine them to a final list in wich there are all location at once for instantiation.

I hope my problem is clear enough yet, maby i will try to explane it better in the evening. But I tought maby ist just difficult for me as an Animation Nodes Beginner

Greetings AM

**enter image description here**

Solution 1 but not with AN: Found a way to do it with Python(Beginner) script inside AN, maby its clearer know what i wanted to do with AN than in my description. Question is still open because i want to learn AN and not do it with Python.

#node_in: Count_List [6, 11, 16, 19, 20]
#node_in: Degree_List [60 , 32.7, 22.5, 18.9, 18]

tempList = []

for index, item in enumerate(Count_List):
    value = Count_List[index]
    for index2, x in enumerate(range(int(value))):
        result = Degree_List[index] * (1 + index2)
        tempList.append(result)

return tempList

this List then goes to the instantiator-node

enter image description here

$\endgroup$
  • $\begingroup$ Can you share the node tree you tried in AN? $\endgroup$ – Omar Emara Feb 8 at 20:52
2
$\begingroup$

Just loop over all the lists you have and do your computation:

Node Tree

$\endgroup$
0
$\begingroup$

Found the solution after trying to build a simplified version of the node tree to show it here. It works as tought in the beginning, maby i did a mistake in the complicated version. Heres the solution for some who might want to do the same: enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.