Similar apps
Compare allApp info
- Installs
- 0+
- Category
- Tools
- Content rating
- Everyone
- Version
- 2.0
- Released
- Oct 4, 2026
- Last updated
- 4 Oct 2026
- In-app purchases
- No
- Contains ads
- Yes
- Promo video
- No
- Requires Android
- 7.0
Loading…
This app isn't in any of our charts yet.
An app that checks the **Gauss–Bonnet theorem**
App Gauss–Bonnet for Android ## The theorem For a compact region R with piecewise smooth boundary on a surface: **∬_R K dA + ∮_∂R κ_g ds + Σ θᵢ = 2π χ(R)** - K: Gaussian curvature (intrinsic, Theorema Egregium) - κ_g: geodesic curvature of the boundary (how much the boundary bends *within* the surface; a geodesic has κ_g = 0) - θᵢ: exterior (turning) angles at the corners, with θ = π − interior angle - χ(R): Euler characteristic (disk: 1, sphere: 2, torus: 0) It ties local geometry (curvature) to global topology (χ). Consequences: the angles of a geodesic triangle sum to π + ∬K dA (more than 180° on a sphere, less on a hyperbolic surface); on a closed surface ∬K dA = 2πχ, so a sphere always has total curvature 4π and a torus 0, whatever its shape. ## Using the app - Enter `x(u,v)`, `y(u,v)`, `z(u,v)` and the ranges `[u min, u max] × [v min, v max]`, then tap **Draw**. - The parameter rectangle is the region R. It is a topological disk, so χ = 1 and the right-hand side is 2π. The orange curve is its boundary and the dots are its four corners. Rotate the surface with your finger. - The result panel shows the area and perimeter, the three terms (with the per-edge and per-corner values), their sum, 2πχ and the numerical difference. - Syntax (exp4j): `+ - * / ^`, `sin cos tan asin acos atan sinh cosh tanh exp log sqrt abs`, constants `pi` and `e`. - Top bar: **Save surface**, **My surfaces**, **Points table**, **Examples**, **Language**; in the ⋮ menu: **Gauss–Bonnet theorem** (explanation) and **About**. ## How the terms are computed The boundary is traversed counterclockwise in the (u, v) plane (edges: v = v₁, u = u₂, v = v₂, u = u₁), with the normal n = r_u × r_v / |r_u × r_v|. | Term | Formula | Method | | **∬K dA** | ∬ (LN − M²) / \|r_u × r_v\| du dv | Simpson's rule, 40 × 40 | | **κ_g ds** along an edge | ((γ′ × γ″)·n) / \|γ′\|² dt, with γ′ = r_u u′ + r_v v′ and γ″ = r_uu u′² + 2 r_uv u′v′ + r_vv v′² | Simpson's rule, 100 intervals per edge | | **θᵢ** at a corner | atan2((T_in × T_out)·n, T_in·T_out) | tangents of the incoming and outgoing edge | Derivatives r_u, r_v are central differences (step 10⁻⁴), second derivatives step 10⁻³. The area is ∬ \|r_u × r_v\| du dv. ## Examples and what to look for | Example | ∬K dA | ∮κ_g ds | Σθ | Notes | | Sphere patch | 1.1116 | −1.1116 | 2π | the patch has positive curvature; boundary terms compensate | | Torus (whole) | 0 | 0 | 2π | opposite edges coincide, boundary terms cancel; ∬K dA = 2π·χ(torus) = 0 | | Torus patch (outer part) | 2.7961 | −2.7961 | 2π | outer part of the torus has K > 0 | | Paraboloid | 3.7092 | −7.4184 | 9.9924 | corners are sharper than 90° on this surface | | Saddle | −3.7092 | 7.4184 | 2.5740 | negative curvature, corners are blunter than 90° | | Cylinder | 0 | 0 | 2π | K = 0 | | Cone (flat) | 0 | 0 | 2π | K = 0 away from the apex | | Helicoid | −4.9923 | 4.9923 | 2π | K < 0 everywhere | In every case the sum is 2π ≈ 6.2832, with a numerical difference of about 10⁻⁶ or less. ## Points table The table icon opens a separate screen (`PointsActivity`) with the coordinates x, y, z and the Gaussian curvature K of points of the surface on a grid of (u, v) values. Set **u from / to / step** and **v from / to / step**, then tap **Compute**; the defaults split the current ranges into 4 steps (a 5 × 5 grid). Up to 2000 points are shown, and the text is selectable so it can be copied. The K column helps to see where the surface is curved positively or negatively, and so where the ∬K dA term gets its contributions. K shows "NaN" at singular points. ## Saving surfaces - **Save (disk icon):** stores the current surface and ranges under a name; saving with an existing name overwrites it. - **My surfaces (folder icon):** lists saved surfaces. Tap one to load it and run the check; long-press to delete. - Surfaces are kept on the device (SharedPreferences) and survive app restarts.