# Tag Info

### Gravitation simulation and interaction of N (1000) massive objects

And I was somewhat lying in wait for this kind of question... In I have been working on Barnes-Hut-like code for the so-called tangent-point energies in the last couple of years. This is a family of ...
Accepted

### Efficiently Mowing Grass with Mathematica

This is just starting ideas for arbitrary regions. Perhaps you can improve it. Version 1 Define concave region with holes, which can be generalizable to arbitrary complexity: ...
• 73.2k
Accepted

### Thermodynamics of the 2D Ising model

The energy can be calculated exactly as written in the formula using Sum and correct indices: ...
• 26.3k
Accepted

### Parallelized Monte-Carlo

…You're simply in wrong way. The first thing should do is to write code in Mathematica style. I suggest reading the following as a first step: 10 Tips for Writing Fast Mathematica Code If you insist ...
• 66.8k
Accepted

### Graphing curves formed by a rolling polygon

Here is a simplified starting point. We restrict the path to a line, the x axis. And the shape that is rolled on the path to a (not necessarily regular) convex polygon. We start with an arbitrary ...
• 52.6k

### How to model wooden joints with Mathematica's FEM?

We can use method described in my answer here. First we define mesh with a small space between regions as follows ...
• 45.1k

### How to generate a random snowflake?

For couple of years I was thinking that I should post an answer here using the RandomMandala framework. So, finally (after some experimentation) I got reasonable ...
• 37.9k
Accepted

### Simulating the Conduction of Heat on a Metal Rod

This is basic animation using Manipulate. This can be solved analytically by Mathematica. Once you obtain the analytical solution then Manipulate is used to replace $f(x),L,k$ by any other values ...
• 145k
Accepted

### How to simulate a directed acyclic graph?

An idea in order to generalize the steps 3 and 4, considering the definition of the weighted graph given by edges and weights: ...
• 4,516

### Gillespie (stochastic simulation) algorithm

It is not complete answer since paclet we try to use has some typos in it (maybe it needs just version update). At first step we compute data using GillespieSSA ...
• 45.1k

...
• 804
Accepted

### Need an equation for modeling Tytler's Cycle

The Logistic Equation is used as a model of population growth, but it may be useful for your simulation. This single equation can simulate dad as he ages and tires, and the decline in the third stage. ...
• 5,225

### Solving Differential Equation System for HIV Treatment Model

Cesario's answer is almost there, but I'd like to add a couple points of correction/improvement. The problem formulation has constraints on the control (...
• 4,426

### Simulating the card game War with $m$ suits and $n$ values

This isn't so much an answer as pedagogy. The main reason you can't get your commenceWarCardGame to work is because most of the code in that block isn't part of the ...
• 29k
Accepted

### Troubleshooting NDSolveValue::rdelay Error in a Dengue Epidemic Model with Delay Differential Equations in Mathematica

At the time of posting this question, the NDSolve implementation in the latest version of Mathematica (version 14) did not support delay differential equations with ...

...
• 18.8k

### Python code of plot of Fisher KPP equation

May be this will get you started. Given this system \begin{align*} x'(t) &= F(x,y)\\ y'(t) &= G(x,y) \end{align*} The phase plot is drawn using the command ...
• 145k
1 vote
Accepted

### Simulating the card game War with $m$ suits and $n$ values

Here is a link to some code I wrote to simulate the game. No guarantees. FWIW, it shows a tally of lengths of games for various shuffled decks. Some of these lead to games without ends. https://www....
• 416
1 vote

### Plot roots of polynomials

Although the question is not entirely clear, I believe that defining dataND as something like ...
• 61.6k
1 vote

### Integrating Over a Conditional Time-Dependent Region

Although RegionQ[Rotate[Rectangle[{0, 0}, {l, 2}], 3, {0, 0}]] == True but Rotate still not the right way to represent a proper ...
• 75k
1 vote
Accepted

### Value of a function over permutations of two lists

You can do the multiplications more efficiently without needing Sum. ...
• 25.5k

Only top scored, non community-wiki answers of a minimum length are eligible