SlideShare a Scribd company logo
1 of 3
Npm : 201243501163
Nama : Hamim Suyuti
Kelas : R7H
Mata Kuliah : Komputer Grafik
Dosen : Nahot Frastian , M.Kom
Program Studi : Teknik Informatika
Universitas : Universitas Indraprasta Pgri
Program Komputer Grafik :
- BasisGraphics
Input :
import java.awt.Graphics ;
import java.awt.Color ;
public class basisgrapik extends java.applet.Applet {
public void paint ( Graphics g ) {
int xpts [] = {5,25,50,30,15,5};
int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ;
g.drawString ( " Java Graphics Basic ",0 , 50 ) ;
g.drawLine (5,100,150,250) ;
g.setColor ( Color.red ) ;
g.drawRect ( 50,100,150,250) ;
g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ;
g.drawPolygon ( xpts , ypts , xpts.length ) ;
// Cara Lain Buat Polygon
//Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ;
// g.fillPolygon ( poly);
g.drawOval (150,100,250,55 ) ;
g.drawArc ( 50,100,150,275,95,115);
}
}
Proses :
 drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String
nya : Java Graphics Basic
 drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250
 Lalu warna yang di gunakan adalah warna merah ( setColor )
 drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250
 drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int
xdiam=6 , int ydiam = 12
 drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55
 drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int
statangle=95 , int arcangle = 15
Output :

More Related Content

What's hot

Linear programming assignment help
Linear programming assignment helpLinear programming assignment help
Linear programming assignment help
Statistics Help Desk
 
Persamaan kuadrat
Persamaan kuadratPersamaan kuadrat
Persamaan kuadrat
desinanik
 

What's hot (16)

My poly
My polyMy poly
My poly
 
Uts
UtsUts
Uts
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
 
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D ArraySPL 10.1 | Manual Tracing on Basic Loop & 1D Array
SPL 10.1 | Manual Tracing on Basic Loop & 1D Array
 
Lec23-CS110 Computational Engineering
Lec23-CS110 Computational EngineeringLec23-CS110 Computational Engineering
Lec23-CS110 Computational Engineering
 
Linear programming assignment help
Linear programming assignment helpLinear programming assignment help
Linear programming assignment help
 
Function Families
Function FamiliesFunction Families
Function Families
 
Programa expresiones regulares
Programa expresiones regularesPrograma expresiones regulares
Programa expresiones regulares
 
Linear regression
Linear regression Linear regression
Linear regression
 
Snowboards r us
Snowboards r usSnowboards r us
Snowboards r us
 
Persamaan kuadrat
Persamaan kuadratPersamaan kuadrat
Persamaan kuadrat
 
Progre ppt
Progre  pptProgre  ppt
Progre ppt
 
Project 3 - Intro to Programming Logic
Project 3 - Intro to Programming LogicProject 3 - Intro to Programming Logic
Project 3 - Intro to Programming Logic
 
สูตร
สูตรสูตร
สูตร
 
C programming codes for the class assignment
C programming codes for the class assignmentC programming codes for the class assignment
C programming codes for the class assignment
 
Graph of a linear function
Graph of a linear functionGraph of a linear function
Graph of a linear function
 

Viewers also liked

La Gestión de Imagen como factor clave de posicionamiento
La Gestión de Imagen como factor clave de posicionamientoLa Gestión de Imagen como factor clave de posicionamiento
La Gestión de Imagen como factor clave de posicionamiento
artblau
 
As research and planning presentation
As research and planning presentationAs research and planning presentation
As research and planning presentation
EmmaWheele98
 

Viewers also liked (20)

Drawtext
DrawtextDrawtext
Drawtext
 
Visitas tecnológicas
Visitas tecnológicasVisitas tecnológicas
Visitas tecnológicas
 
聯合報新媒體徵「工程師」
聯合報新媒體徵「工程師」聯合報新媒體徵「工程師」
聯合報新媒體徵「工程師」
 
DISC-Christl_Snyman
DISC-Christl_SnymanDISC-Christl_Snyman
DISC-Christl_Snyman
 
La Gestión de Imagen como factor clave de posicionamiento
La Gestión de Imagen como factor clave de posicionamientoLa Gestión de Imagen como factor clave de posicionamiento
La Gestión de Imagen como factor clave de posicionamiento
 
Consequences of the globalisation in méxico
Consequences of the globalisation in méxicoConsequences of the globalisation in méxico
Consequences of the globalisation in méxico
 
GARAGE BOOK 02 - ANTS SHOWCASE (small size)
GARAGE BOOK 02 - ANTS SHOWCASE (small size)GARAGE BOOK 02 - ANTS SHOWCASE (small size)
GARAGE BOOK 02 - ANTS SHOWCASE (small size)
 
As research and planning presentation
As research and planning presentationAs research and planning presentation
As research and planning presentation
 
Co to jest UX?
Co to jest UX?Co to jest UX?
Co to jest UX?
 
Τι έτρωγαν οι αρχαίοι 'Ελληνες.
Τι έτρωγαν οι αρχαίοι 'Ελληνες.Τι έτρωγαν οι αρχαίοι 'Ελληνες.
Τι έτρωγαν οι αρχαίοι 'Ελληνες.
 
missing links
missing linksmissing links
missing links
 
Large variance and fat tail of damage by natural disaster
Large variance and fat tail of damage by natural disasterLarge variance and fat tail of damage by natural disaster
Large variance and fat tail of damage by natural disaster
 
Get ICE
Get ICEGet ICE
Get ICE
 
Arreola
ArreolaArreola
Arreola
 
Cruise Ships vs. Hotel Conferences
Cruise Ships vs. Hotel ConferencesCruise Ships vs. Hotel Conferences
Cruise Ships vs. Hotel Conferences
 
M Eng (2)
M Eng (2)M Eng (2)
M Eng (2)
 
Práctica 1
Práctica 1Práctica 1
Práctica 1
 
Gebeurtenis
GebeurtenisGebeurtenis
Gebeurtenis
 
Trabajo de vacaciones
Trabajo de vacacionesTrabajo de vacaciones
Trabajo de vacaciones
 
Il diritto penale europeo, questo sconosciuto e l’avvocato penalista europeo
Il diritto penale europeo, questo sconosciuto e l’avvocato penalista europeoIl diritto penale europeo, questo sconosciuto e l’avvocato penalista europeo
Il diritto penale europeo, questo sconosciuto e l’avvocato penalista europeo
 

Similar to Basis graphics

C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)
dezyneecole
 

Similar to Basis graphics (20)

Program uts
Program utsProgram uts
Program uts
 
Uts
UtsUts
Uts
 
java graphics
java graphicsjava graphics
java graphics
 
Warna rgb
Warna rgbWarna rgb
Warna rgb
 
Introduction to Generative Art with Processing
Introduction to Generative Art with ProcessingIntroduction to Generative Art with Processing
Introduction to Generative Art with Processing
 
COMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUALCOMPUTER GRAPHICS LAB MANUAL
COMPUTER GRAPHICS LAB MANUAL
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
Processing and Processing.js
Processing and Processing.jsProcessing and Processing.js
Processing and Processing.js
 
Python 1 liners
Python 1 linersPython 1 liners
Python 1 liners
 
Computer graphics lab manual
Computer graphics lab manualComputer graphics lab manual
Computer graphics lab manual
 
Csci101 lect08a matlab_programs
Csci101 lect08a matlab_programsCsci101 lect08a matlab_programs
Csci101 lect08a matlab_programs
 
Python 03-parameters-graphics.pptx
Python 03-parameters-graphics.pptxPython 03-parameters-graphics.pptx
Python 03-parameters-graphics.pptx
 
Java Fx Overview Tech Tour
Java Fx Overview Tech TourJava Fx Overview Tech Tour
Java Fx Overview Tech Tour
 
Kuis 1 b
Kuis 1 bKuis 1 b
Kuis 1 b
 
C programming
C programmingC programming
C programming
 
C programming (Part 1)
C programming (Part 1)C programming (Part 1)
C programming (Part 1)
 
Computer science project work on C++
Computer science project work on C++Computer science project work on C++
Computer science project work on C++
 
2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph2Bytesprog2 course_2014_c9_graph
2Bytesprog2 course_2014_c9_graph
 
Ansi c
Ansi cAnsi c
Ansi c
 
Interactive Mouse (Report On Processing)
Interactive Mouse (Report On Processing)Interactive Mouse (Report On Processing)
Interactive Mouse (Report On Processing)
 

More from HamimSuyuti

More from HamimSuyuti (17)

Rumah
RumahRumah
Rumah
 
Kuis 2
Kuis 2Kuis 2
Kuis 2
 
Makalah Kelompok
Makalah KelompokMakalah Kelompok
Makalah Kelompok
 
Segiempat1
Segiempat1Segiempat1
Segiempat1
 
Segi empat
Segi empatSegi empat
Segi empat
 
Polygonbiasa
PolygonbiasaPolygonbiasa
Polygonbiasa
 
Polygon
PolygonPolygon
Polygon
 
Oval
OvalOval
Oval
 
Myline
MylineMyline
Myline
 
Lamp
LampLamp
Lamp
 
Kotak3 d
Kotak3 dKotak3 d
Kotak3 d
 
Grafik garis
Grafik garisGrafik garis
Grafik garis
 
Grafik batang
Grafik batangGrafik batang
Grafik batang
 
Eliptikal
EliptikalEliptikal
Eliptikal
 
Bintangwarna
BintangwarnaBintangwarna
Bintangwarna
 
Arc
ArcArc
Arc
 
Project Komputer Grafik
Project Komputer GrafikProject Komputer Grafik
Project Komputer Grafik
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 

Recently uploaded (20)

Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 

Basis graphics

  • 1. Npm : 201243501163 Nama : Hamim Suyuti Kelas : R7H Mata Kuliah : Komputer Grafik Dosen : Nahot Frastian , M.Kom Program Studi : Teknik Informatika Universitas : Universitas Indraprasta Pgri Program Komputer Grafik : - BasisGraphics Input : import java.awt.Graphics ; import java.awt.Color ; public class basisgrapik extends java.applet.Applet { public void paint ( Graphics g ) { int xpts [] = {5,25,50,30,15,5}; int ypts [] = { 10, 35 ,20 ,65, 40, 10 } ; g.drawString ( " Java Graphics Basic ",0 , 50 ) ; g.drawLine (5,100,150,250) ; g.setColor ( Color.red ) ; g.drawRect ( 50,100,150,250) ; g.drawRoundRect ( 50 , 150 , 150,250 , 6 , 12 ) ;
  • 2. g.drawPolygon ( xpts , ypts , xpts.length ) ; // Cara Lain Buat Polygon //Polygon poly = new Polygon (xpts + 100 , ypts+100 , xpts.length ) ; // g.fillPolygon ( poly); g.drawOval (150,100,250,55 ) ; g.drawArc ( 50,100,150,275,95,115); } } Proses :  drawString : kordinat x nya : 0 dan kordinat Y nya :50 , sedangkan kata String nya : Java Graphics Basic  drawLine nya : kordinat x1 nya 5 , x2 nya = 150 , y1 = 100 , y2 = 250  Lalu warna yang di gunakan adalah warna merah ( setColor )  drawRect : kordinat x1 nya 50 , x2 nya = 150 , y1 = 100 , y2 = 250  drawRoundRect x1 = 50 ,int y = 150 , int width = 150 , int height = 250 , int xdiam=6 , int ydiam = 12
  • 3.  drawOval : kordinat x1 nya 150 , x2 nya = 250 , y1 = 100 , y2 = 55  drawArc x1 = 50 ,int y = 100 , int width = 150 , int height = 275 , int statangle=95 , int arcangle = 15 Output :