3d coordinates
nikaple吧
全部回复
仅看楼主
level 11
Nikaple 楼主
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;
}
2018年01月08日 02点01分 1
level 11
Nikaple 楼主
来源:layaair\.ldc\.layabox\.com/demo/?category=2d&group=PIXI&name=Example_05
2018年01月12日 04点01分 4
level 1
C#?JAVA?
2018年01月31日 00点01分 6
1