Advertisement
Zidinjo

3d

Dec 1st, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. float prozentualeAngabe = (float)this.nSegmentsHeight / (float)rings;
  2.  
  3. for(int i = 0;i <= rings;i++){
  4. beginShape(QUAD_STRIP);
  5. for(int k = 0;k <= this.nSegmente;k++){
  6. float x = this.radiusBot*cos(angleSize*k);
  7. float y = this.radiusBot*sin(angleSize*k);
  8. float x2 = this.radiusTop*cos(angleSize*k);
  9. float y2 = this.radiusTop*sin(angleSize*k);
  10.  
  11. vertex(x,0,y);
  12. vertex(x2,prozentualeAngabe*i,y2);
  13. }
  14. endShape();
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement