Logo by simon.snake - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. March 28, 2024, 02:07:34 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: diamond-square midpoint displacement algorithm  (Read 3279 times)
Description: an algorithm from the 80s
0 Members and 1 Guest are viewing this topic.
claude
Fractal Bachius
*
Posts: 563



WWW
« on: May 25, 2017, 05:52:50 PM »

I found this a good introduction to the diamond-square midpoint displacement algorithm for 2D terrain heightmap (or cloud texture) generation:

http://www.gameprogrammer.com/fractal.html

I implemented an extension to 3D.  C99 source code attached.

Here it is rendered in slices, thresholded with edge-detection on the histogram-equalized voxel space, perhaps could be useful for generative cave systems or similar worlds:

roughness factor 0.3


roughness factor 0.5


roughness factor 0.7


* diamond-square.c.txt (7.78 KB - downloaded 267 times.)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Displacement Renderings Images Showcase (Rate My Fractal) cKleinhuis 12 3511 Last post March 15, 2007, 09:43:43 AM
by cKleinhuis
Diamond-square algorithm help Help & Support kronikel 10 1753 Last post April 12, 2011, 02:11:06 AM
by kronikel
Problem with diamond-square algorithm Programming « 1 2 3 4 » kronikel 56 22751 Last post July 16, 2012, 10:50:15 AM
by setec
Spatial Displacement Mandelbulb3D Gallery lenord 0 811 Last post January 03, 2012, 02:56:37 AM
by lenord
Problem with my Diamond Square algorithm Programming mbob61 5 3436 Last post December 12, 2012, 12:17:35 AM
by David Makin

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.408 seconds with 27 queries. (Pretty URLs adds 0.04s, 2q)