I creating a very sophisticated simulation of evolution with the DNA code. I have the cells that eats, moves and divides. New cell might be connected to parent. But this feature requires a very complicated handling of physical joints.
There are few cases that can happen:
1)
2)
3)
Currently i'm trying to solve problem with growing in size (picture 3). But others problem needs to be solved as well.
For now i asking to help just with last picture. Here is what i getting actually:
When cell are eating and getting bigger joints are becoming wrong placed. How can i reconnect joint in optimal way, considering i will have thousands of cells?
Animation link
sorry, but forum is broken i can't properly create a post
I need to properly join cells with joints
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: I need to properly join cells with joints
Sorry, but this forum is broken, i cant put pictures properly, they are appears randomly and attachment box is broken...
Re: I need to properly join cells with joints
Picture 1 is here
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: I need to properly join cells with joints
I'm guessing the problem is less how to do such a thing and more so how to do so efficiently? Why not create the naive approach if you haven't already and check if it's actually a bottle neck. Right now off the top of my head I can't think of any optimizations. I think it mainly depends on what you are using for your physics engine. The actual joint changing stuff is a couple variables and a tiny bit of math. There very few things you can do to optimize that. The bigger problem is the propagation of that change throughout your physics engine. Even then create the naive solution first and see what happens.
Re: I need to properly join cells with joints
I still have no working solution for reconnection of joints. I suppose that i need to follow next algorithm:bobbyjones wrote: ↑Sat Mar 21, 2020 4:47 am I'm guessing the problem is less how to do such a thing and more so how to do so efficiently? Why not create the naive approach if you haven't already and check if it's actually a bottle neck. Right now off the top of my head I can't think of any optimizations. I think it mainly depends on what you are using for your physics engine. The actual joint changing stuff is a couple variables and a tiny bit of math. There very few things you can do to optimize that. The bigger problem is the propagation of that change throughout your physics engine. Even then create the naive solution first and see what happens.
1) Create a child cell.
2) Check if it is colliding with "brothers"
3) If it is colliding sufficient then:
4) If it is "stick" then stick to parent and brother
5) if it is sticking only to parents then reconnect and cut off brother
6) if it is "free" then leave and also cut off brother
Problem is that it hardly can be done in the same tick, because of callbacks will be called later. Also it is hard to check how sufficient collide is. Maybe there is a little colliding area and i dont need to bother about breaking existing joints.
Beside described problem there is another problem, maybe not so hard but still. I dont know how to reconnect joint if cells are growing/shrinking. Or can i connect it to edge of the circle in such way that after growing in size joint will be still connected to the edge?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 12 guests