Giter VIP home page Giter VIP logo

randterrainpy's Introduction

RandTerrainPy

This is a random terrain generator for Python.

(If you're interested in contributing, then email me at [email protected].)

License

This project is licensed under the MIT license (MIT).

Requirements

This software requires matplotlib (>=1.5), and numpy (>=1.6).

Installation

This program can be installed by downloading the software and entering

python setup.py

within the main directory.

Features

  • 3d Terrain class
    • Grid of heights between 0 and 1
    • Addition and subtraction of Terrains, multiplication with scalar
    • Basic string representation
    • 2d and 3d graphical representations
      • Uses matplotlib for 3d, top-down greyscale for 2d
    • Saving and loading terrains (uses .terr format)
    • Voronoi diagram version of terrain
      • Regions defined by closest positions on 2d grid to points
      • Input set of points to make regions around
      • Can alter heights of all points in a region
      • Uniform randomly generated center points
      • Lloyd relaxation
      • Linear interpolation of heights of points to feature points within participant regions, predefined coefficients
        • Height of point += sum(coefficients[i]*distances_to_closest_feature_points[i] for i in range(len(coefficients)))
        • Can choose to add on heights from feature points or not
    • Terrain erosion
      • Thermal erosion
  • Terrain generators
    • Diamond square algorithm
      • Takes noise color function (from frequency to amplitude)
      • Red, pink, white, blue, and violet preset noises
    • Perlin noise
      • Choice of grid size and size of grid squares
      • Choice of linear or cubic smoothing
    • Random Voronoi diagram (see above)

randterrainpy's People

Contributors

jackromo avatar

Stargazers

 avatar Shashank avatar  avatar nil avatar Sijie Chen avatar Thomas Stucky avatar Giovanni Allegri avatar Saimon avatar

Watchers

James Cloos avatar  avatar Evgeniy Stolyarov avatar

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.