1
$\begingroup$

I got two lists from other calculations, one with a count (ex.: 6, 11, 16, 19, 20) and a second list witch gives me degrees as a step with which 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 separate list) in steps of 60 degree z axis, then 11 Instances with 32.7 degree… etc.

From my little programming experience i wanted to do it with a nested loop because it should work parametrically for even longer lists then list.length 5, so i couldn't 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 which there are all location at once for instantiation.

I hope my problem is clear enough yet, maybe i will try to explain it better in the evening. But I thought maybe 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$
1
  • $\begingroup$ Can you share the node tree you tried in AN? $\endgroup$
    – Omar Emara
    Feb 8 '19 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 thought in the beginning, maybe 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.