C++ program to draw a convex polygon with programmable edges
kw.cpp
Output
kodingwindow@kw:~$ g++ kw.cpp -lgraph
kodingwindow@kw:~$ ./a.out Enter the number of sides of polygon 6 Enter the coordinate x0 100 Enter the coordinate y0 100 Enter the coordinate x1 150 Enter the coordinate y1 150 Enter the coordinate x2 150 Enter the coordinate y2 200 Enter the coordinate x3 100 Enter the coordinate y3 250 Enter the coordinate x4 50 Enter the coordinate y4 200 Enter the coordinate x5 50 Enter the coordinate y5 150
What Next?
C++ program to draw a concave polygon
C++ program to draw a sine wave
Computer Graphics Algorithms
Advertisement