//move point c so that this is an isoceles triangle newcx = c.X; newcy = c.Y; while (Math.Abs (side1 - side2) > 1) { newcx = newcx + incr; //iterate a pixel at a time until close newcy = (int)(slope * newcx + intercept); dx2 = newcx - b.X; dy2 = newcy - b.Y; side2 = calcSide(dx2, dy2); } newc = new Point(newcx, newcy); }
private float calcSide(float a, float b) { return (float)Math.Sqrt (a*a + b*b); }