mindwerks / plate-tectonics Goto Github PK
View Code? Open in Web Editor NEWA fork of platec http://sourceforge.net/projects/platec/
License: GNU Lesser General Public License v3.0
A fork of platec http://sourceforge.net/projects/platec/
License: GNU Lesser General Public License v3.0
It would be great to use travis for this
For convenience purposes I suggest that we can create the output directory if it does not exist.
We could use Appeveyor APIs to download artifacts from last successful build and upload them automatically to Pypi.
We should use this script also for WorldEngine and share it with @caseman to be used in noise
It seems more advanced and properly maintained
And test it!
We could use a simple GUI for non-programmer users
After the suggestion of tarTG/RTplatec#9 , I plan to refactor and modernizing this library.
Thus I have some questions:
Switching to c++14
This would allow to make the code a lot more efficient and readable, but would exclude some older compiler versions.
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.
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?
In particular the ones introduced by #27
Perhaps we can find some code formatter?
Given pyplatec has been moved to this project.
Use libmagick++ for this.
The video should show the various steps of the simulation and would be useful for debugging.
https://pypi.python.org/pypi/PyPlatec/1.4.0 is missing wheels for python 3.5 and 3.6 on windows. When I tried installing the requirements for worldengine, it gave me this: ValueError: path '/home/federico/repos/plate-tectonics/src/bounds.cpp' cannot be absolute
. Which can apparently be fixed by downloading a wheel binary. Similar problem: mkleehammer/pyodbc#77 mkleehammer/pyodbc#82 mkleehammer/pyodbc#132
A basic command line interface could be realized to use the library as a component in a larger pipeline or independently
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.
There are tons of warnings and the quality of code could and should be improved
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.
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:
I see the "Running the examples (C++)" and "How to run tests (C++)" section - but no mention how just to "run" it
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
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
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
How do I play PlaTec with this, on a windows 10 pc
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.
As done already in plate.cpp
So we would avoid manipulating pointers directly and reduce the usages of map_side (to make easier move to not-square maps)
Just leave a simulation example taking as params:
It would be great to take advantage from the speed improvements
Currently map side is used both for width and height
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?
While wheels are ok, the src dist does not contains the C++ code
Basically pyplatec should be integrated in here.
The main challenge seems in CI integration (no support for multiple languages on Travis or AppVeyor).
Probably checked in by mistake
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.
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).
An app To generate a small example map (for visual checking everything is fine)
...or any other proper build system
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.