Christmas scene
What do you imagine for Christmas? Although Christmas is in summer time in Australia, I can still picture a snowy scene of white Christmas. There are snowflakes falling down from the sky. The ground is white in daytime and gray in the night. Trees could be green if not covered by snow. There is a snowman sitting on the ground, and some Christmas music....
Everyone should have different pictures of what Christmas is like. I followed my above description and have created the falling snow, the Christmas tree, and the Snowman. Now it is time to put them altogether.
Using the previously created components, I can easily create 100 random falling snowflakes, 20 random sized and located trees, a snowman at the center, a very big ball as the ground, and a background music. Hope you enjoy walking in below my imaginary Christmas scene.
I published this including only Walk mode of navigation so you can walk on the ground. Here are some basic navigation controls in Walk mode:
- Mouse left click and hold: Walk Forward
- Mouse right click and hold: Walk Backward
- Mouse dragging: Change Directions.
- Press "R" key to return to starting viewpoint.
Of course, here are the Logo programming codes.
; Christmas Scene 2013 ; By Andy Yeh CS SETBG 29 ; choose background 29 SETSCALE 1500 1500 1500 DN 750 ; to the center of the ball SETDC 480 530 600 ; material settings SETEC 850 850 850 SETSC 320 400 400 SETAI 67 SETSH 540 SETTR 0 BALL ; a big ball as the ground to walk on HOME SETSCALE 1 1 1 REPEAT 100 [ ; inline 100 snows RT RANDOM 360 TL RANDOM 360 RU RANDOM 360 SETX 20 - RANDOM 40 SETY (RANDOM 10)/10 SETZ 20 - RANDOM 40 WORLD "/sites/default/files/user/u3/world/one_snow.x3d ] HOME TO tree :size ; tree procedures SETSCALE .15*:size 2*:size .15*:size RU 90 FD 1*:size RD 90 SETMAT 0 27 CAN SETSCALE 1.5*:size 2.5*:size 1.5*:size RU 90 FD 1*:size RD 90 SETMAT 0 21 CONE END REPEAT 20 [ ; 20 random trees SETX 20 - RANDOM 40 SETZ 20 - RANDOM 40 SETY -(SQRT GETX*GETX+GETZ*GETZ)/20 tree ((RANDOM 10)/10)+1 ] ; start building the snowman HOME SETSCALE 1 1 1 SETDC 500 500 500 SETEC 830 830 830 SETSC 0 0 0 SETAI 200 SETSH 200 SETTR 0 UP 0.4 BALL SETSCALE 0.6 0.6 0.6 UP 0.6 BALL UP 0.2 SETMAT 1 14 RU 90 TORUS RD 90 SETDC 500 500 500 SETEC 830 830 830 SETSC 0 0 0 SETAI 200 SETSH 200 SETTR 0 SETSCALE 0.5 0.5 0.5 UP 0.2 BALL BACK 0.3 RU 90 SETMAT 1 1 SETSCALE 0.1 0.2 0.1 CONE FD 0.1 EAST 0.1 NORTH 0.1 SETMAT 1 24 SETSCALE 0.06 0.05 0.06 BALL WEST 0.2 BALL EAST 0.1 SOUTH 0.1 BACK 0.1 RD 90 FD 0.3 UP 0.4 RU 180 SETSCALE 0.4 0.4 0.4 SETMAT 1 29 NOZZLE DN 0.8 RU 180 BACK 0.3 SETSCALE 0.05 0.05 0.05 SETMAT 1 33 BALL FD 0.3 RD 15 BACK 0.3 BALL FD 0.3 RU 30 BACK 0.3 BALL FD 0.3 RD 15 RT 90 FD 0.3 RU 15 FD 0.3 RD 90 SETSCALE 0.1 0.6 0.1 SETMAT 0 27 CAN RU 90 BK 0.3 RD 15 BK 0.3 LT 180 FD 0.3 RU 15 FD 0.3 RD 90 CAN ; finally the music SOUND "/sites/default/files/user/u3/sound/silent_night_s.mp3 TRUE TRUE
- Andy's blog
- Login or register to post comments
- 8154 reads