Apply a function with input of a list, and another list with sublists (python?)

Hi all! I am trying to use the Point.byCyclindrical coordinate to create points on multiple circles with different radii. The catch is, that I want the points to be the same distance from eachother, regardless of which radii they have. This leads to: 1. Different angles for the points on different circles. 2. Me to have sublists of different lengths. (Some circles’ radii are bigger, and can therefore fit more points) Here is a screenshot of my dynamo, python script, and an image of what I am trying to achieve. I use the angles as in[0] and the radii as in[1]. When i run this though, dynamo automatically crashes after less than a second. I don’t know if it’s because my coding is wrong (I’ve never used python before), or maybe it’s my logic. Maybe there is also a different/better way of achieving my goals? Thanks for checking out my post! Carola

not sure what the crashing is about, I didn’t look too closely at your Python - but I think you can do this with native Dynamo by using List.Combine. See if the attached does what you want: EvenSpacedPointsOnCircles


You created an infinite loop when you set i=0 and then did while loop comparing it to length of a list. I don’t see anything in your code that would decrease the length of that list, so effectively your i will always be less. That will crash your computer in a hurry. It’s a good practice to put a counter inside of while loop and set the loop to terminate when it hits some limit like 10 000.

Also, Andrew! Holy cow, the “human” has joined the forum. I haven’t even realized that you were using Dynamo. It’s good to see you!


1 Like