Pages

Monday, February 15, 2010

Bring the (Perlin) Noise

If you just want the source code: The JavaScript Perlin noise generator code is here.

I mentioned in a previous post that I was working on a Perlin noise generator for Art Evolver.

Perlin noise is a function of (x, y) that produces a random-ish pattern. It's not completely random because it has smooth hills and valleys, but the distribution of those hills and valleys is random.

A side note about this algorithm: Usually if you're a computer scientist and you come up with a clever algorithm to solve a particular problem, you get an award from a university, or a CS-centric professional organization like the ACM or IEEE. Perlin got an Academy Award for this noise function. As in, the Oscar kind of Academy Award.  For an algorithm, something not usually consider artsy.  I found that interesting.

Anyways, rather than dive into Perlin's impenetrable description of how the algorithm works, I set out to find an existing JavaScript implementation. That let me to this message board, and specifically this example.

Unfortunately that implementation has some pretty serious directional artifacts:

Note the horizontal and vertical stripes.  There's almost an upside down cross in the lower right. SAAAATAAAAN!

Rather than try to fix that source code (which the author apparently closureized (making it very difficult to understand)) I kept searching.

From the main Wikipedia entry on Perlin noise, I ran across a variant called Simplex noise.  This is an improvement on the original algorithm, also written by Ken Perlin, in 2001.  That Wikipedia page linked to a paper by Stefan Gustavson(pdf) that explains both classical and Simplex Perlin noise in a much easier to grok way than anything I've read by Perlin himself.  I highly recommend Gustavson's paper if you found Perlin difficult.

I took the Java source code in Gustavson's paper and ported it to JavaScript, and the results are here on github.

I ran some performance comparisons between the classical and Simplex algorithms, and for 2-D I only saw a ~10% improvement with Simplex.  Granted, the latter is supposed to be faster in higher dimensions (classical is O(N^2) vs. simplex O(N) where N is the number of dimensions) so it doesn't matter much for my purposes.

Classical Perlin noise

Simplex Perlin noise

Subjectively I think I prefer the Simplex noise to classical, so I'll probably go with that for Art Evolver.

Again, the source code is here.

189 comments:

  1. Thank you for sharing with good, useful, helpful review. If you are looking for cheap insurance quotes, it necessary to know that when you get cheap house insurance, you save much more on rates from home insurers.

    ReplyDelete
    Replies
    1. A IEEE project is an interrelated arrangement of exercises, having a positive beginning and end point and bringing about an interesting result in Engineering Colleges for a particular asset assignment working under a triple limitation - time, cost and execution. Final Year Project Domains for CSE In Engineering Colleges, final year IEEE Project Management requires the utilization of abilities and information to arrange, plan, plan, direct, control, screen, and assess a final year project for cse. The utilization of Project Management to accomplish authoritative objectives has expanded quickly and many engineering colleges have reacted with final year IEEE projects Project Centers in Chennai for CSE to help students in learning these remarkable abilities.


      Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
      Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

      Delete
  2. Hi, Sean -

    I'm using your code for 2D simplex noise in JavaScript and trying to get it to reproduce something like the image you have posted above. I can get noise, but it is very pixelated, with none of the larger scale features you have above.

    All I am doing is creating a blank image data, setting each pixel to rgba(255,0,0,1.0), and running each pixel through the noise function. I set noise = (noise+1)/2 to bring it back to a [0,1] range and multiply it by the r channel and the alpha channel.

    Clearly, I'm doing something wrong. Would you be willing to share the code you used to generate the simplex photo? I'm happy to share my own, but won't poison your blog with it unasked.

    /ejt

    ReplyDelete
  3. Classic perlin noise is O(2^n) complexity and simplex perlin noise is O(n^2) complexity. Definitely not O(n) :)

    ReplyDelete
  4. Thank you for sharing some good, useful, useful comments. If you're looking for cheap insurance quotes, it is necessary to know, when you get cheap home insurance, you save more about rate from insurance companies.
    jerseys cheap

    ReplyDelete
  5. Interesting Article

    JavaScript Training in CHennai HTML5 Training in Chennai HTML5 Training in Chennai JQuery Training in Chennai JQuery Training in Chennai JavaScript Training in Chennai JavaScript Training in Chennai

    JavaScript Training in CHennai JavaScript Training in CHennai JQuery Online Training JQuery Online Training

    ReplyDelete
  6. Hi, This is nice article you shared great information i have read it thanks for giving such a wonderful Blog for reader.
    fence repair jacksonville

    ReplyDelete
  7. Very nice bro, thanks for sharing this with us. Keep up the good work and Thank you for sharing information
    fence repair jacksonville

    ReplyDelete
  8. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading.
    bathroom remodel broward county

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. Thanks for a wonderful share. Your article has proved your hard work and experience you have got in this field. Brilliant .i love it reading.
    fort lauderdale remodeling contractors

    ReplyDelete
  11. You have a good point here!I totally agree with what you have said!!Thanks for sharing your views...hope more people will read this article!!! vinyl fence tampa

    ReplyDelete
  12. Hi, This is nice article you shared great information i have read it thanks for giving such a wonderful Blog for reader.
    tile reglazing atlanta

    ReplyDelete
  13. I think this is one of the most significant information for me. And i’m glad reading your article.emergency water removal services miami

    ReplyDelete
  14. Hi, This is nice article you shared great information i have read it thanks for giving such a wonderful Blog for reader.
    bathtub refinishing and fiberglass expert los angeles

    ReplyDelete
  15. Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place. mold remediation companies miami

    ReplyDelete
  16. i have read it thanks for giving such a wonderful Blog for reader.
    phoenix remodeling contractors

    ReplyDelete
  17. Excellent experienced for me to read your great blog, I really impressed. I eagerly waiting for your future updates..
    safari hotel lahore

    ReplyDelete
  18. Finally I found a great post with interesting topic.
    123movie

    ReplyDelete
  19. סופסוף מישהו שתואם לדעותיי בנושא. תודה.
    קבוצת גבאי

    ReplyDelete
  20. סגנון כתיבה מרענן, תודה על השיתוף.
    פינות אוכל מעוצבות

    ReplyDelete
  21. תודה על השיתוף. מחכה לכתבות חדשות.
    שולחנות אוכל

    ReplyDelete
  22. רציתי רק לשאול, אפשר לשתף את הפוסט בבלוג שלי?
    מזנונים לסלון

    ReplyDelete
  23. אין ספק שזה אחד הנושאים המעניינים. תודה על השיתוף.
    מילוי שפתיים

    ReplyDelete
  24. פוסט נחמד. חייב לשתף עם העוקבים שלי.
    ארגון חתונה

    ReplyDelete
  25. It’s in fact very difficult in this busy life to listen news on TV, thus I only use the web for that purpose,and take the latest news.123Movies

    ReplyDelete
  26. It’s in fact very difficult in this busy life to listen news on TV, thus I only use the web for that purpose,and take the latest news.SolarMovies

    ReplyDelete
  27. Very nice thanks for sharing this with us. Keep up the good work and Thank you for sharing information
    gemcreature

    ReplyDelete
  28. This comment has been removed by the author.

    ReplyDelete
  29. הייתי חייבת לפרגן, תודה על השיתוף.
    מצלמות אבטחה

    ReplyDelete
  30. סגנון כתיבה מרענן, תודה על השיתוף.
    ניהול מוניטין

    ReplyDelete
  31. This incredible internet web site actually has all of the data I desired concerning this issue and didn’t recognize who to ask.

    ReplyDelete
  32. מעולה. תודה על הכתיבה היצירתית.
    מתנה ליולדת

    ReplyDelete
  33. הייתי חייבת לפרגן, תודה על השיתוף.
    חנויות למכירה

    ReplyDelete
  34. תמשיכו בפרסום פוסטים מעניינים כמו זה. תודה.
    פיתוח אפליקציות לאנדרואיד

    ReplyDelete
  35. movies123. AMAZING inspiration using this new kit

    ReplyDelete
  36. לגמרי פוסט שדורש שיתוף תודה.
    קאנבי

    ReplyDelete
  37. Thank you for sharing with good, useful, helpful review.
    אינטרקום לבית פרטי

    ReplyDelete
  38. 123movies. manufacturers, their history, and where they’re headed.

    ReplyDelete
  39. If you don"t mind proceed with this extraordinary work and I anticipate a greater amount of your magnificent blog entries.

    Data Science Training

    ReplyDelete
  40. Thanks for sharing your thoughts with us they are really interesting. I would like to read more from you.

    Bastion Balance Seoul

    ReplyDelete
  41. Wow that would be great party. i love get together with friends and family it greats time we pass with them.


    Global Asset Management Korea

    ReplyDelete
  42. Really very informative and creative contents.
    single trundle bed

    ReplyDelete
  43. Found your post interesting to read. I cant wait to see your post soon. Good Luck for the upcoming update. This article is really very interesting and effective, data science online training

    ReplyDelete
  44. Impressive blog to be honest definitely this post will inspire many more upcoming aspirants. Eventually, this makes the participants to experience and innovate themselves through knowledge wise by visiting this kind of a blog. Once again excellent job keep inspiring with your cool stuff.

    360DigiTMG Python Course

    ReplyDelete
  45. חייב להחמיא על הכתיבה. מאמר מצוין.

    בריכות שחיה פיברגלס

    ReplyDelete
  46. yes it would be, once my friend gave me lecture about modesty it was amazing and heart touching.


    Garage Door Repair Cochrane

    ReplyDelete
  47. There is no dearth of Data Science course syllabus or resources. Learn the advanced data science course concepts and get your skills upgraded from the pioneers in Data Science.
    data science course bangalore
    data science course syllabus
    data science training in marathahalli
    data science syllabus for beginners

    ReplyDelete
  48. Very awesome!!! When I seek for this I found this website at the top of all blogs in search engine.
    data science training

    ReplyDelete
  49. A digital marketing course will not ordinarily provide the tools to develop websites or write code for online use; these are highly technical skills which are best left to those who are willing to devote significant time to learn in detail. data science course syllabus

    ReplyDelete
  50. It was acceptable experience to find out about perilous accentuation. Useful for everybody looking regarding the matter.360DigiTMG masters in data science

    ReplyDelete
  51. Hello there, I sign on to your new stuff like each week. Your humoristic style is clever, keep it up
    data science course

    ReplyDelete
  52. stunning, incredible, I was thinking about how to fix skin inflammation normally.I've bookmark your site and furthermore include rss. keep us refreshed.
    data science course

    ReplyDelete
  53. You actually make it look so easy with your performance but I find this matter to be actually something which I think I would never comprehend. It seems too complicated and extremely broad for me. I'm looking forward for your next post, I’ll try to get the hang of it!
    data science course in hyderabad with placements

    ReplyDelete
  54. I just came across to reading your blog it serve very useful information about the interiors thank you.


    garage door repair pittsburgh

    ReplyDelete
  55. I just came across to reading your blog it serve very useful information about the interiors thank you.


    dishwasher repair mississauga

    ReplyDelete
  56. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    data science course in India

    ReplyDelete
  57. I wish more writers of such a substance would take the time you did to examine and shape so well. I am especially awed with your vision and data.
    data science course

    ReplyDelete
  58. I'm glad to see the extensive unpretentious component here!.
    data analytics training

    ReplyDelete
  59. I truly like your style of blogging. I added it to my preferred's blog webpage list and will return soon…
    https://360digitmg.com/course/certification-program-in-data-science

    ReplyDelete
  60. keep up the good work. this is an Ossam post. This is to helpful, i have read here all post. i am impressed. thank you. this is our site please visit to know more information
    data science training

    ReplyDelete
  61. Trying to say thanks won't simply be adequate, for the fantasti c clarity in your composition. I will immediately get your rss channel to remain educated regarding any updates.
    data scientist hyderabad

    ReplyDelete
  62. Thats great. I got the right one information at the right time for the right situation. Thanks for sharing.


    garage door cable repair ottawa

    ReplyDelete
  63. Through this post, I realize that your great information in playing with all the pieces was exceptionally useful. I advise this is the primary spot where I discover issues I've been scanning for. You have a smart yet alluring method of composing.
    https://360digitmg.com/masters-in-full-stack-data-scientist-course/

    ReplyDelete
  64. Very interesting topic, can you post some further information on this subject.


    Garage Door Opener Repair

    ReplyDelete
  65. What an extremely wonderful post this is. Genuinely, perhaps the best post I've at any point seen to find in as long as I can remember. Goodness, simply keep it up.
    data scientist course in malaysia

    ReplyDelete
  66. Thanks for sharing your thoughts with us they are really interesting. I would like to read more from you.


    Garage Door Cable Repair

    ReplyDelete
  67. the decision which was made based on this data did not yield the proper results expected or desired, then the artificial intelligence program must initiate a subprogram to reverse itself through the data used, working backwards to find the flaw or which decision was in error and then erasing back to that point. data science course in india

    ReplyDelete
  68. חייב להחמיא על הכתיבה. מאמר מצוין.

    אינטרקום סקיוריטי

    ReplyDelete
  69. Thanks for the information about Blogspot very informative for everyone
    certification of data science

    ReplyDelete
  70. Nice and very informative blog, glad to learn something through you.
    data scientist course delhi

    ReplyDelete
  71. I read that Post and got it fine and informative. Please share more like that...
    business analytics courses aurangabad

    ReplyDelete
  72. You totally coordinate our desire and the assortment of our data.
    best data science course

    ReplyDelete
  73. This post is very impressive on this topic. I feel completely that love and read more on this topic.
    I have really enjoyed reading your blog stations. Thanks for sharing. nit comb

    ReplyDelete
  74. This post is very impressive on this topic. I feel completely that love and read more on this topic.
    I have really enjoyed reading your blog stations. Thanks for sharing. We buy houses Choctaw

    ReplyDelete
  75. I was looking at a portion of your posts on this site and I consider this site is really enlightening! Keep setting up..
    business analytics course aurangabad

    ReplyDelete
  76. I was looking at a portion of your posts on this site and I consider this site is really enlightening! Keep setting up..
    data science course gurgaon

    ReplyDelete
  77. Well we really like to visit this site, there is a lot of useful information we can get here
    Digital Marketing Training Institutes in Hyderabad

    ReplyDelete
  78. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.
    Primavera P6 Certification Training in Chennai | Primavera Training in India

    ReplyDelete
  79. Excellence blog! Thanks For Sharing, The information provided by you is really a worthy. I read this blog and I got the more information about
    data science malaysia

    ReplyDelete
  80. Nice and very informative blog, glad to learn something through you.
    machine learning course in aurangabad

    ReplyDelete
  81. Very much impressive blog post,
    Digital Marketing Training in KPHB with 100% Internships & Job Assistance

    ReplyDelete
  82. Excellent work done by you once again here. This is just the reason why I’ve always liked your work. You have amazing writing skills and you display them in every article. Keep it going!
    data scientist training and placement

    ReplyDelete
  83. The information you have posted is important. The objections you have insinuated was worthy. Thankful for sharing.
    data scientist course

    ReplyDelete
  84. A good blog always comes-up with new and exciting information and while reading I have feel that this blog is really have all those quality that qualify a blog to be a one
    data scientist training and placement

    ReplyDelete
  85. Such a very useful information!Thanks for sharing this useful information with us. Really great effort.
    data scientist courses aurangabad

    ReplyDelete
  86. I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.
    DevOps Training in Hyderabad
    DevOps Course in Hyderabad

    ReplyDelete
  87. I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
    AWS Training in Hyderabad
    AWS Course in Hyderabad

    ReplyDelete
  88. Really nice and interesting post. I was looking for this kind of information and enjoyed reading this one. Keep posting. Thanks for sharing.
    data scientist course in malaysia

    ReplyDelete
  89. Amazing blog.Thanks for sharing such excellent information with us. keep sharing...
    data science courses aurangabad

    ReplyDelete
  90. This post is very simple to read and appreciate without leaving any details out. Great work!
    data science course chennai

    ReplyDelete
  91. Thank you so much for doing the impressive job here, everyone will surely like your post.
    cyber security course in malaysia

    ReplyDelete
  92. This also has an unfortunate side effect: Perlin noise always repeats every 256 coordinates. This isn't a problem though because decimal coordinates are possible with perlin noise. Check at www.builditspokane.com

    ReplyDelete
  93. Perlin noise is a procedural texture primitive, a type of gradient noise used by visual effects artists to increase the appearance of realism in computer graphics. More about Orange County Tree Service

    ReplyDelete
  94. Your content is very unique and understandable useful for the readers keep update more article like this.
    ai course in aurangabad

    ReplyDelete
  95. Excellent effort to make this blog more wonderful and attractive.
    full stack development course

    ReplyDelete
  96. This also has an unfortunate side effect: Perlin noise always repeats every 256 coordinates. This isn't a problem though because decimal coordinates are possible with perlin noise. Learn more about Tree Service Orange County

    ReplyDelete
  97. I'm a little bit grateful by this post. Thanks for sharing. Tree Service Spokane.

    ReplyDelete
  98. Technically, Perlin and simplex noise are only fractal noises when multiple different octaves are layered together with a consistent lacunarity and gain. check us out here

    ReplyDelete
  99. Excellent blog content you have an amazing talent in this field. I admire your knowledge in comes in blogging. Keep it up! Find out more info here

    ReplyDelete
  100. It is great blog post for us! Thanks and Keep sharing this type of valuable information! Join best java training institute in Delhi and Data Science courses in Delhi with 100% placement assurance.

    ReplyDelete
  101. Thanks for sharing some useful and impressive topics in your blog post...We provide best Visit iot mini project centers in chennai! and we have excellent Visit .net project centers in chennai!visit our website for your projects...

    ReplyDelete
  102. Thanks for sharing such a great post. Keep up the good work. www.foundationrepaircorpuschristi.net

    ReplyDelete
  103. Great informative website. Thanks for sharing. www.itsupportraleigh.org

    ReplyDelete
  104. NordVPN Premium Crack PC has become our first official cybersecurity partner. With such plenty of data shared continuously online! Nord VPN Cracked pc

    ReplyDelete
  105. Perlin noise is a function of (x, y) that produces a random-ish pattern. It has smooth hills and valleys, so it's not entirely random, but the way those hills and valleys are distributed is.

    Look now for the reliable Emergency Tree Service Spokane.

    ReplyDelete
  106. Nice article thanks for share Great information. Experience the power of online English tuition classes to boost your language proficiency! Join our expert-led, interactive sessions designed to improve your grammar, vocabulary, comprehension, and communication skills.
    For more info visit Online English Tuition

    ReplyDelete
  107. Good Post! , it was so good to read and useful to improve my knowledge. Looking for the best way to improve your English speaking skills in Bahrain? Ziyyara Edutech brings you top-notch online English tuition, specially designed to help you excel in spoken English.
    For more info visit Speaking english language class in bahrain

    ReplyDelete
  108. Thank you for such a great blog! I was thoroughly impressed by the quality of this article. Are you searching for a premier English language class in Qatar? Ziyyara Edutech offers a specialized English language course in Qatar.
    For more info visit Online english language Class in Qatar

    ReplyDelete