SlideShare a Scribd company logo
Npm : 201243501190
Nama : Reza Fahlevi
Kelas : R7H
Mata Kuliah : Komputer Grafik
Dosen : Nahot Frastian , M.Kom
Program Studi : Teknik Informatika
Universitas : Universitas Indraprasta Pgri
Program Komputer Grafik :
- MyPoly
Input :
import java.awt.Graphics ;
import java.awt.Color ;
public class MyPoly extends java.applet.Applet {
public void paint ( Graphics g ) {
int xpts [] = {39,94,97,142,53,58,26};
int ypts [] = {33,74,36,70,108,80,106};
int pts = xpts.length;
g.drawPolygon ( xpts , ypts , pts ) ;
// g.fillPolygon ( xpts , ypts , pts ) ;
//Polygon poly = new Polygon ( xpts , ypts , pts ) ;
}
}
Proses :
 drawPolygonnya menggunakan nilai = xpts , ypts , pts
 dengan nilai array pada xpts [] = {39,94,97,142,53,58,26} , ypts [] =
{33,74,36,70,108,80,106};
Output :

More Related Content

Viewers also liked

Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGradeHafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
Muhamad Hafitz Rizki
 
Tugas
TugasTugas
Tugas
ditaerlita
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
fahlevizha
 
Garis
GarisGaris
Garis
kiuntoro
 
Myline
MylineMyline
Myline
fahlevizha
 
Rect
RectRect
Oval
OvalOval
Oval
kiuntoro
 
Tugas no 1 b
Tugas no 1 bTugas no 1 b
Tugas no 1 b
fahlevizha
 
Bintang2
Bintang2Bintang2
Bintang2
kiuntoro
 
String dan rect
String dan rectString dan rect
String dan rect
fahlevizha
 
Line2
Line2Line2
Line2
kiuntoro
 
String rect warna
String rect warnaString rect warna
String rect warna
fahlevizha
 
My ovalsetengah
My ovalsetengahMy ovalsetengah
My ovalsetengah
fahlevizha
 
Myline3
Myline3Myline3
Myline3
kiuntoro
 
Warna rgb
Warna rgbWarna rgb
Warna rgb
kiuntoro
 
Bintang
BintangBintang
Bintang
kiuntoro
 
Grafikbatang
GrafikbatangGrafikbatang
Grafikbatang
kiuntoro
 
Soal1a
Soal1aSoal1a
Soal1a
kiuntoro
 
Soal1b
Soal1bSoal1b
Soal1b
kiuntoro
 
Segiempat
SegiempatSegiempat
Segiempat
kiuntoro
 

Viewers also liked (20)

Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGradeHafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
Hafitz_Rizki 201343500823 JMenuBar_JavaMsAccess_JavaGrade
 
Tugas
TugasTugas
Tugas
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
 
Garis
GarisGaris
Garis
 
Myline
MylineMyline
Myline
 
Rect
RectRect
Rect
 
Oval
OvalOval
Oval
 
Tugas no 1 b
Tugas no 1 bTugas no 1 b
Tugas no 1 b
 
Bintang2
Bintang2Bintang2
Bintang2
 
String dan rect
String dan rectString dan rect
String dan rect
 
Line2
Line2Line2
Line2
 
String rect warna
String rect warnaString rect warna
String rect warna
 
My ovalsetengah
My ovalsetengahMy ovalsetengah
My ovalsetengah
 
Myline3
Myline3Myline3
Myline3
 
Warna rgb
Warna rgbWarna rgb
Warna rgb
 
Bintang
BintangBintang
Bintang
 
Grafikbatang
GrafikbatangGrafikbatang
Grafikbatang
 
Soal1a
Soal1aSoal1a
Soal1a
 
Soal1b
Soal1bSoal1b
Soal1b
 
Segiempat
SegiempatSegiempat
Segiempat
 

More from fahlevizha

Makalah komgraf
Makalah komgrafMakalah komgraf
Makalah komgraf
fahlevizha
 
PPT Komgraf
PPT KomgrafPPT Komgraf
PPT Komgraf
fahlevizha
 
Aplikasi program komputer grafik
Aplikasi program komputer grafikAplikasi program komputer grafik
Aplikasi program komputer grafik
fahlevizha
 
Warnargb
WarnargbWarnargb
Warnargb
fahlevizha
 
Satutitikhilang
SatutitikhilangSatutitikhilang
Satutitikhilang
fahlevizha
 
My line2d
My line2dMy line2d
My line2d
fahlevizha
 
Font1
Font1Font1
Font1
fahlevizha
 
Font
FontFont
Uts
UtsUts
Tugas no 2
Tugas no 2Tugas no 2
Tugas no 2
fahlevizha
 
Tugas no 1 a
Tugas no 1 aTugas no 1 a
Tugas no 1 a
fahlevizha
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
fahlevizha
 
Segiempat
SegiempatSegiempat
Segiempat
fahlevizha
 
Rumah
RumahRumah
Rumah
fahlevizha
 
Oval , string , line
Oval , string , lineOval , string , line
Oval , string , line
fahlevizha
 
My ovalacak
My ovalacakMy ovalacak
My ovalacak
fahlevizha
 
Myoval
MyovalMyoval
Myoval
fahlevizha
 
Line
LineLine
Lamp
LampLamp
Kotak3d
Kotak3dKotak3d
Kotak3d
fahlevizha
 

More from fahlevizha (20)

Makalah komgraf
Makalah komgrafMakalah komgraf
Makalah komgraf
 
PPT Komgraf
PPT KomgrafPPT Komgraf
PPT Komgraf
 
Aplikasi program komputer grafik
Aplikasi program komputer grafikAplikasi program komputer grafik
Aplikasi program komputer grafik
 
Warnargb
WarnargbWarnargb
Warnargb
 
Satutitikhilang
SatutitikhilangSatutitikhilang
Satutitikhilang
 
My line2d
My line2dMy line2d
My line2d
 
Font1
Font1Font1
Font1
 
Font
FontFont
Font
 
Uts
UtsUts
Uts
 
Tugas no 2
Tugas no 2Tugas no 2
Tugas no 2
 
Tugas no 1 a
Tugas no 1 aTugas no 1 a
Tugas no 1 a
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
 
Segiempat
SegiempatSegiempat
Segiempat
 
Rumah
RumahRumah
Rumah
 
Oval , string , line
Oval , string , lineOval , string , line
Oval , string , line
 
My ovalacak
My ovalacakMy ovalacak
My ovalacak
 
Myoval
MyovalMyoval
Myoval
 
Line
LineLine
Line
 
Lamp
LampLamp
Lamp
 
Kotak3d
Kotak3dKotak3d
Kotak3d
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
Steve Thomason
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
PedroFerreira53928
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Basic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumersBasic phrases for greeting and assisting costumers
Basic phrases for greeting and assisting costumers
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 

Mypoly

  • 1. Npm : 201243501190 Nama : Reza Fahlevi Kelas : R7H Mata Kuliah : Komputer Grafik Dosen : Nahot Frastian , M.Kom Program Studi : Teknik Informatika Universitas : Universitas Indraprasta Pgri
  • 2. Program Komputer Grafik : - MyPoly Input : import java.awt.Graphics ; import java.awt.Color ; public class MyPoly extends java.applet.Applet { public void paint ( Graphics g ) { int xpts [] = {39,94,97,142,53,58,26}; int ypts [] = {33,74,36,70,108,80,106}; int pts = xpts.length; g.drawPolygon ( xpts , ypts , pts ) ; // g.fillPolygon ( xpts , ypts , pts ) ; //Polygon poly = new Polygon ( xpts , ypts , pts ) ; } }
  • 3. Proses :  drawPolygonnya menggunakan nilai = xpts , ypts , pts  dengan nilai array pada xpts [] = {39,94,97,142,53,58,26} , ypts [] = {33,74,36,70,108,80,106}; Output :