譯註:這裡的圓柱指的是題目裡的圓錐

解答: 將以下程式加入 fillScene()

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
var flower = new THREE.Object3D();

for ( var i = 0; i < 24 ; i++ )
{
    var cylinder = new THREE.Mesh( cylGeom, petalMaterial );
    cylinder.position.y = petalLength / 2;

    var petal = new THREE.Object3D();
    petal.add( cylinder );
    petal.rotation.z = 90 * Math.PI/180;
    petal.rotation.y = 15*i * Math.PI/180;
    petal.position.y = flowerHeight;

    flower.add( petal );
}