#
# CSC 112 Ambrosia Example: a line of rotated cones
#
# Jim Teresco, The College of Saint Rose, Fall 2015
#
from ambrosia import *
# a smaller cone we can add: 50x50x50 sitting atop the
# xz-plane with its left edge at x=0 and redPlaster
smallRedCone = Cone()
smallRedCone.material(redPlaster).scale(.5,.5,.5).translate(25,25,0)
# Now, we'll add a whole line of them out along the x axis, rotating
# by an amount also determined by the "cone number". Note here that
# the number we use in our for loop is not a position or a rotation,
# but instead is a counter that's used to determine the position and
# rotation amount: the position as 50 times the cone number (so each
# successive cone is right next to the previous) and the rotation
# amount is 10 times the cone number (so each is rotated by 10 more
# degrees than its predecessor
for coneNum in range(0,36):
scene.add(smallRedCone,
translate(50*coneNum, 0, 0)*xRot(10*coneNum))
# put in a floor
scene.add(Plane(), translate(0,-50,0), whitePlaster)
image.dimensions(1024, 768)
camera.pos([900,200,-1500])
camera.COI([900,0,0])
camera.angle(65)
camera.shoot()