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.

238 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. פוסט נחמד. חייב לשתף עם העוקבים שלי.
    ארגון חתונה

    ReplyDelete
  26. כל מילה. תודה על השיתוף, מחכה לעוד פוסטים בנושא.
    שטיח לחדר ילדים

    ReplyDelete
  27. 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
  28. 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
  29. Very nice thanks for sharing this with us. Keep up the good work and Thank you for sharing information
    gemcreature

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

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

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

    ReplyDelete
  33. Thanks for the interesting blog that you have implemented here. Very helpful and innovative. Waiting for your next upcoming article.
    Digital Marketing Course In Kolkata

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

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

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

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

    ReplyDelete
  38. movies123. AMAZING inspiration using this new kit

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

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

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

    ReplyDelete
  42. This is an excellent post I seen thanks to share it. It is really what I wanted to see hope in future you will continue for sharing such a excellent post.

    Data Science Course

    ReplyDelete
  43. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work.
    Data Science Training Institute in Bangalore

    ReplyDelete
  44. 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
  45. I have recently started a blog, the info you provide on this site has helped me greatly. Thanks for all of your time & work.
    Data Science Course in Hyderabad | Data Science Training in Hyderabad

    ReplyDelete
  46. You are in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject!
    I feel really happy to have seen your webpage and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Business Analytics Training in Hyderabad | Business Analytics Course in Hyderabad

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

    Bastion Balance Seoul

    ReplyDelete
  48. 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
  49. Really very informative and creative contents.
    single trundle bed

    ReplyDelete
  50. 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
  51. Thanks for the Information.Interesting stuff to read.Great Article.
    I enjoyed reading your post, very nice share.
    Data Science Course Training in Hyderabad

    ReplyDelete
  52. 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
  53. Truly incredible blog found to be very impressive due to which the learners who ever go through it will try to explore themselves with the content to develop the skills to an extreme level. Eventually, thanking the blogger to come up with such an phenomenal content. Hope you aarrive with the similar content in future as well.

    360DigiTMG Ethical Hacking Course

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

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

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


    Garage Door Repair Cochrane

    ReplyDelete
  56. 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
  57. Wow! Such an amazing and helpful post this is. I really really love it. I hope that you continue to do your work like this in the future also.

    Apache Spark Training in Pune
    Spark Training Institute in Pune

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

    ReplyDelete
  59. I will very much appreciate the writer's choice for choosing this excellent article suitable for my topic. Here is a detailed description of the topic of the article that helped me the most.
    unindent does not match any outer indentation level

    ReplyDelete
  60. I'm glad I found this blog! Occasionally, students want to know the keys to writing productive literary essays. Your first-class knowledge of this great job can become a suitable foundation for these people. Good
    unindent does not match any outer indentation level python

    ReplyDelete
  61. 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
  62. It was acceptable experience to find out about perilous accentuation. Useful for everybody looking regarding the matter.360DigiTMG masters in data science

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

    ReplyDelete
  64. 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
  65. 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
  66. I just came across to reading your blog it serve very useful information about the interiors thank you.


    garage door repair pittsburgh

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


    dishwasher repair mississauga

    ReplyDelete
  68. This is most informative and also this post most user friendly and super navigation to all posts.
    Data Science
    Selenium
    ETL Testing
    AWS
    Python Online Classes

    ReplyDelete
  69. 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
  70. Thanks For sharing a nice post about Course.It is very helpful and useful for us.data science courses

    ReplyDelete
  71. 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
  72. I'm glad to see the extensive unpretentious component here!.
    data analytics training

    ReplyDelete
  73. 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
  74. good information seeking more such blogs in future.
    https://360digitmg.com/course/machine-learning-using-python-r

    ReplyDelete
  75. 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
  76. 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
  77. 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
  78. 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
  79. You finished certain solid focuses there. I did a pursuit regarding the matter and discovered essentially all people will concur with your blog.
    data scientist hyderabad

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


    Garage Door Opener Repair

    ReplyDelete
  81. 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
  82. Thanks for sharing your thoughts with us they are really interesting. I would like to read more from you.


    Garage Door Cable Repair

    ReplyDelete
  83. 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
  84. חייב להחמיא על הכתיבה. מאמר מצוין.

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

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

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

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

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

    ReplyDelete
  89. Your content is very unique and understandable useful for the readers keep update more article like this.
    data science training

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

    ReplyDelete
  91. 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
  92. 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
  93. 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
  94. 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
  95. 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
  96. i am glad to discover this page : i have to thank you for the time i spent on this especially great reading !! i really liked each part and also bookmarked you for new information on your site.
    best data science courses in bangalore

    ReplyDelete
  97. 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
  98. 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
  99. I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
    Data Science Course

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

    ReplyDelete
  101. Your site is truly cool and this is an extraordinary moving article and If it's not too much trouble share more like that. Thank You..
    Digital Marketing Institute in Bangalore

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

    ReplyDelete
  103. I read your article it is very interesting and every concept is very clear, thank you so much for sharing. AWS Certification Course in Chennai

    ReplyDelete
  104. Really wonderful blog completely enjoyed reading and learning to gain the vast knowledge. Eventually, this blog helps in developing certain skills which in turn helpful in implementing those skills. Thanking the blogger for delivering such a beautiful content and keep posting the contents in upcoming days.

    data science course in bangalore with placement

    ReplyDelete
  105. I want to leave a little comment to support and wish you the best of luck.we wish you the best of luck in all your blogging enedevors.
    data analytics courses in bangalore

    ReplyDelete
  106. 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
  107. The information you have posted is important. The objections you have insinuated was worthy. Thankful for sharing.
    data scientist course

    ReplyDelete
  108. 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
  109. Such a very useful information!Thanks for sharing this useful information with us. Really great effort.
    data scientist courses aurangabad

    ReplyDelete
  110. Thanks for posting the best information and the blog is very important.digital marketing institute in hyderabad

    ReplyDelete
  111. 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
  112. 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
  113. Thanks for posting the best information and the blog is very important.artificial intelligence course in hyderabad

    ReplyDelete
  114. 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
  115. Amazing blog.Thanks for sharing such excellent information with us. keep sharing...
    data science courses aurangabad

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

    ReplyDelete