diff --git a/manual/Makefile b/manual/Makefile new file mode 100644 index 0000000..3112f98 --- /dev/null +++ b/manual/Makefile @@ -0,0 +1,192 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " applehelp to make an Apple Help Book" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + @echo " coverage to run coverage check of the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/WorldEngine.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/WorldEngine.qhc" + +applehelp: + $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp + @echo + @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." + @echo "N.B. You won't be able to view it unless you put it in" \ + "~/Library/Documentation/Help or install it in your application" \ + "bundle." + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/WorldEngine" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/WorldEngine" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +coverage: + $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage + @echo "Testing of coverage in the sources finished, look at the " \ + "results in $(BUILDDIR)/coverage/python.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/manual/biomes.rst b/manual/biomes.rst new file mode 100644 index 0000000..13fc956 --- /dev/null +++ b/manual/biomes.rst @@ -0,0 +1,108 @@ +Biomes, Temperature, and Humidity +================================= + +Worldengine uses a complex system to model the environment. For the ease of use for beginners Worldengine is setup to default to a planet with an ecological balance similar to Earth's. + +While the system is technically complex, in that it has multiple integrated parts, it is not terribly difficult to understand. In this document we will first explain the general model used for placing biomes and then explain how the user can alter different variables to produce non-terrestrial planets. + +Biomes +------ + +Worldengine implements a version of the `Holdridge life zones `_ model for the placement of biomes. While the standard Holdridge life zone model uses three axes Worldengine only concerns itself with the temperature and precipitation axes. + +.. image:: images/Holdridge.png + :align: center + :width: 95% + +As an example, an area of the planet that is **Boreal** in temperature and **Semiarid** in humidity will be classified as **Boreal Wet Forest**. + +While many people regard the |Koppen|_ system as superior it requires the ability to predict seasonal weather. This would require a highly complicated weather simulation system which Worldengine does not currently have. As a result all Temperature and Humidity values are given in terms of yearly averages. + + +.. |Koppen| replace:: K |o| ppen climate classification +.. _Koppen: https://en.wikipedia.org/wiki/K%C3%B6ppen_climate_classification + +.. |o| unicode:: 0xf6 .. Latin small o with diaeresis + :trim: + +There are thirty nine different land biomes. Most cells hold a single biome and most biomes occupy a single cell. The notable exceptions are Polar Ice which occupies two cells and the biomes of the **Warm Temperate** and **Subtropical** regions, each of which occupy only half a cell. + +Biomes are then grouped into larger and broader categories such as **Ice**, **Tropical Rain Forest**, and **Mixed Forests**. In the image above the various biomes of each category have been color coded and surrounded by thicker lines with a key to the different groups provided in the upper left corner. + +Temperature and Humidity +------------------------ + +As mentioned above Temperature and Humidity are expressed in Worldengine as yearly averages. We do not yet have a complex weather simulating system that is capable of handling seasonal changes. + +Worldengine works largely in unitless numbers. What this means is that a value of .5 for something such as Humidity does not mean that it has twice as much water as an area with a value of .25. All that can really be interpreted directly from this number is that it has a greater amount of water, but it is not possible to say exactly how much. + +It is the command line options of **--temps** and **--humids** that convert those unitless values into the actual Temperature and Humidity ranges. The way these values work is to define what percentage of the total land terrain is to be considered a certain value or lower (where lower is considered to be either colder or drier depending upon which variable is specified). + +As an example the default value for **--temps** is .126/.235/.406/.561/.634/.876. Thus, the first point of separation is at 12.6%. This in turn means that 12.6% of the land mass will be **Polar**. The next point of separation occurs at 23.5% which means that 23.5% of the land mass will be either **Polar** or **Subpolar** (and since 12.6% of the landmass is **Polar** that leaves only a remaining 10.9% to be **Subpolar**). + +By altering these values one can make a planet that is either hotter or colder, wetter or drier. A **--temps** value of 0/.126/.235/.406/.561/.634 will result in a planet with no locations with a **Polar** climate and 36.6% of the planet having a **Tropical** climate (as opposed to 12.4% for the default). + +Temperature/Humidity Curve and Scatter Plots +-------------------------------------------- + +One thing that many people may notice in the Holdridge life zones chart given above is that as regions get colder the maximum amount of water that they may receive decreases. If Worldengine were to simply generate values for Humidity independent of Temperature a significant portion of the simulated planet would receive too much average rain fall. While Worldengine is able to handle such an occurrence (it simply treats the terrain as recieving the maximum water possible) this still produces less than ideal results. To correct this problem Humidity undergoes a mathematical transformation designed to produce results more in line with those of a terrestrial planet. + +At its heart the mathematical operation is not too complicated. Both Temperature values and Humidity values are normalized to a range of 0 to 1. The Temperature value is then fed into a function that returns a new value that also has a range of 0 to 1. The original Humidity value is multiplied by this number and the new Humidity value is determined. + +If we assume for just a moment that the value of **-gv** is 1 then the Temperature function is relatively simple. It is a straight line that runs from **-go** to 1 as Temperature runs from 0 to 1. Thus, on the default settings (**-go** = .2) we would multiply the original Humidity value by .2 when Temperature is 0 and we would multiply it by 1 when the Temperature is 1. If we were to use a straight line (**-gv** = 1) then we would multiply by .6 when Temperature is .5, .4 when the Temperature is .25, etc. We do this because without the offset value (**-go**) we find that we are multiplying by numbers that are too small at the coldest end of the Temperature scale resulting in too much **Polar Desert** terrain. + +While this offset gives us better results in the colder ranges we find that unfortunately it has a tendency to push the average rainfall up a bit too much in the middle ranges. In order to correct for this we use the following function: + +.. math:: + f(Temperature) = Temperature ^{GV} + +where "GV" is the **-gv** variable. This is the same basic function that is used in `gamma correction `_ and so we have appropriated the term "gamma value" and "gamma offset" to describe our variables (although to be technical our function is not actually a gamma curve). + +It should be noted for technical reasons that the curve is actually calculated first, then compressed and shifted by amounts determined by the offset variable (**-go**). This means that the value for f(Temperature) will always range from the offset variable to 1. + +To ensure that the **-gv** and **-go** variables are producing a good curve it may be desirable to generate a scatter plot when the planet is being created. + +.. only:: html + + .. image:: images/scatter_plot_example.png + :align: center + +.. only:: latex + + .. image:: images/scatter_plot_example.png + :align: center + :width: 50% + + + +Each point on this plot is a single point on the landmass of the planet. The Temperature runs across the bottom, ranging from **Polar** to **Tropical** while the Humidity runs along the side, ranging from **Superarid** to **Superhumid**. Lines are drawn to show the dividing point between various Temperature and Humidity ranges. While the current routine does not label the rows and columns the following image is provided to help understand how they correspond to the chart: + +.. only:: html + + .. image:: images/scatter_plot-labelled.png + :align: center + +.. only:: latex + + .. image:: images/scatter_plot-labelled.png + :align: center + :width: 35% + + +Cells in grey are ones which do not technically occur in the standard Holdridge life zone model and as the example above shows there are certain areas of terrain in the example that are both **Polar** and **Semiarid**. Since there are not too many of them we will not concern ourselves as Worldengine will simply treat them as **Polar** and **Arid** (i.e. classify them as **Polar Ice**). + +Biome Images +--------- + +The following is the color key for biome images, both showing the color and providing the hex code for the color: + +.. only:: html + + .. image:: images/Biomes.png + :align: center + +.. only:: latex + + .. image:: images/Biomes.png + :align: center + :width: 75% diff --git a/manual/cli.rst b/manual/cli.rst new file mode 100644 index 0000000..06fbc7c --- /dev/null +++ b/manual/cli.rst @@ -0,0 +1,100 @@ +Command line interface +====================== + +Using the command line you can issue one single command and let WorldEngine generate a world for you. + + worldengine [options] [world|plates|ancient_map|info] + + +General options +~~~~~~~~~~~~~~~ + ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| Short | Long | Description | ++============+======================+===============================================================================================================================+ +| -o DIR | --output-dir=DIR | generate files in DIR default = '.' | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -n STR | --worldname=STR | set world name to STR | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| | --hdf5 | save world using protocol buffer format [default: protocol buffer format ] | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -s N | --seed=N | use SEED to initialize the pseudo-random generation | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -t STR | --step=STR | use STEP to specify how far to proceed in the world generation process. Valid values are: plates precipitations full | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -x N | --width=N | WIDTH of the world to be generated | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -y N | --height=N | HEIGHT of the world to be generated | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -q N | --number-of-plates=N | number of plates | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| | --recursion-limit=N | you need that just if you encounter an error while generating very large maps | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| -v | --verbose | Enable verbose messages | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| | --version | Display version information | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ +| --bw | --black-and-white | Draw maps in black and white (currently affects only the precipitation and temperature maps) | ++------------+----------------------+-------------------------------------------------------------------------------------------------------------------------------+ + + +Options valid only for generate +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| Short | Long | Description | ++===========+============================+================================================================================================================================================+ +| -r FILE | --rivers=FILE | Produce a map of rivers, after the option it expects the name of the file where to generate the map | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| --gs | --grayscale-heightmap | Produce a grayscale heightmap | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | --ocean_level=N | Elevation cut off for sea level [default = 1.0] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | --temps #/#/#/#/#/# | Specify the quantiles used to identify the temperature levels. It should contains values in [0,1]. [default = .126/.235/.406/.561/.634/.876] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | --humidity #/#/#/#/#/#/# | Specify the quantiles used to identify the humidity levels. It should contains values in [0,1]. [default = .059/.222/.493/.764/.927/.986/.998] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| -gv N | --gamma-value N | N = Gamma value for temperature/precipitation gamma correction curve. [default = 1.25] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| -go N | --gamma-offset N | N = Adjustment value for temperature/precipitation gamma correction curve. [default = .2] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | ---not-fade-borders | Avoid fading borders | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | --scatter | Generate temperature vs. humidity scatter plot | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ +| | --sat | Generate satellite map | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+ + +Options valid only for ancient map operations +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| Short | Long | Description | ++===========+============================+======================================================================================================+ +| -w FILE | --worldfile=FILE | WORLD_FILE to be loaded | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| -g FILE | --generatedfile=FILE | name of the GENERATED_FILE | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| -f N | --resize-factor=N | resize factor | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| | --sea_color | help="string for color [blue|brown], [default = brown] | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| | --not-draw-biome | Not draw biome | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| | --not-draw-mountains | Not draw mountains | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| | --not-draw-rivers | Not draw rivers | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ +| | --draw-outer-border | Draw outer land border | ++-----------+----------------------------+------------------------------------------------------------------------------------------------------+ + +Export options +~~~~~~~~~~~~~~ + ++-----------+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| Short | Long | Description | ++===========+============================+================================================================================================================================+ +| | --export-format=FORMAT | Export to a specific format such as BMP or PNG. See http://www.gdal.org/formats_list.html for possible formats [default = PNG] | ++-----------+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ +| | --export-datatype=TYPE | Type of stored data, e.g. uint16, int32, float32 etc. [default = uint16] | ++-----------+----------------------------+--------------------------------------------------------------------------------------------------------------------------------+ \ No newline at end of file diff --git a/manual/conf.py b/manual/conf.py new file mode 100644 index 0000000..4cbaeac --- /dev/null +++ b/manual/conf.py @@ -0,0 +1,284 @@ +# -*- coding: utf-8 -*- +# +# WorldEngine documentation build configuration file, created by +# sphinx-quickstart on Tue Nov 3 17:55:45 2015. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys +import os +import shlex + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +#sys.path.insert(0, os.path.abspath('.')) + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'WorldEngine' +copyright = u'2015, Bret Curtis and Federico Tomassetti' +author = u'Bret Curtis and Federico Tomassetti' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.19' +# The full version, including alpha/beta/rc tags. +release = '0.19.0' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Language to be used for generating the HTML full-text search index. +# Sphinx supports the following languages: +# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja' +# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr' +#html_search_language = 'en' + +# A dictionary with options for the search language support, empty by default. +# Now only 'ja' uses this config value +#html_search_options = {'type': 'default'} + +# The name of a javascript file (relative to the configuration directory) that +# implements a search results scorer. If empty, the default will be used. +#html_search_scorer = 'scorer.js' + +# Output file base name for HTML help builder. +htmlhelp_basename = 'WorldEnginedoc' + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', + +# Latex figure (float) alignment +#'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'WorldEngine.tex', u'WorldEngine Documentation', + u'Bret Curtis and Federico Tomassetti', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'worldengine', u'WorldEngine Documentation', + [author], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'WorldEngine', u'WorldEngine Documentation', + author, 'WorldEngine', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False diff --git a/manual/contributing.rst b/manual/contributing.rst new file mode 100644 index 0000000..56be9e8 --- /dev/null +++ b/manual/contributing.rst @@ -0,0 +1,4 @@ +Contributing +====================== + +We are always very happy to receive new contributions and we are ready to help you working on your first patches. \ No newline at end of file diff --git a/manual/gui.rst b/manual/gui.rst new file mode 100644 index 0000000..b1feb9d --- /dev/null +++ b/manual/gui.rst @@ -0,0 +1,4 @@ +GUI +====================== + +Ok, you prefer graphical interfaces: we got you covered. \ No newline at end of file diff --git a/manual/images/Biomes.png b/manual/images/Biomes.png new file mode 100644 index 0000000..de8e85c Binary files /dev/null and b/manual/images/Biomes.png differ diff --git a/manual/images/Holdridge.png b/manual/images/Holdridge.png new file mode 100644 index 0000000..7c019f3 Binary files /dev/null and b/manual/images/Holdridge.png differ diff --git a/manual/images/scatter_plot-labelled.png b/manual/images/scatter_plot-labelled.png new file mode 100644 index 0000000..84f895e Binary files /dev/null and b/manual/images/scatter_plot-labelled.png differ diff --git a/manual/images/scatter_plot_example.png b/manual/images/scatter_plot_example.png new file mode 100644 index 0000000..c533d1d Binary files /dev/null and b/manual/images/scatter_plot_example.png differ diff --git a/manual/index.rst b/manual/index.rst new file mode 100644 index 0000000..a144b3d --- /dev/null +++ b/manual/index.rst @@ -0,0 +1,24 @@ +WorldEngine - the best open-source world generator +================================================== + +WorldEngine has the goal to be the best open-source world generator available. It is based on the simulation of several physical phenomens. + +Our philosophy is to build a tool very flexibile, which can be used from the command line, in a GUI or as a component inside other programs. + +WorldEngine can be very easy to use: you click a button and you get a nice world generated for you. + +It can also be very complex: do you want to set specific temperature or humidity ranges for your world? Specify a strange ratio for your map? You can. + +We think that most advanced users could want to use WorldEngine as a part of larger tool-chain: you give some draft of your world to WorldEngine, it performs some extra simulations for you, making your world more realistic, and then you feed the result from WorldEngine into another tool of yours or perhaps you refine manually your results. + +So WorldEngine can be used in different ways. Let's see how. + +Contents: + +.. toctree:: + install + cli + gui + biomes + scenarios + contributing diff --git a/manual/install.rst b/manual/install.rst new file mode 100644 index 0000000..e019bae --- /dev/null +++ b/manual/install.rst @@ -0,0 +1,4 @@ +Install +====================== + +WorldEngine will not be any good for you if you do not manage to install it first. Let's see how to do that. \ No newline at end of file diff --git a/manual/make.bat b/manual/make.bat new file mode 100644 index 0000000..02bdd27 --- /dev/null +++ b/manual/make.bat @@ -0,0 +1,263 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + echo. coverage to run coverage check of the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +REM Check if sphinx-build is available and fallback to Python version if any +%SPHINXBUILD% 2> nul +if errorlevel 9009 goto sphinx_python +goto sphinx_ok + +:sphinx_python + +set SPHINXBUILD=python -m sphinx.__init__ +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +:sphinx_ok + + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\WorldEngine.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\WorldEngine.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %~dp0 + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "coverage" ( + %SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage + if errorlevel 1 exit /b 1 + echo. + echo.Testing of coverage in the sources finished, look at the ^ +results in %BUILDDIR%/coverage/python.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +:end diff --git a/manual/scenarios.rst b/manual/scenarios.rst new file mode 100644 index 0000000..05019b7 --- /dev/null +++ b/manual/scenarios.rst @@ -0,0 +1,4 @@ +Usage scenarios +====================== + +In this section we present typical usage scenarios. They could help you figure out what WorldEngine can be used for. \ No newline at end of file