Announcement
Collapse
No announcement yet.
Fractal terrain in Javascript
Collapse
X
-
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.
Leave a comment: