How can I count the number of particles crossing a line or entering a region?

Juan Carlos Ponce Campuzano shared this question 4 months ago
Answered

Hello everyone,

I am trying to do a very simplified animation about diffusion with flux through a membrane. So basically I have been able to make a number of points that move randomly from one region R1 to another region R2.

I have been trying to figure out how to track the number of particles crossing the border between R1 and R2 in a period of time. My goal is to create a plot time versus number of particles crossing the border.

So the question is: How can I keep track of the the number of particles crossing a line or entering a region? (Please, see file attached with what I have done so far...)

Any help or suggestions would be appreciated.

Thank you...

Comments (5)

photo
1

may this is what you want:

photo
1

thanks so much Tang, I will study your suggestion. :)

photo
1

pienso que con dos poligonos adyacentes y la instruccin IsInRegion[] basta con ir restando los puntos que estan en una region a los que estan en la otra para contabilizarlos

saludos

photo
1

Hola mathmagic,

Gracias por la sugerencia. Intentaré usar también ese comando. :)

photo
1

Hola Hello

Here is a worksheet with a draft of the simulation. I used mathmagic suggestion. Maybe later I will use Tang for plotting the graph...

thanks for your comments and suggestions. If you have more, for improving the worksheet, please let me know. At the moment, it runs pretty slow in the online version.

  • GeoGebra
  • Help
  • Partners
  • Contact us
    • Feedback & Questions
    • This email address is being protected from spambots. You need JavaScript enabled to view it.
    • +43 677 6137 2693
© 2017 International GeoGebra Institute