Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. let noiseVal;
  2. let noiseVal2;
  3. let noiseVal3;
  4. let noiseScale = 0.02;
  5. let noiseScale2 = 0.05;
  6. let noiseScale3 = 0.08;
  7.  
  8. function setup() {
  9. createCanvas(640, 360);
  10. //colorMode(HSB);
  11. background(0);
  12. // Draw the left half of image
  13.  
  14. // Draw the right half of image
  15. let xoff = 0.0;
  16. for (let x = 0; x < width; x++) {
  17. let yoff = 0.0;
  18. for (let y = 0; y < width; y++) {
  19. // noiceDetail of the pixels octave count and falloff value
  20. noiseDetail(5, 0.5);
  21. noiseVal = noise((xoff + x) * noiseScale, (yoff + y) * noiseScale);
  22. noiseVal2 = noise((xoff + 1000) * noiseScale, (yoff + 500) * noiseScale);
  23. noiseVal3 = noise((xoff + 2000) * noiseScale, (yoff + 4000) * noiseScale);
  24. //console.log(noiseVal);
  25. //console.log(noiseVal2);
  26.  
  27. stroke(noiseVal * 255, noiseVal2 * 255, noiseVal3 * 255);
  28. point(x, y);
  29. yoff+=0.1;
  30. }
  31. xoff+=0.1;
  32. }
  33. //Show the details of two partitions
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement