{"id":253,"date":"2014-03-20T13:49:36","date_gmt":"2014-03-20T12:49:36","guid":{"rendered":"http:\/\/processing.joan.cat\/rv\/?page_id=253"},"modified":"2014-03-20T16:48:18","modified_gmt":"2014-03-20T15:48:18","slug":"02_aleatoriedad","status":"publish","type":"page","link":"http:\/\/processing.joan.cat\/rv\/02_aleatoriedad\/","title":{"rendered":"Aleatoriedad"},"content":{"rendered":"<p><script type=\"text\/javascript\" src=\"http:\/\/processing.joan.cat\/rv\/wp-content\/uploads\/2014\/03\/processing-1.4.1.min_.js\"><\/script>[<a href=\"http:\/\/processing.joan.cat\/rv\/code\/aleatorio.zip\">archivo zip con todos los ejemlos<\/a>]<\/p>\n<p><strong>Perlin noise<br \/>\n<\/strong>La utilizaci\u00f3n de <a href=\"https:\/\/www.processing.org\/reference\/noise_.html\">Perlin Noise<\/a>\u00a0nos permite tener un tipo de aleatoriedad distinta a <a href=\"https:\/\/www.processing.org\/reference\/random_.html\">random<\/a>. Aqu\u00ed hay varios ejemplos que ilustran su uso:<\/p>\n<p>Visualizaci\u00f3n b\u00e1sica de los valores de Perlin Noise:<\/p>\n<p><canvas id=\"perlin_simple\" data-processing-sources=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_simple.pde\"><\/canvas><br \/>\n<a href=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_simple.pde\">Source<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Perlin Mountains:<\/p>\n<p><canvas id=\"perlin_mountains\" data-processing-sources=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_mountains.pde\"><\/canvas><br \/>\n<a href=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_mountains.pde\">Source<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Perlin Walkers:<\/p>\n<p><canvas id=\"perlin_walkers\" data-processing-sources=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_walkers.pde\"><\/canvas><br \/>\n<a href=\"http:\/\/processing.joan.cat\/rv\/code\/perlin_walkers.pde\">Source<\/a><\/p>\n<p>Tambi\u00e9n nos puede interesar una distribuci\u00f3n normal (tipo campana de Gauss), lo que se puede conseguir con <a href=\"http:\/\/www.processing.org\/reference\/randomGaussian_.html\">RandomGaussian<\/a>.<\/p>\n<p>Parece que RandomGaussian no est\u00e1 implementado para JavaScript, con lo que aqu\u00ed (y en el <a href=\"http:\/\/processing.joan.cat\/rv\/code\/aleatorio.zip\">archivo con todos los ejemplos<\/a>) ten\u00e9is solo el c\u00f3digo fuente:<\/p>\n<p><a href=\"http:\/\/processing.joan.cat\/rv\/code\/gaussian_simple.pde\">Visualizaci\u00f3n simple<br \/>\n<\/a><a href=\"http:\/\/processing.joan.cat\/rv\/code\/gaussian_some.pde\">Visualizaci\u00f3n gr\u00e1fica<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[archivo zip con todos los ejemlos] Perlin noise La utilizaci\u00f3n de Perlin Noise\u00a0nos permite tener un tipo de aleatoriedad distinta a random. Aqu\u00ed hay varios ejemplos que ilustran su uso: Visualizaci\u00f3n b\u00e1sica de los valores de Perlin Noise: Source &nbsp; &hellip; <a href=\"http:\/\/processing.joan.cat\/rv\/02_aleatoriedad\/\">Continua llegint <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/pages\/253"}],"collection":[{"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":22,"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/pages\/253\/revisions"}],"predecessor-version":[{"id":291,"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/pages\/253\/revisions\/291"}],"wp:attachment":[{"href":"http:\/\/processing.joan.cat\/rv\/wp-json\/wp\/v2\/media?parent=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}