-1
嗨,我只是寫在C#函數生成座標的立方體,但我想只是生成座標立方體
產生立方體雙方不是在深度座標的問題!
static class Util
{
public static List<string> GenerateCubeCoord(double bc,int nt,double stp)
{
List<string> list = new List<string>();
double CoorBase = bc;
int n = nt;
double step = stp;
int id = 1;
for (int x = 0; x < n; x++)
{
for (int y = 0; y < n; y++)
{
for (int z = 0; z < n; z++)
{
list.Add(string.Format("GRID {0} {1}.0 {2}.0 {3}.0 \n",
id, step * x + CoorBase, step * y + CoorBase, step * z + CoorBase));
id++;
}
}
}
return list;
}
}
我笏生成該所有的座標不是立方體的頂點座標,圖像中的一個
側可立方體
你是什麼意思「我想只生成立方體邊的座標不深入」。 U代表3x3x3立方體的程序應該只打印8個角點的座標? – BiGYaN 2011-04-09 19:13:43
恩,需要更多信息。 – Carra 2011-04-09 19:15:13