Giter Site home page Giter Site logo

chrispritchard / heightmaps Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 711 KB

A collection of heightmap generators, along with some bmp/ppm image format savers

License: The Unlicense

F# 100.00%
fsharp diamond-square-algorithm ppm-format sdl2 bmp-format perlin-noise simplex-noise

heightmaps's Introduction

Heightmaps

A collection of heightmap generators, along with some bmp/ppm image format savers.

Diamond Square. Perfect, but very, very slow Perlin noise. Famous from Tron Simplex noise. My eyes!

No external libraries have been used (except for the SDL C library), so this project will hopefully serve as a good reference source for a raw F# implementation of these algorithms.

Currently, Diamond Square, Perlin noise and Simplex noise have been implemented, with the PPM format (P6), BMP format (24bit) and a SDL renderer. You can find the implementations of each in the appropriately named F# files - each file is completely self contained.

The project is a console app. It will take command-line arguments to configure (instructions can be seen by running it with 'help', or seeing the definition in the code here.

If -bitmap or -ppm is not specified, the default is to render the generated image on a SDL surface. If so, the image can be regenerated using the R key, or the program can be quit using the escape key.

NOTE: some safe defaults, like the range reduction in diamond square and the perlin noise period cannot be set using the CLI tool. However, the algorithms are generally written so these variables are easy to override if needed.

The version of SDL shipped with this is for 64bit windows. Replacing the SDL.dll file with versions for other operating systems should work fine. Other versions can be found here.

heightmaps's People

Contributors

chrispritchard avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

heightmaps's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.