Comments (3)
I'll look at this soon, its a good test case. It looks like we have a graph with A at the centre with all the other letters as nodes that should fan out in a circle. For the moment, you might need to adjust the parameters of the simulation. (the repulsion force between nodes and the tension parameters of the springs to bring it into stability.)
I'm a convert to Erin Catto's "Buddha Springs" concept from his GDC 2011 - Box2D presentation for this class of simulation. (do a quick google search on "physics buddha springs") They are the way forward for this code base.
from psarbortouch.
Hi Ed,
not sure you got my email - for continuity in discussion I ported (hacked) some of your classes over to use Erin Catto box2d with ccbox2d / physics engine.
https://github.com/jdp-global/CCBox2D-Physics
it's a work in progress.
JP
from psarbortouch.
Finally got some time to look at this. A few things;
- Parameters of the simulation
- Screen space to normalised simulation space coordinate conversion
Yes, without adjusting the parameters of the simulation (the simulation created by the inbuilt physics engine) it will go crazy. Try setting the mass of node "a" to a higher value if its going to be pulled in random 26 directions of different forces. You could also make node "a" fixed in space with infinite mass.
To get the effect you are looking for, you need to balance out the spring forces, mass of nodes, and dampening coefficient. Light objects with strong spring forces will move quickly. Higher dampening can get that "moving in water" effect.
Also, note that the simulation as a whole (all the notes) will drift and move in its own coordinate space unless one of them is fixed in space. That's is why there is camera like view port to zoom and pan to display all of the nodes. Since the camera moves with the simulation centring on it and zooming so that all nodes are in view
I'm almost certain that the code for translating from "screen space" to normalised simulation space is broken in this code base. Going from normalised simulation to "screen space" looks right. I get some crazy behaviour when tapping to drag nodes as if the values are orders of magnitude off.
Good to hear you're hacking away. Enjoy.
from psarbortouch.
Related Issues (20)
- Implement graph and system serialisation
- Review the API
- Complete a gap analysis with the original library HOT 1
- Review the structure of the code
- Remove "dead code" from Test Rigs
- Structure and Simplify Test Rigs
- Update the presentation of Test Rigs
- Complete Echolalia Demo
- Complete Atlas Demo
- Complete Halfviz Demo
- Complete Serialise Example
- Complete Welcome Demo
- Complete Parameter Playground Demo
- Create "Reference" wiki page HOT 1
- Review "Reference" against final API
- Update to use GLKit Math Library
- Issues compiling with XCode 4.5 for iOS6 HOT 1
- might be best to decouple the core code into a cocoa pod for re-use. HOT 5
- Future of this project HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psarbortouch.