-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