Giter Site home page Giter Site logo

mindwerks / plate-tectonics Goto Github PK

View Code? Open in Web Editor NEW
83.0 83.0 24.0 5.33 MB

A fork of platec http://sourceforge.net/projects/platec/

License: GNU Lesser General Public License v3.0

CMake 0.75% PowerShell 0.09% Shell 1.05% C++ 80.92% Python 17.05% Batchfile 0.07% C 0.07%

plate-tectonics's People

Contributors

cycloverid avatar ftomassetti avatar newproggie avatar psi29a avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plate-tectonics's Issues

Simple GUI

We could use a simple GUI for non-programmer users

Refactoring and modernizing

After the suggestion of tarTG/RTplatec#9 , I plan to refactor and modernizing this library.
Thus I have some questions:

  1. Switching to c++14
    This would allow to make the code a lot more efficient and readable, but would exclude some older compiler versions.

  2. Library usage
    I would suggest to use libnoise for fractal generation and glm for mathematics. But in #7 (comment) you mention, not to use external libraries.

  3. Additional features
    In my fork, I have some additional features I needed, like runtime adjustment of parameters or terrain manipulation. Would you like to have such stuff also here or is this out of the scope of this project?

Generate a gif video

Use libmagick++ for this.
The video should show the various steps of the simulation and would be useful for debugging.

Small command line interface

A basic command line interface could be realized to use the library as a component in a larger pipeline or independently

How to install library in python 3.9

Download the source from here.
Extract.
In the pybindings folder, run "python setup.py sdist"
In the pybindings/distrubtion folder run "pip install .\PyPlatec-1.4.0.tar.gz"

A couple of caveats tho:
The data returned is in a list that is ordered col, row.

The provided documentation is incorrect. The create function requires 10 arguments in a specific order with data only. Look in the src/platesacp.hpp for a list of available functions.

Import and export from google protobuf

The library should be able to use a map serialized with protobuf as the input (instead of generating one with the diamond square algorithm).

It should also be able to save the output in google protobuf.

Basic introduction inadequate

Hi,
I tried the original project - platec (compiled and run it) and then I found this one and as it is newer I would like to try also this one. Only I was not able to run it. To build yes - both C and python, but I dont understand what then.

You might clarify following:

  • can I run also C binary directly? If yes, where is it? Does it takes the very same CLI arguments as original code?

I see the "Running the examples (C++)" and "How to run tests (C++)" section - but no mention how just to "run" it

  • Can you elaborate more that python bindings use? Such simple script would probably need to start with 'import platec', correct? But this fails because I am probably in wrong directory.

I found also pybinding/test/test_generation.py but this also did not work

I am interesting to use it for creation of maps for widelands game, I was using fractal method, that is good (comparing to manual creation), but I would also like to try this one. So the output of this would be at least png with height (no fancy colors, just B/W), or the better would be txt file with lines containing (x y height). I presume height 0 is just water.

Tibor

Works for python 3.9.7 if you install it manually but not through pip

On python 3.9.7:
if I download and run python setup.py build then python setup.py install it installs fine, but if i try installing it through pip I get an error. I've provided the error trace below.

Trace:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\anura\AppData\Local\Temp\pip-install-44bg093q\pyplatec_85548a435d534e13891adf2a57b1f157\setup.py", line 36, in
setup (name = 'PyPlatec',
File "C:\Python310\lib\site-packages\setuptools_init_.py", line 153, in setup
return distutils.core.setup(**attrs)
File "C:\Python310\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "C:\Python310\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "C:\Python310\lib\distutils\command\install.py", line 580, in run
self.run_command(cmd_name)
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\setuptools\command\install_egg_info.py", line 34, in run
self.run_command('egg_info')
File "C:\Python310\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "C:\Python310\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Python310\lib\site-packages\setuptools\command\egg_info.py", line 299, in run
self.find_sources()
File "C:\Python310\lib\site-packages\setuptools\command\egg_info.py", line 306, in find_sources
mm.run()
File "C:\Python310\lib\site-packages\setuptools\command\egg_info.py", line 541, in run
self.add_defaults()
File "C:\Python310\lib\site-packages\setuptools\command\egg_info.py", line 585, in add_defaults
self.read_manifest()
File "C:\Python310\lib\site-packages\setuptools\command\sdist.py", line 188, in read_manifest
self.filelist.append(line)
File "C:\Python310\lib\site-packages\setuptools\command\egg_info.py", line 483, in append
path = convert_path(item)
File "C:\Python310\lib\distutils\util.py", line 124, in convert_path
raise ValueError("path '%s' cannot be absolute" % pathname)
ValueError: path '/home/federico/repos/plate-tectonics/src/bounds.cpp' cannot be absolute

Verify types sized

We should use types with the same size on different platforms (e.g. uint32 instead of size_t).

Let's start checking which types are different on my Mac and on Travis

Mass values go below zero

This is because of floating point inaccuracies building up over MANY mass additions (determined by the length and size of the simulation). The code uses the crust height to determine mass. Both of these values are stored as floats. I've tried changing it to a double, but even I saw the inaccuracy build up fairly badly. The only other thing I can think of is to change these to fixed point numbers. If this option was chosen, it looks to be a big change that will require lots of testing.

Release new version

It would be great to take advantage from the speed improvements

  • fix 29 first
  • fix 30 first
  • set the version to 1.4.0
  • tag code
  • release on Pypi
  • upload wheels

Plate-tectonics to Sphere

This project is awesome and I am grateful that you put out it here. Is there a way to perform maths for the tectonic shifts on a sphere?

Import and export from png

The library should be able to use a png grayscale map as the input (instead of generating one with the diamond square algorithm).

It should also be able to save the output the png grayscale.

Revise acceptance tests

They should use a mock for the random generator (otherwise mac and linux give differently results) and then we should also recalculate values (the simplex generate different values).

Example app

An app To generate a small example map (for visual checking everything is fine)

Use CMake

...or any other proper build system

Adjustable ratio of continental and oceanic plates/land vs sea

Currently, the land/sea ratio seems to be fixed. Yes, the sea level can be adjusted, but that's not quite the same thing (and doesn't seem to work in the current release of WorldEngine).

In other words, what I'm missing is a way to modify the ratio of continental plates vs. oceanic plates. Currently, it seems that that hovers below 27% land (for just 3 plates), less if there are more plates (due to both more collisions and more divergence: the former reduces land area by piling it vertically, the latter primarily increases sea area). It would be nice to be able to pass the initial ratio as another argument.

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.