import numpy as np
import random

fall_length_average = 20
fall_length_std = 3
petal_frame_animation_time_average = 1
petal_frame_animation_time_std = 0.1

fall_animations = 3

petals = 30

fall_animation_list = [x for x in range(fall_animations)]
fall_lengths = np.random.normal(fall_length_average, fall_length_std, size=petals)
petal_frame_animation_times = np.random.normal(petal_frame_animation_time_average, petal_frame_animation_time_std, size=petals)
petal_frame_animation_offsets = np.random.uniform(0, petal_frame_animation_time_average, size=petals)
petal_falling_offsets = np.random.uniform(0, fall_length_average, size=petals)
positions = np.random.uniform(0,100, size=petals)
for x in range(petals):
    print("#garden-petal-"+str(x)+"{")
    print("    left: "+str(positions[x])+"vw;")
    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;")
    print("}")

for x in range(petals):
    print("<div id=\"garden-petal-"+str(x)+"\" class=\"garden-petal\"></div>")