}
else if (i == 0)
g.DrawLine(Pens.White, 250, 430, 250, 20);
else
{
k = (-1 / Math.Tan(i * Math.PI / 180));
b = ((j - 90) * 8 / Math.Sin(i * Math.PI / 180)) *180 / 512;
if (b >= 0 && b <= 180)
{
x1 = 0;
y1 = Convert.ToInt16(b);
double temp = -b / k;
if (temp <= 180 && temp >= 0)
{
x2 = Convert.ToInt16(temp);
y2 = 0;
}
else if (temp >= -180 && temp < 0)
{
x2 = Convert.ToInt16((180 - b) / k); 彩色图像的分割处理程序设计+Hough算法(19):http://www.youerw.com/jisuanji/lunwen_1067.html