Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. float[] x = new float[5];
  2. float anchor = 250;
  3. float[] y = new float[5];
  4. float[] angle = new float[5];
  5. float[] freq = new float[5];
  6.  
  7. color penisColor = color(234, 196, 144);
  8.  
  9. ArrayList<Semen>a semenList;
  10.  
  11. void setup() {
  12. size(400, 400);
  13.  
  14. x[0] = width/2 - 30;
  15. x[1] = width/2 - 33;
  16. x[2] = width/2;
  17. x[3] = width/2 + 33;
  18. x[4] = width/2 + 30;
  19.  
  20. for (int i = 0; i < freq.length; i++) {
  21. freq[i] = random(PI/2.4, 3.4*PI/2);
  22. }
  23.  
  24. semenList = new ArrayList<Semen>();
  25. }
  26.  
  27. void draw() {
  28. background(0);
  29.  
  30. setPoints();
  31.  
  32. fill(penisColor);
  33. ellipse(width/2 - 50, height, 80, 40);
  34. ellipse(width/2 + 50, height, 80, 40);
  35. curveTightness(map(anchor, 250, 100, 0, 0.5));
  36. beginShape();
  37. for (int i = 0; i < 2; i++) {
  38. curveVertex(width/2 - 30, height);
  39. for (int j = 0; j < x.length; j++) {
  40. curveVertex(x[j], y[j]);
  41. }
  42. curveVertex(width/2 + 30, height);
  43. }
  44. endShape();
  45. stroke(0, 100);
  46. line(x[2], anchor, x[2], anchor + 10);
  47. noStroke();
  48.  
  49. for (int i = 0; i < 5; i++) {
  50. x[i] = x[i] + sin(angle[i]);
  51. y[i] = y[i] + sin(angle[i]);
  52. angle[i] += freq[i];
  53. }
  54.  
  55. changeErectness();
  56.  
  57. for (int i = 0; i < semenList.size(); i++) {
  58. Semen sem = semenList.get(i);
  59. sem.display();
  60. if (sem.life <= 0) {
  61. semenList.remove(i);
  62. }
  63. }
  64. }
  65.  
  66. void setPoints() {
  67. if (anchor < 250) {
  68. anchor += 0.5;
  69. }
  70. y[0] = anchor + 50;
  71. y[1] = anchor + 30;
  72. y[2] = anchor;
  73. y[3] = anchor + 30;
  74. y[4] = anchor + 50;
  75. }
  76.  
  77. boolean isOnPenis() {
  78. if (get(mouseX, mouseY) == penisColor) {
  79. return true;
  80. }
  81. else {
  82. return false;
  83. }
  84. }
  85.  
  86. void changeErectness() {
  87. if (isOnPenis() && abs(mouseY - pmouseY) > 20 && anchor > 100) {
  88. anchor -= 3;
  89. }
  90. if (anchor < 101) {
  91. ejaculate();
  92. }
  93. }
  94.  
  95. void ejaculate() {
  96. for (int i = 0; i < 3; i++) {
  97. semenList.add(new Semen(width/2, anchor));
  98. }
  99. }
  100.  
  101.  
  102. class Semen {
  103.  
  104. PVector pos;
  105. PVector vel;
  106. PVector accel;
  107. int life;
  108. color c;
  109.  
  110. Semen(float x, float y) {
  111. pos = new PVector(x, y);
  112. vel = new PVector(random(-10, 10), random(-20, -1));
  113. accel = new PVector(0, 0.1);
  114. life = 100;
  115. }
  116.  
  117. void display() {
  118. pos.add(vel);
  119. vel.add(accel);
  120. life--;
  121. c = color(255, map(life, 100, 0, 255, 0));
  122. fill(c);
  123. ellipse(pos.x, pos.y, 2, 2);
  124. }
  125.  
  126. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement