1import numpy as np
 2import random
 3
 4fall_length_average = 20
 5fall_length_std = 3
 6petal_frame_animation_time_average = 1
 7petal_frame_animation_time_std = 0.1
 8
 9fall_animations = 3
10
11petals = 30
12
13fall_animation_list = [x for x in range(fall_animations)]
14fall_lengths = np.random.normal(fall_length_average, fall_length_std, size=petals)
15petal_frame_animation_times = np.random.normal(petal_frame_animation_time_average, petal_frame_animation_time_std, size=petals)
16petal_frame_animation_offsets = np.random.uniform(0, petal_frame_animation_time_average, size=petals)
17petal_falling_offsets = np.random.uniform(0, fall_length_average, size=petals)
18positions = np.random.uniform(0,100, size=petals)
19for x in range(petals):
20    print("#garden-petal-"+str(x)+"{")
21    print("    left: "+str(positions[x])+"vw;")
22    print("    animation: petal-frames "+str(petal_frame_animation_times[x])+"s linear "+str(petal_frame_animation_offsets[x])+"s infinite, fall-"+str(random.choice(fall_animation_list))+" "+str(fall_lengths[x])+"s "+str(petal_falling_offsets[x])+"s linear infinite;")
23    print("}")
24
25for x in range(petals):
26    print("<div id=\"garden-petal-"+str(x)+"\" class=\"garden-petal\"></div>")