Задача 0120

Побудувати:

а) трикутник з вершинами (100, 100), (150, 100), (80, 170);

GraphicsWindow.DrawTriangle(100,100,150,100,80,170)

б) прямокутник з вершинами (80, 80), (170, 80), (170, 150), (80, 150);

GraphicsWindow.DrawRectangle (80,80,90,70)

в) п’ятикутник з вершинами (100, 100), (150, 100), (170, 120), (150, 140), (100, 140);

GraphicsWindow.DrawLine(100,100,150,100)
GraphicsWindow.DrawLine(150,100,170,120)
GraphicsWindow.DrawLine(170,120,150,140)
GraphicsWindow.DrawLine(150,140,100,140)
GraphicsWindow.DrawLine(100,140,100,100)

г) шестикутник з вершинами (120, 100), (140, 120), (140, 140), (120, 160), (100, 140), (100, 120);

GraphicsWindow.DrawLine(120,100,140,120)
GraphicsWindow.DrawLine(140,120,140,140)
GraphicsWindow.DrawLine(140,140,120,160)
GraphicsWindow.DrawLine(120,160,100,140)
GraphicsWindow.DrawLine(100,140,100,120)
GraphicsWindow.DrawLine(100,120,120,100)

д) виконати завдання а) – г), доповнивши кожне із них вимогами замальовування побудованих плоских фігур.

a)

 GraphicsWindow.FillTriangle(100,100,150,100,80,170)

б)

GraphicsWindow.FillTriangle(100,100,150,100,80,170)

в)

GraphicsWindow.PenWidth = 1
GraphicsWindow.PenColor="Green"
GraphicsWindow.BrushColor="Green"
Shapes.AddTriangle (100,100,150,100,170,120)
Shapes.AddTriangle (100,100,170,120,150,140)
Shapes.AddTriangle (100,100,100,140,150,140)

г)

GraphicsWindow.PenWidth = 1
GraphicsWindow.PenColor="Green"
GraphicsWindow.BrushColor="Green"
Shapes.AddTriangle (120,100,140,120,140,140)
Shapes.AddTriangle (120,100,140,140,120,160)
Shapes.AddTriangle (120,100,100,120,100,140)
Shapes.AddTriangle (120,100,100,140,120,160)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s