#
# CSC 112 Ambrosia Example: random numbers for object placement
# and the number of cones to place
#
# In this case, we add 30-50 cones who sit atop the xz-plane, but
# whose x and z-coordinates are randomly chosen between -400 and
# 400 in each dimension
#
# Jim Teresco, The College of Saint Rose, Fall 2015
#
from ambrosia import *
import random
# define a green cone, 50x50x50, sitting atop the xz-plane, with
# its axis along the y-axis
greenCone = Cone()
greenCone.material(greenPlastic).scale(.5,.5,.5).translate(0,25,0)
# a floor
scene.add(Plane(), whitePlaster)
# pick a random number of cones to place
numCones = random.randint(30,50)
# place numCones of these randomly in our scene
for coneNum in range(numCones):
scene.add(greenCone, translate(random.uniform(-400,400), 0,
random.uniform(-400,400)))
camera.pos([0,300,-500]).shoot()