Announcement

Collapse
No announcement yet.

Fractal terrain in Javascript

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

  • 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.
    The Hackmaster

  • #2
    It's interesting how nice those look.
    July 7, 2019

    https://www.4shared.com/s/fLf6qQ66Zee
    https://www.sendspace.com/file/jvsdbd

    Comment

    Working...
    X