This is the phase-portrait counterpart to the 3D particle-cloud version of this simulator. Instead of drawing discrete positive/negative events, it integrates Barbara Fredrickson's broaden-and-build theory as an explicit coupled nonlinear ODE for positive emotion E and durable psychological/social resources R:
dE/dt = f(R) − decayE·E − chronicStress + stressorImpulse(t)
dR/dt = broaden · buildGain · g(E) − decayR·R
f(R) = α · tanh((R − R_mid) / R_k) "resources broaden future emotion"
g(E) = sigmoid(k · E) = 1 / (1 + e^(−k·E)) "emotion builds resources"
Both f and g are saturating S-shaped (sigmoidal) coupling functions — R feeding into E's equation and E feeding into R's equation is a genuine mutual positive-feedback loop, the same structure that produces bistability in toggle-switch dynamical systems. With these gains the system has two distinct stable attractors: a low-E/low-R basin (downward spiral) and a high-E/high-R basin (upward spiral), separated by an unstable tipping boundary. Which one a trajectory ends up in depends only on which side of that boundary its initial condition and perturbations land it on — nothing is scripted.
- Initial E₀, R₀ — starting point of the trajectory; drag them across the tipping boundary (roughly R₀≈37 at E₀=0 with default gains) and watch the same equations converge to the opposite spiral.
- Chronic stress — a constant negative offset in dE/dt; push it high enough and it destroys the upward attractor entirely, dragging every trajectory down regardless of starting point.
- Broadening practice — scales g(E), i.e. how efficiently a given amount of positive emotion converts into durable resources (gratitude journaling, savoring, mindfulness); raising it can rescue a low-resource start into the upward spiral.
- Resilience / coupling gain α — scales f(R), how strongly accumulated resources buffer and lift future positive emotion.
- Trigger stressor now — injects a real transient negative impulse into dE/dt (decaying over a few sim-seconds) — a genuine perturbation test of which basin the current state belongs to, exactly like the 3D version's forced negative event.