nikaple吧 关注:164贴子:2,322
  • 2回复贴,共1

3d coordinates

只看楼主收藏回复

switch (t)
{
case 0:
for (i = 0; i < this.n; i++)
{
this.points1[i] = -50 + Math.round(Math.random() * 100);
this.points2[i] = 0;
this.points3[i] = 0;
}
break;
case 1:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(t * 360 / this.n) * 10);
this.points2[i] = (Math.cos(xd) * 10) * (Math.sin(t * 360 / this.n) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 2:
for (i = 0; i < this.n; i++)
{
xd = -90 + (Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(t * 360 / this.n) * 10);
this.points2[i] = (Math.cos(xd) * 10) * (Math.sin(t * 360 / this.n) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 3:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 4:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 5:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 6:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 7:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(i * 360 / this.n) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 8:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(i * 360 / this.n) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 9:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 10:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.cos(xd) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 11:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.sin(xd) * 10) * (Math.sin(i * 360 / this.n) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 12:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.sin(xd) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 13:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.sin(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 14:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.sin(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.sin(xd) * 10) * (Math.sin(i * 360 / this.n) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 15:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.sin(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
case 16:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(i * 360 / this.n) * 10);
this.points2[i] = (Math.sin(i * 360 / this.n) * 10) * (Math.sin(xd) * 10);
this.points3[i] = Math.sin(xd) * 100;
}
break;
case 17:
for (i = 0; i < this.n; i++)
{
xd = -90 + Math.round(Math.random() * 180);
this.points1[i] = (Math.cos(xd) * 10) * (Math.cos(xd) * 10);
this.points2[i] = (Math.cos(i * 360 / this.n) * 10) * (Math.sin(i * 360 / this.n) * 10);
this.points3[i] = Math.sin(i * 360 / this.n) * 100;
}
break;
}


IP属地:广东1楼2018-01-08 10:46回复
    来源:layaair\.ldc\.layabox\.com/demo/?category=2d&group=PIXI&name=Example_05


    IP属地:广东4楼2018-01-12 12:36
    回复
      C#?JAVA?


      IP属地:广东来自Android客户端6楼2018-01-31 08:35
      回复