Giter Club home page Giter Club logo

theworldisnotflat / shriveling_world Goto Github PK

View Code? Open in Web Editor NEW
9.0 4.0 4.0 41.14 MB

The "shriveling_world" project aims at producing images of the global geographical time-space, using the third dimension, as in time-space relief maps. The word "shriveling" was introduced by Waldo Tobler in his comments of Mathis-L'Hostis time-space relief image, in order to describe the complex contraction process suggested by the model.

License: GNU General Public License v3.0

JavaScript 6.04% HTML 0.50% TypeScript 83.49% GLSL 5.42% Python 1.34% Svelte 3.21%
waldo-tobler geography transportation timespace

shriveling_world's Introduction

Shriveling world

The shriveling world project aims at producing images of geographical time-space, using the third dimension. The word shriveling was introduced by Waldo Tobler in his analysis of Mathis-L'Hostis time-space relief images, to describe the complex contraction process suggested by the model. The project consists in:

For citation please refer to L’Hostis, A.; Abdou, F. What is the Shape of Geographical Time-Space? A Three Dimensional Model made of Curves and Cones. Int. J. Geo-Inf. 2021, 10(5), 340.

Chinese geographical time space in 2014

This is the first representation of geographical time-space with cones and curves, produced by the application Shriveling world with post-treatments in Blender, applied to China and Taiwan.

Road map

Licence

As an open science initiative the project follows the GNU General Public License v3.0 rules. Contributions are welcome!

shriveling_world's People

Contributors

alainlhostis avatar amauryval avatar bakaniko avatar billkarkariy avatar dependabot[bot] avatar djfrancesco avatar kaktus40 avatar phbrbr avatar saamus avatar shriveling avatar theworldisnotflat avatar thomleysens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

shriveling_world's Issues

Project networks on the cônes surface

In order to improve the legibility of the representation
Simple cones with uniform color do not convey the idea of the continuity of the geographical surface
In order to improve the model, it is proposed to allow for projecting a given network, the road network identified by its associated codes, onto the surface of cones

Make transport networks (de)selectable (optionnally visible/considered)

Is your feature request related to a problem? Please describe.
Only one possibility at present: produce a shriveled map with exactly the modes present in the input files

Describe the solution you'd like
this possibility would allow for producing different states of the model with different sets of modes by deselecting one or more mode of transport modes/networks.
This new selection should

  • UI
  • remove from the representation the deselected transport modes, id est all the networks of these deselected transport modes
  • do NOT allow to deselect the (mandatory) road mode
  • potentially alter "vmax" if e.g. airplanes are deselected
  • alter the legend accordingly
  • alter the exported file

Describe alternatives you've considered
This would be more convenient than preparing a full new dataset

Recenter scene when the image is empty

Is your feature request related to a problem? Please describe.
Sometimes while navigation with a mousepad or mouse we lose view of the cones and edges and it may be difficult to view them again

Describe the solution you'd like
a command that would recenter the scene, or even better maximising the view of the elements in the window

Describe alternatives you've considered
for the time being it is faster to reload the page and drag and drop the files

Commenting the code

  • @kaktus40 implements automatic doc generation
  • equations and figures should be stored in a stable URL and referred to in the documentation; equations and figures are in the annex of IEEE article
  • this issue is a long running effort to document the code to allow for a future more open development

Cones geometry (slope) is wrong

Issues in the slope of cones:

  1. Cones geometry (slope) varies significantly between unprojected and projected representation, which is not expected
    this is the unprojected view, look at Urumqi (left) slopes with the other cities of mainland China; the ratio is about 1 to 5 (which still is short of the theoretical 7.5)
    selection_031
    Now the same view with equirectangular projection; the ration is close to one to 3
    selection_030

  2. measurement with the ruler shows inconsistency between visual ratio and theroretical speed ratio (see point 1)

colors of links are messed up when editing trasparency of links

Describe the bug
colors tend to concern several modes when transparency is modified

To Reproduce
Steps to reproduce the behaviour:

  1. Go to 'controls'
  2. Click on 'lines', 'terrestrial modes'
  3. set a different colour to 'Train' or 'Expressway'
  4. then modify aircraft 'transparency'
    5 the colour of aircraft is attributed to all

Expected behavior
this should simply not happen

Workaround

  1. set transparencies for good
  2. set colors

Fuite de mémoire dans les cities

Si on ouvre edges, on a les allers-retours se répètent si on y accède: boucle et chargement en mémoire

Wien -> Stutgart
Stutgart -> Wien
Wien -> Stutgart
Stutgart -> Wien
....
Cela induit une grosse consommation de mémoire.

Generate complex cones and "horse saddles"

The model should allow to generate several different forms of geographical time-space, with choice given to the user

  • simple cone: basic slope of cone is given by slowest road mode (regular road circa 80 kph or motorway 100 kph); this for has a symetry of revolution
  • complex cone : other terrestrial transport mode edges in the network may deform locally the slope of the cone until the new slope: e.g. 250 kph high speed train line will deform the cone shape so that the ratio 7.5 will be deformed to 3 along the HST line; the user should decide whether she or he wants to allow a given transport mode to deform the surface, because then it means assuming the transport system is spatially continuously accessible; questionable for expressway or HST.
  • horse saddle more complex forms should also be developed like the proposed horse "saddle", that we can't decently call a complex cone; the basic structure will be simple cones of a slow speed transport mode completed by a structure based on a different (faster) transport mode

proposed drawing here.

Safari bug prevents downloading all exported files

A known bug in Safari browser prevents downloading multiple files at once.
It could be mitigated (see below) and a possible solution could eventually benefits users/other browsers.

Steps to reproduce the behavior:

  1. Click on 'Save scene'
  2. Get only 1 obj file instead of 3

Expected behavior
Be able to get all exported 3D data with Safari (maybe without waiting for Apple to fix the bug)

Desktop:

  • macOS 10.15.7
  • Safari 14.0 (with WEBGL2 activated via Developper Menu > Experimental features)

Additional context
IMHO even if Safari sometimes lags behind Chrome or Firefox concerning implemented features (less releases), it is a robust browser with nice dev tools. It made me rethink about the way the scene is exported as a user.

Generating a .zip file with all the .obj files inside could be a solution? Structuring the scene to export as a single file could be another one…

A few links I found about it:

I know it sounds like a feature request but let me know what you think.

Cheers.

"extension `GL_ARB_gpu_shader5' unsupported in vertex shader"

when loading the app in web browser, an error message shows in console:
In Chromium:
[.WebGL-0x56087d1b8bb0]GL ERROR :GL_INVALID_ENUM : glGetIntegerv: pname was GL_MAX_SAMPLES_ANGLE

In firefox

THREE.WebGLRenderer 103 shriveling.js:2:292410
THREE.WebGLShader: gl.getShaderInfoLog() vertex 0:2(12): warning: extension `GL_ARB_gpu_shader5' unsupported in vertex shader
 
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME LineBasicMaterial
4: #define VERTEX_TEXTURES
5: #define GAMMA_FACTOR 2
6: #define MAX_BONES 0
7: #define BONE_TEXTURE
8: uniform mat4 modelMatrix;
9: uniform mat4 modelViewMatrix;
10: uniform mat4 projectionMatrix;
11: uniform mat4 viewMatrix;
12: uniform mat3 normalMatrix;
13: uniform vec3 cameraPosition;
14: attribute vec3 position;
15: attribute vec3 normal;
16: attribute vec2 uv;
17: #ifdef USE_TANGENT
18: 	attribute vec4 tangent;
19: #endif
20: #ifdef USE_COLOR
21: 	attribute vec3 color;
22: #endif
23: #ifdef USE_MORPHTARGETS
24: 	attribute vec3 morphTarget0;
25: 	attribute vec3 morphTarget1;
26: 	attribute vec3 morphTarget2;
27: 	attribute vec3 morphTarget3;
28: 	#ifdef USE_MORPHNORMALS
29: 		attribute vec3 morphNormal0;
30: 		attribute vec3 morphNormal1;
31: 		attribute vec3 morphNormal2;
32: 		attribute vec3 morphNormal3;
33: 	#else
34: 		attribute vec3 morphTarget4;
35: 		attribute vec3 morphTarget5;
36: …
shriveling.js:2:242692
THREE.WebGLShader: gl.getShaderInfoLog() fragment 0:2(12): warning: extension `GL_ARB_gpu_shader5' unsupported in fragment shader
 
1: precision highp float;
2: precision highp int;
3: #define SHADER_NAME LineBasicMaterial
4: #define GAMMA_FACTOR 2
5: uniform mat4 viewMatrix;
6: uniform vec3 cameraPosition;
7: #define TONE_MAPPING
8: #ifndef saturate
9: 	#define saturate(a) clamp( a, 0.0, 1.0 )
10: #endif
11: uniform float toneMappingExposure;
12: uniform float toneMappingWhitePoint;
13: vec3 LinearToneMapping( vec3 color ) {
14: 	return toneMappingExposure * color;
15: }
16: vec3 ReinhardToneMapping( vec3 color ) {
17: 	color *= toneMappingExposure;
18: 	return saturate( color / ( vec3( 1.0 ) + color ) );
19: }
20: #define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )
21: vec3 Uncharted2ToneMapping( vec3 color ) {
22: 	color *= toneMappingExposure;
23: 	return saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );
24: }
25: vec3 OptimizedCineonToneMapping( vec3 color ) {
26…
shriveling.js:2:242692

World and World_1M crash the app.

Describe the bug
When selecting World or World_1M data the app doesn't work anymore. The page needs to be reloaded.

On macOS Catalina (Version 10.15.7):

  • In Safari 14 console log:
    Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'w[t].speed')
  • In Firefox 81 console log:
    Uncaught (in promise) TypeError: w[t] is undefined

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'World' or 'World_1M'
  2. Open Console
  3. See error

Expected behavior
Error management, for example display an alert for the user ( imported dataset is corrupted , something went wrong or anything useful). It should not crash the app.

Firefox Issue

Cones are not rendererd in firefox (version 65.0.0.6963) - OS : Windows

vertical scrolling not working at the beginning

Describe the bug
Vertical scrolling of the scene, whether with the arrow key, whether with the mousepad by type the Maj key does not work. Only horizontal scrolling is available, not permitting to zoom efficiently the scene. This issue is present untill a change of view angle has occured

To Reproduce
Steps to reproduce the behavior:
1 run the app
2 drop a data set'
3. type up or down arrow key or press maj key while click and move pad
4. no vertical scrolling is achieved

workaround
1 rotate the scene : click pressed while move mousepad
2 vertical scrolling becomes available

Expected behavior
access to vertical scrolling

Desktop (please complete the following information):

  • OS: Ubuntu
  • Browser Firefox 72
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

'coeficcient' UI should disappear

@CodeInLight : 'coeficcient' UI should disappear because no longer necessary
to obtain falt edges simply change 'nombre de points' to value 0

Clean population and network csv file

The PR #33 add a script to clean city files from to close cities.

The script needs to be extended to population and network files so they will be lighter to compute too.
Especially for small subset like the China one

This script can be extended to create sample datasets too.

export continents as well as cones and links

Is your feature request related to a problem? Please describe.
in the aim of a manual operation in Blender or Houdini of cutting the cones with the shoreline, it would be good to export the shapefile of continents with the thrre d structure

Describe the solution you'd like
export continents

Describe alternatives you've considered
as done by @phbrbr in Blender import a shoreline in the chosen projection and manually adjust it to the cities

Find a better name

I feel 'shriveling world' is not the best idea to name the project, I wish we could find a better name!

Improve lights

Improve lights so that cones relief is more visible in

Generate a single surface

Generate a single surface from the cones (cleaning up the down side of the merged cones), or a thin volume
The surface of a cone should not extend beyond the intersection with another neighboring cone

ICity : présence de champs excédentaires

Les champs pop1950, pop1955, ... se retrouvent dans attributs et dans un tableau

fonction merger() lit les csv et crée les objets à l'aide des interfaces

parametres: girlPropertyToRemove: TRUE/FALSE

A ton besoin d'avoir l'information en double ?

export with edges produces unintended three d structure

All is said in this image in Blender below

  • with the sample dataset (China)
  • tested with unprojected and projected representation
    All edges seem to start at a kind of center of the earth, even in this unprojected example
    Thanks for helping
    Alain
    image

Cones remain black

whatever the light parameters, they stay fully black.
Tested with Chromium and Firefox.
This happened after an update in september 2019
possibly related to issue #53

THREE.WebGLRenderer 98 error

Hi,

I tried this project into a Ubuntu 18.04 virtual machine with Chromium and Firefox web browsers.

It didn't worked as expected. Symptoms were :

  • Chromium 71.03578 : Interface present, white background, calcul de FPS (between 5 and 15)
  • Firefox 64.0 : no interface, black background, FPS window present but inactive

The capture below show the firefox example:

image

Both browsers display a THREE.WebGLRenderer 98 error. Firefox gives us more context.

Thanks,

Nicolas

Time-scale

Time-scale. Each view of the shrivelled earth model is associated with a time-scale. This time-scale should evolve when zooming and de-zooming and when changing epoch.
Time scale could show the speed ratio as a figure like 7.5 the ratio between air and road transport

  1. network links with slopes
  • hover info with modes speed
  • hover info with angle alpha value
  • hover info with kilometres linked to zoom level
  • UI to fix a given km amount in the scale (cleaner than adjusting with mouse)
  • UI to optionally show/not show the legend
  • export to txt
    • year
    • speed kph mode 1
    • speed kph mode 2
    • etc.
  • (add the graphical elements of the legend to export 3D scene not relevant because legend is 2D)
  1. Time-scale (floating as such, different from 1.)
    Basics of the computation:
    At loading of dataset need to have 1 cm of screen = duration in hours
    a. chose two given cities u and v in the dataset
    b. compute length in km of geodesic Lkm
    c. retrieve vec3d uv on "screen" 3d coordinates (in 3D before projecting on the 2d screen)
    d. rotate vec3d uv (without zooming) to align with the plan of the screen
    e. retrieve new (hypothetical) coordinates of u and v on screen, measure Luvcm
    f. use Smax to compute Lhours = Lkm / Smax
    g. at this stage the time-space scale can state Luvcm <-> Lhours for a geographical distance of Lkm
    h. round the value of Lhours and adjust Luvcm proportionally (for readability purpposes)
  • need to be connected to the zoom level (1 cm = x hours)
  • showing by default up right
  • moveable by mouse
  • Indicate duration, with rounded values
  • Possibility to adjust with mouse (with value jumping from 2 to 3 hours)
  • Possibility to set a given duration ? (not needed if previous solution is functioning well)

Lacks of CONTRIBUTING.md and Licence.md

I think, in order to prepare for opening this code, that this project should provide some files to provide informations to newcomers :

  • LICENCE.md with the choosen license text
  • CONTRIBUTING.md : how people can contribute to the code
  • CONTRIBUTORS.txt : list of contributors
  • Code of conduct (optional but needed if the community starts to grow)

There is more information provided on the opensource.guide/how-to-contribute page.

To help to choose a the license, there are several ressources:

There is also a template for the CONTRIBUTING.md file:

Modify height of cones on the fly

Tried various values in the console in Chromium and has no effect on the height of cones:

shriveling.configuration.intrudeHeightRatio=2
shriveling.configuration.intrudeHeightRatio=200
shriveling.configuration.heightRatio=2
shriveling.configuration.heightRatio=1

Nothing changes basically, this is an old feature introduced by @kaktus40 and documented in the readme.md file; is it still working?
By the way, I never understood the difference between the two variables !
While other instructions work such as:
shriveling.configuration.pointsPerLine=1

Renaming "edges" to "link" in code

Is your feature request related to a problem? Please describe.
edges are classically naming links between nodes in graph theory
edges also describe limits between, facets of a three d polygon

both concepts are used in the model

Describe the solution you'd like
rename "edges" into "links" in code when relevant

coneStep change give unintended results

@CodeInLight : The value of coneStep can be modified from the user interface.
changing the default value (15) to a greater value generates deformed cones and not the intended more detailed cones (more facets)

gulp doc has errors, generates empty doc

Describe the bug
gulp doc has errors linked to the package "handlebars": "^4.7.2", generates empty doc

To Reproduce
Steps to reproduce the behaviour:

  1. Go to console
  2. type 'gulp doc'
  3. See error

Expected behaviour
error messages in log but also lines of the doc do not show

tried but failed

  • add handlebars package
  • add handlebars package in older version 4.5
    • gulp doc runs without errors
    • but generates "found 6 high severity vulnerabilities"

Introduce political boundaries

Following a remark made by Waldo Tobler on the early representations that he found "difficult to understand, in part, I think, because political boundaries, or other identifying information, were not shown" in 2016, it would be interesting to test to "map" a coloured map of world countries, or a map with countries contours.
To do this it is necessary to have the possibility to "map" this image on the surface of cones.

Hugo links broken while navigating the website

Describe the bug
Navigating the Hugo website fails after a few pages

To Reproduce
Steps to reproduce the behavior:

  1. Open website
  2. Open a page in the dev doc
  3. Then click on the central link in black "Developper documentation"
  4. See error : url adds t the previous url, error in the navigator

Restructure the options to draw links or change cones slope

Is your feature request related to a problem? Please describe.

  • I wish to deactivate the feature that HST slope is attributed to HST served cities/cones, as in issue #43 (comment) (done)

Describe the solution you'd like
Dataset should include new columns, in the file "transport_modes.csv":

  • to be created curvesPosition with four possible values
  • user interface
  • functional (UI connected to code)
    • above
    • below
    • belowWhenPossible option needing an algorithm not yet written
    • stickToCone (in the case of complex cones)
  • points per line at terrestrial mode level
    • user interface
    • functional (UI connected to code)

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.