在gc中 这样一段脚本 会出现如下图所示的一组点 我想问问在Grasshopper脚本中如何实现呢 请大家赐教呀 谢谢
Point [][] function (CoordinateSystem cs, int num, double h, int spNum)
{
Point pt01 = {};
for (int j = 0; j < spNum; ++j)
{
Point pt01[j] = {};
for (int i = 0; i < num; ++i)
{
double shift = 360/spNum*j;
double radius = Sin ( (100/num*i)+80 ) *5;
double xPos = Cos((360/num*i) + shift)*radius;
double yPos = Sin((360/num*i) + shift)*radius;
double zPos = h/num*i;
pt01[j] = new Point();
pt01[j].ByCartesianCoordinates(cs, xPos, yPos, zPos );
}
}
return pt01;
}
|