I tried to write a code to draw a triangle with its base facing downwards, using the following program:
#include<graphics.h>
#include<conio.h>
using namespace std;
int main()
{
initwindow(400,400,"Triangle");
line(100,100,200,300);
line(200,300,300,100);
line(100,100,300,100);
getch();
return 0;
}
But this gave the wrong output ^^
Whereas when I inverted the coordinates and created a mirror of them, then the triangle was drawn correctly
#include<graphics.h>
#include<conio.h>
using namespace std;
int main()
{
initwindow(400,400,"Triangle");
line(100,300,200,100);
line(200,100,300,300);
line(300,300,100,300);
getch();
return 0;
}