Announcement

Collapse
No announcement yet.

Fractal terrain in Javascript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bungholio
    replied
    It's interesting how nice those look.

    Leave a comment:


  • dlevere
    started a topic Fractal terrain in Javascript

    Fractal terrain in Javascript

    By Jason Kottke

    Hunter Loftis has built a terrain rendering engine in only 130 lines of Javascript. Here's what the output looks like:



    Programmers tend to be lazy (I speak from experience), and one nice side effect of laziness is really brilliant ways to avoid work. In this case, instead of spending mind-numbing hours manually creating what would likely be pretty lame rocky surfaces, we'll get spiritual and teach the computer what it means to be a rock. We'll do this by generating fractals, or shapes that repeat patterns in smaller and smaller variations.

    I don't have any way to prove that terrain is a fractal but this method looks really damn good, so maybe you'll take it on faith.
    You can try it out here...reload to get new landscapes. Callum Prentice built an interactive version. This obviously reminds me of Vol Libre, a short film by Loren Carpenter from 1980 that showcased using fractals to generate terrain for the first time.
Working...
X