Comments (4)
It is not an easy task to create a rope in all physics engines. To the best of my knowledge, the only way to simulate rope is using joint segments/springs. The following links may be helpful:
Stackoverflow: How to create rope
pymunk joint document
from manim-physics.
As an update on this, I actually do have something functioning, although it does have quite a bit of overhead and it has some strange rippling effects. Further, it can move through objects when moving too fast. I will send a video later showing this.
from manim-physics.
Brief example of a point trying to run away while leashed to two nails.
IntroPuzzle.mp4
from manim-physics.
It's basically a chain:
video-1627443070.mp4
But then every frame I get a spline interpolator to smoothen the curve:
video-1627452168.mp4
At the moment, I'm facing a few issues with this implementation:
- Getting the beginning and end of the curve to have equal slopes (can't find a good algorithm to smoothen/interpolate a 2D closed curve)
- Slow render times when I place the beginning and of the chain too close together although t
- Too jittery; not too sure what causes this but decreasing the damping parameter helps significantly.
- Like any object, moving too quickly causes this to move through obstacles
- I also don't know how to make the rope stretchy. I tried making the tension adjustable but it causes some really strange behaviour...
On the other hand this method does produce a decent rope without too many chains at a reasonable level of performance. I can do a PR if your interested in having this in your library.
from manim-physics.
Related Issues (12)
- Homogeneous magnetic field? HOT 2
- Moving charge with updating electric field. HOT 2
- Make `SpaceScene.make_rigid_body` not take children of `VGroups`
- Manim-physics is not longer working (with the last version of manim)? HOT 1
- `Charge.point` not updated when moving it
- Methods don't work
- Add mirror
- Turn off gravity for rigid body HOT 3
- Wire is not defined HOT 2
- Feature Suggestion: Random Walk Class HOT 2
- make_rigid_body having a bug when applying to string
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 manim-physics.