I want to find vertices (has integer coordinates) of the triangle $ABC$ with the centorid is $G(1,1)$ and orthocenter is $H(3,3)$. I tried

a = {x1, y1};
g = {1, 1};
h = {3, 3};
b = {x2, y2};
c = {x3, y3};
Solve[{x1 + x2 + x3 == 3 g[[1]], 
  y1 + y2 + y3 == 3 g[[2]], (h - a).(c - b) == 0, (h - b).(c - a) == 
   0, -20 &lt; x1 &lt; 20, -20 &lt; y1 &lt; 20, -20 &lt; x2 &lt; 20, -20 &lt; y2 &lt; 20, 
  x2*y3 - x1*y3 + x1*y2 - y2*x3 + y1*x3 - y1*x2 != 0}, {x1, y1, x2, 
  y2, x3, y3}, Integers]




There are some duplicate triangles. How to delete this duplicate triangles?


Question: Will this work? hex edited a file and changed inet_aton to inet_pton
Answer: No; inet_aton and inet_pton are not compatible. Just look at the prototypes:

int inet_aton(const char *, struct in_addr *);
int inet_pton(int, const char *, void *);


Totally different. Trying to swap one for the other will only result in pain and suffering (and a crash, most likely). If you've done this and it seems to be working, it's probably because the code which uses inet_aton isn't being called.