z軸の周りにポイントを配置したい。現在、次のコード スニペットを使用して xy 平面の周りにポイントを配置しています。
int points = 8;
double x = 5;
double y = 7;
double radius =100;
AbsolutePanel absolutePanel = new AbsolutePanel();
double slice = 2 * Math.PI / points;
for (int i = 0; i < points; i++)
{
double angle = slice * i;
int newX = (int)(x + radius * Math.cos(angle));
int newY = (int)(y + radius * Math.sin(angle));
Label label =new Label("test"+i);
absolutePanel.add(label,newX,newY);
System.out.println("newX="+newX + "newY="+newY);
}
しかし、これらの点が z 軸の周りに必要です。手伝って頂けますか?