java - magnetism simulation -


I say that I have kept P nodes on an M pixel 2D surface, I want the nodes to be attracted to each other. They are different from the stronger attraction, but if the distance between the two nodes is said, D ( A, B) is less than a few boundaries, then Kashmir again starts to retreat. Did anyone start me some code to update the co-ordination of nodes on time?

I have some code, which is to start the highlight of the code below but is looking for some advice (PSI can not use existing library to do this).

  public square node {float posX; Float pause; } Public category mySimulator {ArrayList & lt; Node & gt; MyNodes = New Arrestist & lt; Node & gt; (); // Imagine that I add one of the nodes of my nodes to my nodes in my nodes.add (............................. .................................................. .................................................. ............................................... I & lt ; = MyNodes.size (); i ++) {for (int i = 0; i & lt; = myNodes.size (); i ++) {myNodes.get (i) .posx = myNodes.get ( I) .posX + "Some Static" * (myNodes.get (j) .posX -myNodes.get (i) .posX); MyNodes.get (i) .posY = myNodes.get (i) .posY + "Some Static" * (MyNodes.get (j) .posY -myNodes.get (i) .posY);}}}}}  

Elastic collisions are completely unrelated to magnetism, but the design allows you to interact with particles Can give some tips about modeling of dresses.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -