import bpy
def create_cylinder_and_rotate(location, index):
bpy.ops.mesh.primitive_cylinder_add(radius=0.03, depth=1, location=location)
cylinder = bpy.context.active_object
cylinder.name = f"円柱xy t={index:.1f} ({location[0]:.1f},0,{location[2]:.1f}) to ({location[0]:.1f},1,{location[2]:.1f})"
cylinder.rotation_euler.x = 1.5708 # 90度をラジアンで表現
# 繰り返し処理で円柱を作成
x_value = 0.1
for z in range(-9, 0):
create_cylinder_and_rotate((x_value, 0.5, z * 0.1), z * 0.1)
x_value += 0.1