这是程序段
//下面的循环根据公式进行三维坐标的二维化
for (i=1; i<=totalpoints; i++) {
u = (zorder-eyez)/(eval("z" add i)-eyez);//二维化公式
if (i<=9) {
set ("2Dx0" add i, u*eval("x" add i)+centerx);
set ("2Dy0" add i, u*eval("y" add i)+centery);
} else {
set ("2Dx" add i, u*eval("x" add i)+centerx);
set ("2Dy" add i, u*eval("y" add i)+centery);
}
}
//下面的循环根据公式进行三维坐标的二维化
for (i=1; i<=totalpoints; i++) {
u = (zorder-eyez)/(eval("z" add i)-eyez);//二维化公式
if (i<=9) {
set ("2Dx0" add i, u*eval("x" add i)+centerx);
set ("2Dy0" add i, u*eval("y" add i)+centery);
} else {
set ("2Dx" add i, u*eval("x" add i)+centerx);
set ("2Dy" add i, u*eval("y" add i)+centery);
}
}
现在市面上有一本O'Reilly的关于actionscript的书,很详细的