1 / 3
Procedural weathered fractal terrain in OpenSCAD — image 1
1 / 3

Procedural weathered fractal terrain in OpenSCAD

Order a print of this model

We calculate the final price from your selected file. You review and accept it before payment.

Saved on this device.

Wind-worn random terrain generated procedurally

Rating
0 / 5
Likes
31
Downloads
292
Makes
0
Views
3,076
Reviews
0

Updated at source:

Model information

License
Creative Commons — Attribution

I wanted to create a procedurally-generated terrain map on a globe, using OpenSCAD. I'll get around to the globe eventually. First I had to get the procedural terrain generation to work, and then the weathering/erosion algorithm. This is the result.

Because this terrain is generated procedurally from a random number seed, you can get an infinite variety of landscapes.

To read about how I developed this, see my blog article Simulating erosion, in which I describe both the terrain generation algorithm and the weathering simulation. The end of the article includes a JavaScript applet you can play with.

You can use the OpenSCAD customizer to set parameters, but I suggest instead you read the comments at the top of the file to understand how the parameters work.

The script lets you generate a single-color model, terrain only, or separate land and sea parts for multi-color printing. The weathering algorithm is slow; I recommend no more than 2 passes. Also, the greatest practical value for the number of subdivisions used on the fractal surface is 7. You can use 8 but the resulting file is large and has way more resolution than you need for printing. Read the comments at the beginning of the script!

Print Settings

Printer: Prusa i3 MK3 MMU 2

Supports: No

Resolution: 0.20 mm layers

Infill: 15% gyroid

Filament: Generic PLA (silk bronze), Prusament PLA (deep blue)

Notes:

The model pictured is printed with 3 perimeters. Printed with two colors on a Prusa i3 MK3S+MMU2S, it took about 7 hours. Printed in a single color it would take a fraction of that time.

How I Designed This

I couldn't have created this using OpenSCAD's functional programming language until I could develop a proof-of-concept using an imperative language. So I used JavaScript, a free 3D graphics library, and HTML + CSS to develop the algorithms described in my blog article. I then converted the procedures into recursive OpenSCAD functions. The resulting OpenSCAD script turned out to be fairly short.

 

 

Category: Math Art

Tags