SlideShare a Scribd company logo
Npm : 201243501150
Nama : Dita Erlita Sari
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 ) ;
}
}
Output:
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

What's hot

Learning Globally-Consistent Local Distance Functions for Shape ...
Learning Globally-Consistent Local Distance Functions for Shape ...Learning Globally-Consistent Local Distance Functions for Shape ...
Learning Globally-Consistent Local Distance Functions for Shape ...butest
 
Digital Image Processing (Lab 06)
Digital Image Processing (Lab 06)Digital Image Processing (Lab 06)
Digital Image Processing (Lab 06)
Moe Moe Myint
 
Java session14
Java session14Java session14
Java session14
Jigarthacker
 
Interaction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and PhysicsInteraction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and Physics
Ken Kuroki
 
Digital Image Processing (Lab 05)
Digital Image Processing (Lab 05)Digital Image Processing (Lab 05)
Digital Image Processing (Lab 05)
Moe Moe Myint
 
A0401
A0401A0401
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
ETS Asset Management Factory
 
Joint optimization framework for learning with noisy labels
Joint optimization framework for learning with noisy labelsJoint optimization framework for learning with noisy labels
Joint optimization framework for learning with noisy labels
Cheng-You Lu
 
Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)
Moe Moe Myint
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
JAINAM KAPADIYA
 
Iberspeech2012
Iberspeech2012Iberspeech2012
Iberspeech2012joseangl
 

What's hot (12)

Graphics file
Graphics fileGraphics file
Graphics file
 
Learning Globally-Consistent Local Distance Functions for Shape ...
Learning Globally-Consistent Local Distance Functions for Shape ...Learning Globally-Consistent Local Distance Functions for Shape ...
Learning Globally-Consistent Local Distance Functions for Shape ...
 
Digital Image Processing (Lab 06)
Digital Image Processing (Lab 06)Digital Image Processing (Lab 06)
Digital Image Processing (Lab 06)
 
Java session14
Java session14Java session14
Java session14
 
Interaction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and PhysicsInteraction Networks for Learning about Objects, Relations and Physics
Interaction Networks for Learning about Objects, Relations and Physics
 
Digital Image Processing (Lab 05)
Digital Image Processing (Lab 05)Digital Image Processing (Lab 05)
Digital Image Processing (Lab 05)
 
A0401
A0401A0401
A0401
 
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
Python + Tensorflow: how to earn money in the Stock Exchange with Deep Learni...
 
Joint optimization framework for learning with noisy labels
Joint optimization framework for learning with noisy labelsJoint optimization framework for learning with noisy labels
Joint optimization framework for learning with noisy labels
 
Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)Digital Image Processing (Lab 07)
Digital Image Processing (Lab 07)
 
Computer graphics practical(jainam)
Computer graphics practical(jainam)Computer graphics practical(jainam)
Computer graphics practical(jainam)
 
Iberspeech2012
Iberspeech2012Iberspeech2012
Iberspeech2012
 

Viewers also liked

Line
LineLine
My ovalsetengah
My ovalsetengahMy ovalsetengah
My ovalsetengah
ditaerlita
 
Grafik garis
Grafik garisGrafik garis
Grafik garis
ditaerlita
 
Kuis 1
Kuis 1Kuis 1
Kuis 1
HamimSuyuti
 
Rumah
RumahRumah
Komputer grafik 1
Komputer grafik 1Komputer grafik 1
Komputer grafik 1
Mr Nahot Frastian
 
Aplikasi program komputer grafik
Aplikasi program komputer grafikAplikasi program komputer grafik
Aplikasi program komputer grafik
fahlevizha
 
Warnargb
WarnargbWarnargb
Warnargb
fahlevizha
 
Uts
UtsUts

Viewers also liked (9)

Line
LineLine
Line
 
My ovalsetengah
My ovalsetengahMy ovalsetengah
My ovalsetengah
 
Grafik garis
Grafik garisGrafik garis
Grafik garis
 
Kuis 1
Kuis 1Kuis 1
Kuis 1
 
Rumah
RumahRumah
Rumah
 
Komputer grafik 1
Komputer grafik 1Komputer grafik 1
Komputer grafik 1
 
Aplikasi program komputer grafik
Aplikasi program komputer grafikAplikasi program komputer grafik
Aplikasi program komputer grafik
 
Warnargb
WarnargbWarnargb
Warnargb
 
Uts
UtsUts
Uts
 

More from ditaerlita

Tugas
TugasTugas
Tugas
ditaerlita
 
Tugas soal no1
Tugas soal no1Tugas soal no1
Tugas soal no1
ditaerlita
 
Tugas soal no1 b
Tugas soal no1 bTugas soal no1 b
Tugas soal no1 b
ditaerlita
 
Tugas soal no 2
Tugas soal no 2Tugas soal no 2
Tugas soal no 2
ditaerlita
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
ditaerlita
 
Segiempat
SegiempatSegiempat
Segiempat
ditaerlita
 
Rumah
RumahRumah
Rumah
ditaerlita
 
Rect
RectRect
Program uts
Program utsProgram uts
Program uts
ditaerlita
 
Myovalacak
MyovalacakMyovalacak
Myovalacak
ditaerlita
 
Myoval
MyovalMyoval
Myoval
ditaerlita
 
Myline
MylineMyline
Myline
ditaerlita
 
Line rect
Line rectLine rect
Line rect
ditaerlita
 
Lamp
LampLamp
Kotak3d
Kotak3dKotak3d
Kotak3d
ditaerlita
 
Kotak warna
Kotak warnaKotak warna
Kotak warna
ditaerlita
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
ditaerlita
 
Duatitik
DuatitikDuatitik
Duatitik
ditaerlita
 
Drawtext
DrawtextDrawtext
Drawtext
ditaerlita
 
Bintang miring
Bintang miringBintang miring
Bintang miring
ditaerlita
 

More from ditaerlita (20)

Tugas
TugasTugas
Tugas
 
Tugas soal no1
Tugas soal no1Tugas soal no1
Tugas soal no1
 
Tugas soal no1 b
Tugas soal no1 bTugas soal no1 b
Tugas soal no1 b
 
Tugas soal no 2
Tugas soal no 2Tugas soal no 2
Tugas soal no 2
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
 
Segiempat
SegiempatSegiempat
Segiempat
 
Rumah
RumahRumah
Rumah
 
Rect
RectRect
Rect
 
Program uts
Program utsProgram uts
Program uts
 
Myovalacak
MyovalacakMyovalacak
Myovalacak
 
Myoval
MyovalMyoval
Myoval
 
Myline
MylineMyline
Myline
 
Line rect
Line rectLine rect
Line rect
 
Lamp
LampLamp
Lamp
 
Kotak3d
Kotak3dKotak3d
Kotak3d
 
Kotak warna
Kotak warnaKotak warna
Kotak warna
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
 
Duatitik
DuatitikDuatitik
Duatitik
 
Drawtext
DrawtextDrawtext
Drawtext
 
Bintang miring
Bintang miringBintang miring
Bintang miring
 

Recently uploaded

Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
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
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 
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
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
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
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
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
 

Recently uploaded (20)

Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
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...
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 
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 ...
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
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
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
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
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .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
 

My poly

  • 1. Npm : 201243501150 Nama : Dita Erlita Sari 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 ) ; } }
  • 2. Output: 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};