Sunteți pe pagina 1din 4

Universitatea Tehnic a Moldovei

CATEDRA "AUTOMATICA I TEHNOLOGII INFORMAIONALE"

RAPORT
Lucrare de laborator Nr.1
la Grafica pe Calculator

A efectuat:

st. gr. TI-133


Dionis Bolun

A verificat:

L.Rotaru

Chiinu 2015

Scopul lucrrii: Obinerea cunotinelor practice n sinteza figurilor i suprafetelor


n baza bibliotecii grafice a oricrui limbaj de programare
(Pascal, C++, ori Java)
Sarcina lucrrii:
1. De a sinteza figuri grafice - linii; poligoane; curbe; suprafee: poligonale,
circulare, eleptice, sectoare de cerc i de elipse, mrginite de contur. Figurile
sintezate s fie descrise
2. De a salva i restaura imagini n/din fisiere
3. De a prezenta imagini n diferite pori de vizualizare
Listingul Programului :
//--------------------------------------------------------------------------#include <vcl.h>
#pragma hdrstop
#include "GC1.h"
//--------------------------------------------------------------------------#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//--------------------------------------------------------------------------__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------void __fastcall TForm1::Button1Click(TObject *Sender)
{
///background
Canvas->Brush->Color=(TColor)RGB(0,0,0);
Canvas->Rectangle(0,0,1000,1000);
Canvas->Pen->Color=(TColor)RGB(255,255,255);
Canvas->Arc(-240,70,720,415,0,0,0,0); //pluto axix
Canvas->Brush->Color=(TColor)RGB(139,119,101);
Canvas->Ellipse(705,240,730,255); //pluto
Canvas->Arc(-230,90,610,395,0,0,0,0); //neptun axix
Canvas->Brush->Color=(TColor)RGB(205,192,176);

Canvas->Ellipse(580,225,630,265); //neptun
Canvas->Arc(-220,105,510,385,0,0,0,0); //uranus axix
Canvas->Brush->Color=(TColor)RGB(51,51,255);
Canvas->Ellipse(475,225,530,265); //uranus
Canvas->Arc(-220,115,420,375,0,0,0,0); //saturn axix
Canvas->Brush->Color=(TColor)RGB(205,133,63);
Canvas->Ellipse(385,220,440,270); //saturn
Canvas->Brush->Color=(TColor)RGB( 245,222,179);
Canvas->Ellipse(370,235,455,260); //saturn rings
Canvas->Arc(-200,125,340,365,0,0,0,0); //jupiter axix
Canvas->Brush->Color=(TColor)RGB(139,69,19);
Canvas->Ellipse(290,210,365,280); //jupiter
Canvas->Arc(-150,145,260,345,0,0,0,0); //mars axix
Canvas->Brush->Color=(TColor)RGB(181,35,43);
Canvas->Ellipse(240,225,275,255); //mars
Canvas->Arc(-150,155,210,335,0,0,0,0); //earth axix
Canvas->Brush->Color=(TColor)RGB(51,153,255);
Canvas->Ellipse(185,220,225,265); //earth
Canvas->Arc(-150,165,160,325,0,0,0,0); //venus axix
Canvas->Brush->Color=(TColor)RGB(102,51,0);
Canvas->Ellipse(145,225,175,260); //venus
Canvas->Arc(-150,170,130,320,0,50,0,200); //mercury axis
Canvas->Brush->Color=(TColor)RGB(125,135,165);
Canvas->Ellipse(120,235,135,250); //mercury
Canvas->Brush->Color=(TColor)RGB(255,240,30);
Canvas->Ellipse(-100,150,100,350); //sun
}
//---------------------------------------------------------------------------

Screenshot :