Guest User

Untitled

a guest
Mar 13th, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. function setup() {
  2. createCanvas(800, 700);
  3. ellipseMode(CENTER);
  4. background(50, 55, 100);
  5. for(var numberofstars = 0;numberofstars <= 100; numberofstars++){
  6. stroke(500);
  7. fill(255, 204, 0)
  8. ellipse(random(length, width), random(length, width), 5, 5)
  9. }
  10. }
  11. // x15, y+100, scale 0.5
  12. function draw() {
  13. scale(0.50)
  14. Lyra(570,790);
  15. UrsaMinor(1155,745);
  16. Bootes(285, 250);
  17. Gemini(420, 130);
  18. push();
  19. scale(2)
  20. Moon(550, 150)
  21. pop();
  22. }
  23.  
  24.  
  25. //240,116
  26. function Lyra(x,y) {
  27. fill(255, 204, 0);
  28. stroke(300);
  29. line(x-40, y-16, x-40, y+28);
  30. ellipse(x-40, y-16, 10, 10);
  31. line(x-40, y-16, x, y);
  32. push();
  33. fill('magenta')
  34. ellipse(x, y, 15, 15);
  35. pop();
  36. line(x, y, x-40, y+28);
  37. ellipse(x-40, y+28, 8, 8);
  38. line(x-40, y+28, x-80, y+34);
  39. ellipse(x-80, y+34, 8, 8);
  40. line(x-80, y+34, x-110, y+119);
  41. ellipse(x-110, y+119, 8, 8);
  42. line(x-110, y+119, x-70, y+114);
  43. ellipse(x-70, y+114, 8, 8);
  44. line(x-70, y+114, x-40, y+28);
  45. }
  46.  
  47. //350, 100
  48. function UrsaMinor(u,m) {
  49. fill(255, 204, 0);
  50. stroke(300);
  51. push();
  52. fill('magenta');
  53. ellipse(u, m, 15, 15);
  54. pop();
  55. line(u, m, u-30, m+40);
  56. ellipse(u-30, m+40, 8, 8);
  57. line(u-30, m+40, u-40, m+80);
  58. ellipse(u-40, m+80, 8, 8);
  59. line(u-40, m+80, u-30, m+120);
  60. ellipse(u-30, m+120, 8, 8);
  61. line(u-30, m+120, u+10, m+140);
  62. ellipse(u+10, m+140, 8, 8);
  63. line(u+10, m+140, u-5, m+170);
  64. ellipse(u-5, m+170, 8,8);
  65. line(u-5, m+170, u-50, m+150);
  66. ellipse(u-50, m+150, 8, 8);
  67. line(u-50, m+150, u-30, m+120);
  68. }
  69.  
  70. //540,215
  71. function Bootes(a,b) {
  72. fill(255, 204, 0);
  73. stroke(300);
  74. ellipse(a-90, b-115, 8, 8);
  75. line(a-90, b-115, a-110, b-65);
  76. ellipse(a-110, b-65, 8, 8);
  77. line(a-35, b-105, a-90, b-115);
  78. ellipse(a-35, b-105, 8, 8);
  79. line(a-50, b-30, a-110, b-65);
  80. ellipse(a-50, b-30, 8, 8);
  81. line(a-35, b-105, a-30, b-60);
  82. ellipse(a-30, b-60, 8, 8);
  83. line(a-30, b-60, a, b);
  84. push();
  85. fill('magenta')
  86. ellipse(a, b, 15, 15);
  87. pop();
  88. line(a-50, b-30, a, b);
  89. ellipse(a-20, b+35, 5, 5);
  90. line(a, b, a-20, b+35);
  91. ellipse(a+40, b-10, 8, 8);
  92. line(a+40, b-10, a, b);
  93. ellipse(a+55, b+5, 5, 5);
  94. line(a+55, b+5, a+40, b-10);
  95. }
  96.  
  97. //630,100
  98. function Gemini(c,p) {
  99. push();
  100. fill('magenta');
  101. ellipse(c, p, 15, 15);
  102. pop();
  103. line(c, p, c+20, p+20);
  104. ellipse(c+20, p+20, 5, 5);
  105. line(c+20, p+20, c, p+45);
  106. ellipse(c, p+45, 5, 5);
  107. line(c+20, p+20, c+50, p+70);
  108. ellipse(c+50, p+70, 5, 5);
  109. line(c+50, p+70, c+60, p+115);
  110. ellipse(c+60, p+115, 5, 5);
  111. line(c+60, p+115, c+140, p+140);
  112. ellipse(c+85, p+80, 5, 5);
  113. line(c+85, p+80, c+140, p+105);
  114. ellipse(c+140, p+105, 5, 5);
  115. line(c+50, p+70, c+85, p+80);
  116. ellipse(c+140, p+140, 5, 5);
  117. //630, 100
  118. line(c+20, p+20, c+40, p+20);
  119. ellipse(c+40, p+20, 5, 5);
  120. line(c+30, p-20, c+70, p+5);
  121. line(c+40, p+20, c+70, p+5);
  122. ellipse(c+70, p+5, 5, 5);
  123. line(c+70, p+5, c+110, p-15);
  124. ellipse(c+110, p-15, 5, 5);
  125. push();
  126. fill('magenta');
  127. ellipse(c+30, p-20, 15, 15);
  128. pop();
  129. line(c+70, p+5, c+115, p+35);
  130. ellipse(c+115, p+35, 5, 5);
  131. line(c+115, p+35, c+135, p+85);
  132. ellipse(c+135, p+85, 5, 5);
  133. line(c+115, p+35, c+140, p+55);
  134. ellipse(c+140, p+55, 5, 5);
  135. line(c+140, p+55, c+160, p+60);
  136. ellipse(c+160, p+60, 5, 5);
  137. line(c+160, p+60, c+180, p+60);
  138. ellipse(c+180, p+60, 5, 5);
  139. }
  140.  
  141. //75, 125
  142. function Moon(d,e) {
  143. push();
  144. strokeWeight(2);
  145. ellipse(d, e, 100, 100);
  146. push();
  147. fill(265, 214, 170);
  148. ellipse(d-20, e-20, 40, 30);
  149. ellipse(d+30, e+10, 20, 30);
  150. ellipse(d-5, e+10, 20, 25);
  151. ellipse(d-20, e+30, 30, 25);
  152. ellipse(d+10, e+30, 15, 15);
  153. pop();
  154. pop();
  155.  
  156. }
Add Comment
Please, Sign In to add comment