FoldingSpace / enfolding

a prototype geographical imagination system (gis)
https://foldingspace.github.io/enfolding/
20 stars 1 forks source link

3D: morphing manifolds #14

Open nicklally opened 7 years ago

nicklally commented 7 years ago

When a new manifold is created in the 3D view, have it morph from the previous manifold. This will be relatively easy if they have the same number of points, but more difficult if the number differs.

geoglrb commented 7 years ago

Is this to be handled by three.js or upstream? I can imagine a variety of places where this could conceivably occur.

nicklally commented 7 years ago

I picture it being a simple javascript function that calculates intermediary distances between corresponding points in the initial and modified manifolds (which are store as js objects). Probably using a percentage of the distance to make it 'ease into' the new manifold.

geoglrb commented 7 years ago

So, d3.js makes this kind of thing simple: https://github.com/d3/d3-transition

nicklally commented 7 years ago

idea: in the 3D view, have a button that allows you to save the current state, which adds it to a clickable list of states. when a previous state is clicked, the manifold morphs into it (will only work on manifolds with the same number of nodes, which makes sense for many topological concepts as they've been described in geography)