yantra/purnanka-bandha-tantra.js
बन्ध-तन्त्र: the closed system of the Sūrya-Siddhānta's integers
856 lines · 60 exports
The header, as the file states it
What it loads
- yantra/spanda-lattice.jsmodule
- yantra/purnanka-graha-engine.jsmodule
- yantra/_records.jsmodule
- yantra/bija-samskara.jsmodule
- yantra/meridian.jsmodule
- yantra/udaya-bija.jsmodule
- yantra/purnanka-panchanga.jsmodule
- yantra/patha/kala-dvara.jsmodule
- yantra/patha/panchanga.jsmodule
What it exports
FRAMENAVAthetathetaDayslocklockNRATE_LOCKSPHASE_LOCKNAMED_LOCKSclosurekalpaClosurepulsepythagoreanResidualchainABHIJITZ9doublingOrbitsringMeetVARGOTTAMA_108GANDANTAsthitifactorverifytiersinScosSargSsnapjyaKpatratauOfanglesAtvectorBapparentBbandhaGrahabandhaGrahasbandhaPanchangalimbEndsunrisekaliDayFromCivilTimecivilTimeFromKaliDayUJJAYINIlokasLOKA_WHEELSLOKA_UNITSlokaOfreturnsPerseedbijaSeedN_DAYLADDERlokaTurnsin30cos30arg30lokaGrahalokaGrahaslokaPanchangasunrise30ayanamsha30SS verses named in the header
- SS 1.29verseyuge sūryajñaśukrāṇāṃ khacatuṣkaradārṇavāḥ । kujārkiguruśīghrāṇāṃ bhagaṇāḥ pūrvayāyinām ।।
- SS 1.35versebhavanti śaśino māsāḥ sūryendubhagaṇāntaram । ravimāsonitāste tu śeṣāḥ syuradhimāsakāḥ ।।
- SS 2.34verseravermandaparidhyaṃśā manavaḥ śītago radāḥ ।
- SS 2.38verseojayugmāntaraguṇā bhujajyā trijyayoddhṛtā । yugme vṛtte dhanarṇaṃ syādojādūnādhike sphuṭam ।।
- SS 2.43versemāndaṃ karmaikaṃ arkendorbhaumādīnāṃ athocyate । śaighryaṃ māndaṃ punarmāndaṃ śaighryaṃ catvāryanukramāt ।।
The channels it runs in
Every function, what it calls, who calls it
86 top-level functions read from the source; the doc line is the comment above each; calls and callers are resolved across the registry’s modules by name. Line numbers are the file’s at engine 3f94072.
── 0. small exact helpers ──────────────────────────────────────────────────
the 16-rung ladder (owner, 2026-10-27, Bhāgavata 3.11.5–8): 2 paramāṇu = 1 aṇu, 3 aṇu = 1 trasareṇu, 3 trasareṇu = 1 truṭi, then 100 truṭi = vedha, 3 vedha = lava, 3 lava = nimeṣa, 3 nimeṣa = kṣaṇa, 5 kṣaṇa = kāṣṭhā, 15 kāṣṭhā = laghu, 15 laghu = ghaṭikā. The rungs are of the TURN (D1a; the paramāṇu read on the turn is स्वामी-परम्परा, O4). On 30⁸ the truṭi is 3,600 spandas, the trasareṇu 1,200, th
θ in turns at t mahāyugas from a common zero (Ketu carries its half turn). Exact; reduced to [0, 1).
the same from civil days: t = days / C.
φ = p·θ_j − s·q·θ_k with s = +1 (expanding, difference) or −1 (collapsing, sum). rate (integer revolutions per yuga), period in years and civil days (exact rationals), corners p−q and p+q.
a lock on any number of bodies: Σ c_k θ_k (integer coefficients); coefficient sum = the d'Alembert count.
the first instant (in yugas) at which every listed wheel is back at its start together: 1/gcd(rates).
with the apsides and nodes (kalpa revolutions, SS 1.41–1.44): rates in revolutions per kalpa.
── 4. Pulse: mean point (radius R) + epicycle (radius r = p·R/360) ───────────────────────────────────────────────
The pulse for one body, kind 'manda' or 'sighra', at the bhuja κ ∈ [0, 5400′] (the quadrant argument). Returns the breathing circumference p(κ) (degrees), r, the doḥ- and koṭi-phala, and the karṇa² = (R + koṭi)² + doḥ² — the |a e^{iθ} + b e^{iθ′}|² with a = R, b = r, Δ = κ, all exact rationals on the text's 24 R-sines.
the Pythagorean residual of the text's sines: sin² + cos² − R², at κ (exact). It is the only gap between the two forms.
a chain of integer rates (or day-counts) a_0, a_1, …: each a_k/a_{k+1} = N_k + f_k; the product telescopes to a_0/a_n.
orbits of ×2 on ℤ/3^k (the cascade 2·3^{k−1} + 2·3^{k−2} + … + 2 + 1 = 3^k).
an N-ring and an M-ring on the one circle: their common points (in arcmin), count = gcd.
the nine in the owner's order at Kali-day `days`: θ (mean, exact), and the text's true place by its four steps.
sin and cos on the unit circle, exact rationals (Mādhava), of an angle in spandas.
the angle of (x, y), in whole spandas: the largest k with tan k ≤ y/x, by bisection in the first octant.
Mādhava's jyā and koṭijyā (unit circle) of a whole-spanda angle: the quadrant taken in integers, the remainder by his series.
one coordinate of a body: Σ over its lock-pulse terms (+ its secular polynomial, + its base angle for the longitude).
the apparent geocentric direction of one graha at τ: light's time, the Sun's bending, the annual aberration (the owner's reduction).
the engine's civil day t → the record's own day (meridian.RECORD_OFFSET_Q, owner rule A: the record's epochs E are record days) → + the kāla-bīja
one graha at civil t: Citrā-pakṣa longitude and latitude in whole spandas, distance (AU).
the nine on the bandha tier, with motion by difference over one day (SS 2.47–2.51: negative = vakra).
the instant (civil Kali days, on the time lattice: whole spandas of the turn after t, D1c) at which a limb leaves its present index.
a float civil day count → the nearest whole spanda of the turn, as civil days (the time lattice, D1c)
the sunrise of the civil day that contains t at a place, on the time lattice.
the five limbs at t for a place, each with the instant it ends.
civil time at a meridian ↔ Kali days from Laṅkā midnight, exact (Gregorian, the zone's offset in minutes east).
the level of a lock of rate R (revolutions per kalpa): the largest unit its period P = kalpa/|R| reaches; R = 0 → 'axis'.
every lock of up to three wheels, |c| ≤ maxPair for two, ≤ maxTriple for three: { level → [{ terms, R, order }] } (lowest order first).
returns of a lock in each unit above it (exact rationals): per kalpa it is R itself, a whole number.
── 13. The places through the lokas, top-down, on the day lattice N ─────────────────────────────────────────────────────── The text's own integers only. A wheel R (revolutions a kalpa) at civil day t (Laṅkā midnight at the Kali start = 0) is read from the top (SS 1.45–1.47: 452¾ mahāyugas gone at the Kali start): kalpa the 452 whole mahāyugas: R·452/1000 turns — nothing for a wheel whose R
a wheel's place, read top-down: { kalpa, kali, within, turns } (exact rationals of a turn) and spandas (whole, of N).
one graha at civil day t by the text's steps: { spandas (whole, of N), arcmin (exact), steps }
the nine through the lokas, with motion by difference over a day (negative = vakra).
the sunrise of the civil day that contains t: the text's own rule (2.60-2.63, 3.42 — shastra-patha/panchanga.js on the 24 jyās, whose Sun is this tier's to the spanda), on the time lattice (whole spandas of the turn, D1c).
── verification: every identity, exactly ───────────────────────────────────