第八课 画奥运五环旗 教学设计

文档属性

名称 第八课 画奥运五环旗 教学设计
格式 zip
文件大小 170.7KB
资源类型 教案
版本资源 新世纪版
科目 信息技术(信息科技)
更新时间 2017-12-26 10:38:22

图片预览

文档简介

第八课:画奥运五环旗
学习要点:
1.进一步熟悉GraphicsWindow对象的操作和属性。
2.进一步熟悉GraphicsWindow窗口的坐标系。
教学重难点:
教学重点是让学生进一步熟悉GraphicsWindow对象的操作和属性,掌握学习方法,难点是坐标的运算。www.21-cn-jy.com
一、画几何图形:
? ? ? 画奥运五环旗需要在不同的位置画不同颜色的圆,因此首先要掌握如何画彩色的圆,然后学习如何计算所画圆的位置。2·1·c·n·j·y
1.GraphicsWindow对象中画几何图形的各种操作:
例如:
GraphicsWindow.DrawEllipse(0,0,60,60) 画圆
GraphicsWindow.FillEllipse(0,0,60,60) 画实心圆
GraphicsWindow.DrawRectangle(0,0,60,60) 画正方形
GraphicsWindow.FillRectangle(0,0,60,60) 画实心正方形
GraphicsWindow.DrawRectangle(60,60,100,60) 画矩形框
GraphicsWindow.FillRectangle(160,120,100,60) 画实心矩形【来源:21·世纪·教育·网】
GraphicsWindow.DrawTriangle(0,0,60,20,30,80) 画三角形
GraphicsWindow.FillTriangle(0,0,60,20,30,80) 画实心三角形21·世纪*教育网
2、GraphicsWindow对象中,用改变图形的颜色或笔的颜色、粗细
backgroundcolor ? ? 背景颜色
brushcolor ? ? ? ? ? ? ? ?刷子的颜色
pencolor ? ? ? ? ? ? ? ? ? 画笔的颜色
penwidth ? ? ? ? ? ? ? ? ? 画笔的宽度
几何图形的边框颜色,用PenColor属性来设置,例如:GraphicsWindow.PenColor ="Red" 将画笔设置为红色www-2-1-cnjy-com
如果画实心几何图形,用BrushColor属性来设置颜色,例如:GraphicsWindow.BrushColor="Green" 将刷子设置为绿色2-1-c-n-j-y
二、画奥运五环旗
? ? ? ? 从下图可以看出,最左边的蓝色圆的坐标是(x,y),那么黑色圆的坐标是(x+d+g,y),那么黄色圆的坐标是(x+d/2+g/2,y+d/2),红色圆的坐标是(x+2d+2g,y),绿色圆的坐标是(x+1.5*d+1.5*g,y+d/2)21*cnjy*com
图8-1 奥运五环旗的尺寸关系图:
d=120
g=20
x=50
y=50
GraphicsWindow .PenWidth =12
GraphicsWindow .BackgroundColor ="white"
GraphicsWindow .PenColor ="blue"
GraphicsWindow .DrawEllipse (x,y ,d ,d )
GraphicsWindow .PenColor ="black"
GraphicsWindow .DrawEllipse (x+d+g,y,d,d)
GraphicsWindow .PenColor ="red"
GraphicsWindow .DrawEllipse (x+2*d+2*g,y,d,d)
GraphicsWindow .PenColor ="yellow"
GraphicsWindow .DrawEllipse (x+d/2+g/2,y+d/2,d,d)
GraphicsWindow .PenColor ="green"
GraphicsWindow .DrawEllipse (x+1.5*d+1.5*g,y+d/2,d,d)21世纪教育网版权所有
三、练习:
? ? ? ?编写程序,画带橙色旗杆的奥运五环旗
分析:为了让程序能画出不同大小的五环旗,程序中的圆的直径、圆之间的间隙、位置等应该用变量来表示。
程序如下:
d=60
g=10
x=160
y=50
GraphicsWindow.PenWidth =5
GraphicsWindow.BackgroundColor ="black"
GraphicsWindow.BrushColor="white"
GraphicsWindow.FillRectangle(x-g,y-2*g,3*d+4*g,4*g+d+d/2)21教育网
GraphicsWindow.BrushColor="orange"
GraphicsWindow.FillRectangle(x-g-g/2,y-2*g,g/2,(4*g+d+d/2)*2)21·cn·jy·com
GraphicsWindow.PenColor ="blue"
GraphicsWindow.DrawEllipse (x,y,d,d )
GraphicsWindow.PenColor ="black"
GraphicsWindow.DrawEllipse (x+d+g,y,d,d)
GraphicsWindow.PenColor ="red"
GraphicsWindow.DrawEllipse (x+2*d+2*g,y,d,d)
GraphicsWindow.PenColor ="yellow"
GraphicsWindow.DrawEllipse (x+d/2+g/2,y+d/2,d,d)
GraphicsWindow.PenColor ="green"
GraphicsWindow.DrawEllipse (x+1.5*d+1.5*g,y+d/2,d,d)21cnjy.com