java - Place points around z axis -


i want place points around z axis. right placing points around xy plane using following code snippet:

int points = 8; double x = 5; double y = 7; double radius =100;  absolutepanel absolutepanel = new absolutepanel();  double slice = 2 * math.pi / points; (int = 0; < 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); } 

but want these points around z axis. can me?


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -