注意:此页面搜索的是所有试题
题目内容
(人工智能)
补齐下述Bresenham算法。
if(delatRow < 0) stepRow = -1;else stepRow = 1;
if(delatCol < 0) stepCol = -1;else stepCol = 1;
delatRow = abs(delatRow *2);
delatCol = abs(delatCol *2);
currentStep = 0;
pathRow [currentStep] = nextRow;
pathCol [currentStep] = nextCol;
currentStep ++ ;
。。。
if(delatRow < 0) stepRow = -1;else stepRow = 1;
if(delatCol < 0) stepCol = -1;else stepCol = 1;
delatRow = abs(delatRow *2);
delatCol = abs(delatCol *2);
currentStep = 0;
pathRow [currentStep] = nextRow;
pathCol [currentStep] = nextCol;
currentStep ++ ;
。。。
参考答案