Serie Luna sketch adaptado de genekogan recursiones de espirales con random gausianos Los proyectos estan realizados con p5js @patxangas
Last active
December 12, 2016 08:16
-
-
Save karlosgliberal/cf87e1cc136d0e2718ef16122456b5d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($, undefined) { | |
console.log("hola"); | |
})(jQuery); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>moon</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js" type="text/javascript"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/p5.js" type="text/javascript"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.dom.js" type="text/javascript"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.2/addons/p5.sound.js" type="text/javascript"></script> | |
<script src="app.js" type="text/javascript"></script> | |
<script src="sketch.js" type="text/javascript"></script> | |
<link rel="stylesheet" href="style.css" media="screen" title="no title" charset="utf-8"> | |
<style> body {padding: 0; margin: 0;} canvas {vertical-align: center; horizontal-aling: center;} </style> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
var c = createCanvas(1400, 1400); | |
smooth(); | |
background(0); | |
//ellipseMode(CENTER); | |
} | |
function draw() { | |
stroke(255,80); | |
noFill(); | |
push(); | |
translate(frameCount, 100); | |
rotate(map(cos(0.4*frameCount), -1, 2, 0, TWO_PI)); | |
//bezier(50, 200, 100, randomGaussian(100,150), 200, 100, 200, randomGaussian(400,430)); | |
//bezier(frameCount, frameCount+200, 100, randomGaussian(100,200), 90, 90, random(PI+QUARTER_PI), 80); | |
//bezier(random(0),randomGaussian(0), 720, randomGaussian(720,200), 0, random(PI+QUARTER_PI)); | |
//pelos -> bezier(100,randomGaussian(10,20),randomGaussian(30,33),220,30,30,300,800) | |
//raton -> bezier(100,randomGaussian(400, 410),randomGaussian(30,33),randomGaussian(100,110),30,30,300,mouseY) | |
//bezier(100,randomGaussian(400, 410),randomGaussian(30,33),randomGaussian(100,110),30,30,300,randomGaussian(mouseY/4,100)) | |
// mouse -> bezier(0,400,30,mouseX,500, mouseX,70,mouseY+randomGaussian(200,400)); | |
beginShape(); | |
for (var x = 0; x < width; x++) { | |
var nx = map(x, 0, width, 0, 5); | |
var y = height/4 * noise(nx); | |
vertex(x+mouseX, y) | |
} | |
endShape(); | |
pop(); | |
if(frameCount > 8000){ | |
noLoop(); | |
save("movida.jpg"); | |
} | |
} | |
function mousePressed() { | |
save("movida.jpg"); | |
} | |
function keyPressed() { | |
console.log(keyCode) | |
if (keyCode == 83) { | |
noLoop(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
canvas { | |
padding: 0; | |
margin: auto; | |
display: block; | |
width: 800px; | |
height: 600px; | |
position: absolute; | |
top: 0; | |
bottom: 0; | |
left: 0; | |
right: 0; | |
} | |
body { | |
background-color: #000000; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment