zeropoint-node 1.0.12 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/CHANGELOG.md +79 -0
  2. package/CITATION.cff +1 -1
  3. package/README.md +1 -1
  4. package/dist/a432.electric.flow.cjs +0 -5
  5. package/dist/a432.electric.flow.cjs.map +1 -1
  6. package/dist/a432.electric.flow.esm.js +0 -5
  7. package/dist/a432.electric.flow.esm.js.map +1 -1
  8. package/dist/a432.kabbalah.cjs +0 -4
  9. package/dist/a432.kabbalah.cjs.map +1 -1
  10. package/dist/a432.kabbalah.esm.js +0 -4
  11. package/dist/a432.kabbalah.esm.js.map +1 -1
  12. package/dist/a432.math.constants.cjs +6 -2
  13. package/dist/a432.math.constants.cjs.map +1 -1
  14. package/dist/a432.math.constants.esm.js +6 -2
  15. package/dist/a432.math.constants.esm.js.map +1 -1
  16. package/dist/a432.sacred.geometry.cjs +0 -4
  17. package/dist/a432.sacred.geometry.cjs.map +1 -1
  18. package/dist/a432.sacred.geometry.esm.js +0 -4
  19. package/dist/a432.sacred.geometry.esm.js.map +1 -1
  20. package/dist/a432.simple.cjs +0 -5
  21. package/dist/a432.simple.cjs.map +1 -1
  22. package/dist/a432.simple.esm.js +0 -5
  23. package/dist/a432.simple.esm.js.map +1 -1
  24. package/dist/a432.wave.energy.cjs +10 -2
  25. package/dist/a432.wave.energy.cjs.map +1 -1
  26. package/dist/a432.wave.energy.esm.js +11 -3
  27. package/dist/a432.wave.energy.esm.js.map +1 -1
  28. package/package.json +14 -3
  29. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.consciousness.orchestrator.ts +0 -2
  30. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.electric.flow.ts +0 -5
  31. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.harmonizer.ts +4 -2
  32. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.index.ts +0 -3
  33. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.kabbalah.ts +0 -4
  34. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.living.os.ts +2 -12
  35. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.main.ts +0 -2
  36. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.math.constants.ts +6 -2
  37. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.consciousness.integration.ts +5 -17
  38. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.ts +3 -8
  39. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.os.ui.ts +0 -1
  40. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.sacred.geometry.ts +0 -4
  41. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.self.rebuilder.ts +0 -1
  42. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.server.ts +2 -5
  43. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.simple.ts +0 -5
  44. package/src/0/3/6/9/1/2/4/8/7/5/1/a432.wave.energy.ts +10 -2
  45. package/src/kernel/core-exports.test.ts +294 -0
  46. package/src/multidimensional-vortex-demo.ts +309 -295
  47. package/src/multidimensional-vortex-framework.ts +13 -1
  48. package/src/quantum/proof-of-system.ts +252 -244
  49. package/src/security/quantum-fold-cipher.test.ts +68 -0
  50. package/src/security/quantum-fold-cipher.ts +5 -1
  51. package/src/vbm-demo.ts +183 -168
@@ -738,3 +738,71 @@ console.log(' ✓ Tier 5: Compositional Integration')
738
738
  console.log(' ✓ Quantum Threat Analysis')
739
739
  console.log(' ✓ Security Properties (No Gaps)')
740
740
  console.log('\nQuantum Fold Cipher is ready for use. ✓')
741
+
742
+ // ============================================================================
743
+ // HKDF — the replacement the deprecation notice points at
744
+ // ============================================================================
745
+ //
746
+ // expandQuantumKeyViaRodin prints "DEPRECATED and cryptographically weak, use
747
+ // expandQuantumKeyViaHkdf instead" on every gate run, and expandQuantumKeyViaHkdf
748
+ // had no test. A coverage audit found it: 369 exported functions are never
749
+ // called, and this was one of them. Steering users to an unverified replacement
750
+ // is worse than the warning is worth.
751
+ //
752
+ // The oracle is Node's own crypto.hkdfSync, an independent RFC 5869
753
+ // implementation. Full HKDF is Extract then Expand, so computing the PRK here
754
+ // with HMAC and expanding it must reproduce Node's answer byte for byte. That
755
+ // checks the algorithm against the standard rather than against itself.
756
+
757
+ import { createHmac as hkdfHmac, hkdfSync } from 'node:crypto'
758
+ import { hkdfExpand as zpHkdfExpand, expandQuantumKeyViaHkdf as zpExpand } from './quantum-fold-cipher.ts'
759
+
760
+ {
761
+ let hkdfFailures = 0
762
+ const hcheck = (name: string, ok: boolean, detail = ''): void => {
763
+ if (ok) { console.log(' ✓ ' + name); return }
764
+ hkdfFailures++
765
+ console.log(' ✗ ' + name + (detail ? ' — ' + detail : ''))
766
+ }
767
+
768
+ console.log('\nHKDF-Expand against Node\'s RFC 5869 implementation')
769
+
770
+ // RFC 5869 Appendix A.1 inputs, plus lengths that straddle the 32-byte block
771
+ // boundary — 1, 31, 32, 33 and 64 are where an off-by-one in the T(i) loop
772
+ // or the final truncation would show.
773
+ const ikm = Buffer.alloc(22, 0x0b)
774
+ const salt = Buffer.from('000102030405060708090a0b0c', 'hex')
775
+ const info = Buffer.from('f0f1f2f3f4f5f6f7f8f9', 'hex')
776
+ const prk = hkdfHmac('sha256', salt).update(ikm).digest()
777
+
778
+ for (const len of [1, 31, 32, 33, 42, 64, 100]) {
779
+ const mine = zpHkdfExpand(prk, info, len)
780
+ const node = Buffer.from(hkdfSync('sha256', ikm, salt, info, len))
781
+ hcheck(`length ${len} matches node:crypto`, mine.equals(node), `${mine.toString('hex').slice(0, 24)}… vs ${node.toString('hex').slice(0, 24)}…`)
782
+ }
783
+
784
+ // Empty info, and a different salt, so the test does not depend on one fixture.
785
+ const prk2 = hkdfHmac('sha256', Buffer.alloc(0)).update(ikm).digest()
786
+ hcheck('empty salt and info match node:crypto',
787
+ zpHkdfExpand(prk2, Buffer.alloc(0), 42).equals(Buffer.from(hkdfSync('sha256', ikm, Buffer.alloc(0), Buffer.alloc(0), 42))))
788
+
789
+ // Distinct info must give distinct output, or the info parameter is ignored.
790
+ hcheck('info actually changes the output',
791
+ !zpHkdfExpand(prk, Buffer.from('a'), 32).equals(zpHkdfExpand(prk, Buffer.from('b'), 32)))
792
+
793
+ // And the expansion built on it.
794
+ const key = { material: [3, 6, 9, 3, 6, 9], round: 0, genesis: '00112233-4455-6677-8899-aabbccddeeff', contentDigest: 'ab'.repeat(32), seal: '' } as never
795
+ const rounds = zpExpand(key, 3)
796
+ hcheck('expandQuantumKeyViaHkdf returns the root plus one key per round', rounds.length === 4, String(rounds.length))
797
+ hcheck('every derived value is on the trinity axis',
798
+ rounds.slice(1).every((k) => k.material.every((d) => d === 3 || d === 6 || d === 9)))
799
+ hcheck('rounds differ from each other',
800
+ new Set(rounds.slice(1).map((k) => k.material.join())).size === 3)
801
+ hcheck('expansion is deterministic',
802
+ JSON.stringify(zpExpand(key, 3)) === JSON.stringify(rounds))
803
+
804
+ if (hkdfFailures > 0) {
805
+ console.error(`HKDF checks FAILED — ${hkdfFailures}`)
806
+ process.exit(1)
807
+ }
808
+ }
@@ -379,7 +379,11 @@ export function verifyQuantumKey(key: QuantumKey): boolean {
379
379
  * T(i) = HMAC-SHA256(PRK, T(i-1) || info || counter) for i = 1..rounds
380
380
  * Round key material = map(T(i) bytes → trinity {3,6,9})
381
381
  */
382
- function hkdfExpand(
382
+ // Exported for testing, the same reason ml-kem exports keyGenFromSeeds. The
383
+ // deprecation notice on expandQuantumKeyViaRodin tells callers to use
384
+ // expandQuantumKeyViaHkdf instead, and nothing verified the HKDF underneath it.
385
+ // Exported, it can be checked against Node's own RFC 5869 implementation.
386
+ export function hkdfExpand(
383
387
  prk: Buffer,
384
388
  info: Buffer,
385
389
  length: number,
package/src/vbm-demo.ts CHANGED
@@ -7,191 +7,206 @@ import { PI } from './0/algebra.ts'
7
7
  import { VortexMath, VBMNumberAnalyzer } from './vbm-math.ts';
8
8
  import { AdvancedVBM, RodinCoilCalculator, VBMPatternAnalyzer } from './advanced-vbm.ts';
9
9
 
10
- console.log("🌀 VORTEX BASED MATHEMATICS - TypeScript Implementation");
11
- console.log("=".repeat(60));
12
-
13
- // 1. Basic VBM Patterns Demo
14
- console.log("\n📊 BASIC VBM PATTERNS");
15
- console.log("-".repeat(30));
16
-
17
- // Digital Root calculations
18
- console.log("Digital Roots:");
19
- [12345, 27, 108, 999].forEach(n => {
20
- console.log(`${n} ${VortexMath.digitalRoot(n)}`);
21
- });
22
-
23
- // The famous Mobius Circuit
24
- console.log("\n🔄 Mobius Circuit (1-2-4-8-7-5):");
25
- const mobiusCircuit = VortexMath.getMobiusCircuit();
26
- console.log("Pattern:", mobiusCircuit.join(" "));
27
-
28
- const doublingSequence = VortexMath.generateDoublingSequence(20);
29
- console.log("Powers of 2 (digital roots):", doublingSequence.slice(0, 12).join(", "));
30
-
31
- // Spirit Numbers (3-6-9)
32
- console.log("\n Spirit Numbers (3-6-9):");
33
- const spiritNumbers = VortexMath.getSpiritNumbers();
34
- console.log("Trinity:", spiritNumbers.join(" - "));
35
-
36
- // Three Family Groups
37
- console.log("\n👥 Three Family Groups:");
38
- const families = VortexMath.getThreeFamilyGroups();
39
- console.log(`Family 1: ${families.family1.join(", ")}`);
40
- console.log(`Family 2: ${families.family2.join(", ")}`);
41
- console.log(`Family 3: ${families.family3.join(", ")} (Spirit)`);
42
-
43
- // 2. Advanced VBM Concepts Demo
44
- console.log("\n🔬 ADVANCED VBM CONCEPTS");
45
- console.log("-".repeat(30));
46
-
47
- // Prime Squared Bases (Creation Equation)
48
- console.log("Prime Numbers Squared (Creation Equation):");
49
- const primeSquaredBases = AdvancedVBM.generatePrimeSquaredBases([3, 5, 7, 11]);
50
- primeSquaredBases.forEach(({prime, squared, radix}) => {
51
- console.log(`${prime}² = ${squared} → Radix-${radix-1} system`);
52
- });
53
-
54
- // Rodin Coil Sequence
55
- console.log("\n🧲 Rodin Coil Winding Sequence:");
56
- const rodinSequence = AdvancedVBM.generateRodinCoilSequence();
57
- console.log("Circle of Fifths:", rodinSequence.join(" → "));
58
-
59
- // Harmonic Electron Shears
60
- console.log("\n⚡ Harmonic Electron Shears:");
61
- const shears = AdvancedVBM.calculateHarmonicShears();
62
- Object.entries(shears).forEach(([key, value]) => {
63
- console.log(`${key.toUpperCase()}: ${value.value} (${value.calculation})`);
64
- });
65
-
66
- // 3. Practical Applications Demo
67
- console.log("\n🛠️ PRACTICAL APPLICATIONS");
68
- console.log("-".repeat(30));
69
-
70
- // Number Analysis
71
- console.log("Complete Number Analysis:");
72
- const testNumbers = [27, 108, 432, 1728];
73
- testNumbers.forEach(n => {
74
- const analysis = VBMNumberAnalyzer.analyzeNumber(n);
75
- console.log(`${n}: DR=${analysis.digitalRoot}, Family=${analysis.family}, ` +
76
- `Torus=${analysis.torusPosition}, Polar=${analysis.polarMate}, ` +
77
- `Spirit=${analysis.isSpiritNumber}`);
78
- });
79
-
80
- // Fibonacci VBM Analysis
81
- console.log("\n📈 Fibonacci Sequence VBM Analysis:");
82
- const fibVBM = VortexMath.fibonacciVBM(10).slice(0, 8);
83
- fibVBM.forEach(({value, digitalRoot, family}) => {
84
- console.log(`Fib(${value.toString().padStart(4)}) DR:${digitalRoot}, Family:${family}`);
85
- });
86
-
87
- // 4. Rodin Coil Calculator Demo
88
- console.log("\n🔧 RODIN COIL CALCULATIONS");
89
- console.log("-".repeat(30));
90
-
91
- // Winding Positions
92
- console.log("Rodin Coil Winding Positions (first 12 turns):");
93
- const windingPositions = RodinCoilCalculator.calculateWindingPositions(12);
94
- windingPositions.forEach(({turn, position, digitalRoot}) => {
95
- console.log(`Turn ${turn + 1}: Position ${position} (DR: ${digitalRoot})`);
96
- });
97
-
98
- // Magnetic Field Enhancement
99
- console.log("\nMagnetic Field Enhancement:");
100
- const enhancement = RodinCoilCalculator.calculateMagneticEnhancement(100);
101
- console.log(`Conventional: ${enhancement.conventional} units`);
102
- console.log(`Rodin Coil: ${enhancement.rodinCoil} units`);
103
- console.log(`Enhancement: ${enhancement.percentageIncrease}% increase`);
104
-
105
- // Field Type Comparison
106
- const fieldComparison = RodinCoilCalculator.compareFieldTypes();
107
- console.log(`\nField Types:`);
108
- console.log(`Conventional: ${fieldComparison.conventional.type} - ${fieldComparison.conventional.description}`);
109
- console.log(`Rodin Coil: ${fieldComparison.rodinCoil.type} - ${fieldComparison.rodinCoil.description}`);
110
-
111
- // 5. Pattern Analysis Demo
112
- console.log("\n🔍 PATTERN ANALYSIS");
113
- console.log("-".repeat(30));
114
-
115
- // Analyze various sequences for VBM patterns
116
- const sequences = {
117
- "Powers of 2": [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],
118
- "Fibonacci": [1, 1, 2, 3, 5, 8, 13, 21, 34, 55],
119
- "Triangular Numbers": [1, 3, 6, 10, 15, 21, 28, 36, 45, 55],
120
- "Perfect Squares": [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
121
- };
10
+ import { fileURLToPath } from 'node:url'
11
+ import { resolve as resolvePath } from 'node:path'
12
+
13
+ // A module must not write to stdout merely because it was imported. This file
14
+ // printed its entire demonstration at module scope, so anything that touched it
15
+ // — the coverage audit, a consumer's import, a tool walking the tree — got the
16
+ // whole script whether it asked for it or not. Guarded to run only when this
17
+ // file IS the program being run.
18
+ const isEntryPoint =
19
+ process.argv[1] !== undefined &&
20
+ resolvePath(process.argv[1]) === fileURLToPath(import.meta.url)
21
+
22
+ if (isEntryPoint) {
23
+ console.log("🌀 VORTEX BASED MATHEMATICS - TypeScript Implementation");
24
+ console.log("=".repeat(60));
25
+
26
+ // 1. Basic VBM Patterns Demo
27
+ console.log("\n📊 BASIC VBM PATTERNS");
28
+ console.log("-".repeat(30));
29
+
30
+ // Digital Root calculations
31
+ console.log("Digital Roots:");
32
+ [12345, 27, 108, 999].forEach(n => {
33
+ console.log(`${n} ${VortexMath.digitalRoot(n)}`);
34
+ });
35
+
36
+ // The famous Mobius Circuit
37
+ console.log("\n🔄 Mobius Circuit (1-2-4-8-7-5):");
38
+ const mobiusCircuit = VortexMath.getMobiusCircuit();
39
+ console.log("Pattern:", mobiusCircuit.join(" "));
40
+
41
+ const doublingSequence = VortexMath.generateDoublingSequence(20);
42
+ console.log("Powers of 2 (digital roots):", doublingSequence.slice(0, 12).join(", "));
43
+
44
+ // Spirit Numbers (3-6-9)
45
+ console.log("\n✨ Spirit Numbers (3-6-9):");
46
+ const spiritNumbers = VortexMath.getSpiritNumbers();
47
+ console.log("Trinity:", spiritNumbers.join(" - "));
48
+
49
+ // Three Family Groups
50
+ console.log("\n👥 Three Family Groups:");
51
+ const families = VortexMath.getThreeFamilyGroups();
52
+ console.log(`Family 1: ${families.family1.join(", ")}`);
53
+ console.log(`Family 2: ${families.family2.join(", ")}`);
54
+ console.log(`Family 3: ${families.family3.join(", ")} (Spirit)`);
55
+
56
+ // 2. Advanced VBM Concepts Demo
57
+ console.log("\n🔬 ADVANCED VBM CONCEPTS");
58
+ console.log("-".repeat(30));
59
+
60
+ // Prime Squared Bases (Creation Equation)
61
+ console.log("Prime Numbers Squared (Creation Equation):");
62
+ const primeSquaredBases = AdvancedVBM.generatePrimeSquaredBases([3, 5, 7, 11]);
63
+ primeSquaredBases.forEach(({prime, squared, radix}) => {
64
+ console.log(`${prime}² = ${squared} → Radix-${radix-1} system`);
65
+ });
66
+
67
+ // Rodin Coil Sequence
68
+ console.log("\n🧲 Rodin Coil Winding Sequence:");
69
+ const rodinSequence = AdvancedVBM.generateRodinCoilSequence();
70
+ console.log("Circle of Fifths:", rodinSequence.join(" → "));
71
+
72
+ // Harmonic Electron Shears
73
+ console.log("\n Harmonic Electron Shears:");
74
+ const shears = AdvancedVBM.calculateHarmonicShears();
75
+ Object.entries(shears).forEach(([key, value]) => {
76
+ console.log(`${key.toUpperCase()}: ${value.value} (${value.calculation})`);
77
+ });
78
+
79
+ // 3. Practical Applications Demo
80
+ console.log("\n🛠️ PRACTICAL APPLICATIONS");
81
+ console.log("-".repeat(30));
82
+
83
+ // Number Analysis
84
+ console.log("Complete Number Analysis:");
85
+ const testNumbers = [27, 108, 432, 1728];
86
+ testNumbers.forEach(n => {
87
+ const analysis = VBMNumberAnalyzer.analyzeNumber(n);
88
+ console.log(`${n}: DR=${analysis.digitalRoot}, Family=${analysis.family}, ` +
89
+ `Torus=${analysis.torusPosition}, Polar=${analysis.polarMate}, ` +
90
+ `Spirit=${analysis.isSpiritNumber}`);
91
+ });
92
+
93
+ // Fibonacci VBM Analysis
94
+ console.log("\n📈 Fibonacci Sequence VBM Analysis:");
95
+ const fibVBM = VortexMath.fibonacciVBM(10).slice(0, 8);
96
+ fibVBM.forEach(({value, digitalRoot, family}) => {
97
+ console.log(`Fib(${value.toString().padStart(4)}) → DR:${digitalRoot}, Family:${family}`);
98
+ });
99
+
100
+ // 4. Rodin Coil Calculator Demo
101
+ console.log("\n🔧 RODIN COIL CALCULATIONS");
102
+ console.log("-".repeat(30));
103
+
104
+ // Winding Positions
105
+ console.log("Rodin Coil Winding Positions (first 12 turns):");
106
+ const windingPositions = RodinCoilCalculator.calculateWindingPositions(12);
107
+ windingPositions.forEach(({turn, position, digitalRoot}) => {
108
+ console.log(`Turn ${turn + 1}: Position ${position} (DR: ${digitalRoot})`);
109
+ });
110
+
111
+ // Magnetic Field Enhancement
112
+ console.log("\nMagnetic Field Enhancement:");
113
+ const enhancement = RodinCoilCalculator.calculateMagneticEnhancement(100);
114
+ console.log(`Conventional: ${enhancement.conventional} units`);
115
+ console.log(`Rodin Coil: ${enhancement.rodinCoil} units`);
116
+ console.log(`Enhancement: ${enhancement.percentageIncrease}% increase`);
117
+
118
+ // Field Type Comparison
119
+ const fieldComparison = RodinCoilCalculator.compareFieldTypes();
120
+ console.log(`\nField Types:`);
121
+ console.log(`Conventional: ${fieldComparison.conventional.type} - ${fieldComparison.conventional.description}`);
122
+ console.log(`Rodin Coil: ${fieldComparison.rodinCoil.type} - ${fieldComparison.rodinCoil.description}`);
123
+
124
+ // 5. Pattern Analysis Demo
125
+ console.log("\n🔍 PATTERN ANALYSIS");
126
+ console.log("-".repeat(30));
127
+
128
+ // Analyze various sequences for VBM patterns
129
+ const sequences = {
130
+ "Powers of 2": [1, 2, 4, 8, 16, 32, 64, 128, 256, 512],
131
+ "Fibonacci": [1, 1, 2, 3, 5, 8, 13, 21, 34, 55],
132
+ "Triangular Numbers": [1, 3, 6, 10, 15, 21, 28, 36, 45, 55],
133
+ "Perfect Squares": [1, 4, 9, 16, 25, 36, 49, 64, 81, 100]
134
+ };
135
+
136
+ Object.entries(sequences).forEach(([name, sequence]) => {
137
+ const analysis = VBMPatternAnalyzer.analyzeSequence(sequence);
138
+ console.log(`\n${name}:`);
139
+ console.log(` Mobius Pattern: ${analysis.hasMobiusPattern ? "✓" : "✗"}`);
140
+ console.log(` Spirit Numbers: ${analysis.hasSpiritNumbers ? "✓" : "✗"}`);
141
+ console.log(` Dominant Family: ${analysis.dominantFamily}`);
142
+ console.log(` Period Length: ${analysis.periodicLength}`);
143
+ console.log(` Digital Roots: ${analysis.digitalRootSequence.slice(0, 8).join(", ")}...`);
144
+ });
145
+
146
+ // 6. Special VBM Properties Demo
147
+ console.log("\n🌟 SPECIAL VBM PROPERTIES");
148
+ console.log("-".repeat(30));
149
+
150
+ // Power of Nine demonstration
151
+ console.log("Power of Nine (all multiples reduce to 9):");
152
+ const powerOfNine = AdvancedVBM.demonstratePowerOfNine(10);
153
+ powerOfNine.slice(0, 6).forEach(({multiplier, product, digitalRoot, maintains9}) => {
154
+ console.log(`9 × ${multiplier} = ${product} → ${digitalRoot} ${maintains9 ? "✓" : "✗"}`);
155
+ });
156
+
157
+ // Abhá Cypher (Most Great Name calculation)
158
+ console.log("\nAbhá Cypher (Most Great Name of God):");
159
+ const abhaCypher = AdvancedVBM.generateAbhaCypher();
160
+ console.log(`B(${abhaCypher.spiritMagnetometer[1]}) + A(${abhaCypher.spiritMagnetometer[0]}) + H(${abhaCypher.spiritMagnetometer[2]}) = ${abhaCypher.bahaValue}`);
161
+ console.log(`Cypher Pattern: ${abhaCypher.cypher}`);
162
+ console.log(`W-Axis (Spiritual Axis): ${abhaCypher.wAxis}`);
163
+
164
+ // Superfluid Mobius Circuit Properties
165
+ console.log("\nSuperfluid Mobius Circuit Properties:");
166
+ const superfluidity = AdvancedVBM.demonstrateSuperfluidity();
167
+ console.log(`Flow: ${superfluidity.flowDirection}`);
168
+ Object.entries(superfluidity.properties).forEach(([prop, value]) => {
169
+ console.log(` ${prop.charAt(0).toUpperCase() + prop.slice(1)}: ${value ? "✓" : "✗"}`);
170
+ });
171
+
172
+ // 7. Torus Geometry Demo
173
+ console.log("\n🍩 TORUS GEOMETRY");
174
+ console.log("-".repeat(30));
175
+
176
+ console.log("Torus Coordinates for key numbers:");
177
+ [1, 3, 9, 27].forEach(n => {
178
+ const coords = AdvancedVBM.calculateTorusCoordinates(n);
179
+ console.log(`${n}: (${coords.x.toFixed(3)}, ${coords.y.toFixed(3)}, ${coords.z.toFixed(3)}) ` +
180
+ `θ=${(coords.theta * 180 / PI).toFixed(1)}° DR=${coords.digitalRoot}`);
181
+ });
182
+
183
+ console.log("\n🎯 VBM TypeScript Implementation Complete!");
184
+ console.log("All core mathematical patterns from Marko Rodin's work have been implemented.");
185
+ console.log("Use these classes to explore Vortex Based Mathematics in your applications!");
186
+
187
+ // Export usage examples
188
+ }
122
189
 
123
- Object.entries(sequences).forEach(([name, sequence]) => {
124
- const analysis = VBMPatternAnalyzer.analyzeSequence(sequence);
125
- console.log(`\n${name}:`);
126
- console.log(` Mobius Pattern: ${analysis.hasMobiusPattern ? "✓" : "✗"}`);
127
- console.log(` Spirit Numbers: ${analysis.hasSpiritNumbers ? "✓" : "✗"}`);
128
- console.log(` Dominant Family: ${analysis.dominantFamily}`);
129
- console.log(` Period Length: ${analysis.periodicLength}`);
130
- console.log(` Digital Roots: ${analysis.digitalRootSequence.slice(0, 8).join(", ")}...`);
131
- });
132
-
133
- // 6. Special VBM Properties Demo
134
- console.log("\n🌟 SPECIAL VBM PROPERTIES");
135
- console.log("-".repeat(30));
136
-
137
- // Power of Nine demonstration
138
- console.log("Power of Nine (all multiples reduce to 9):");
139
- const powerOfNine = AdvancedVBM.demonstratePowerOfNine(10);
140
- powerOfNine.slice(0, 6).forEach(({multiplier, product, digitalRoot, maintains9}) => {
141
- console.log(`9 × ${multiplier} = ${product} → ${digitalRoot} ${maintains9 ? "✓" : "✗"}`);
142
- });
143
-
144
- // Abhá Cypher (Most Great Name calculation)
145
- console.log("\nAbhá Cypher (Most Great Name of God):");
146
- const abhaCypher = AdvancedVBM.generateAbhaCypher();
147
- console.log(`B(${abhaCypher.spiritMagnetometer[1]}) + A(${abhaCypher.spiritMagnetometer[0]}) + H(${abhaCypher.spiritMagnetometer[2]}) = ${abhaCypher.bahaValue}`);
148
- console.log(`Cypher Pattern: ${abhaCypher.cypher}`);
149
- console.log(`W-Axis (Spiritual Axis): ${abhaCypher.wAxis}`);
150
-
151
- // Superfluid Mobius Circuit Properties
152
- console.log("\nSuperfluid Mobius Circuit Properties:");
153
- const superfluidity = AdvancedVBM.demonstrateSuperfluidity();
154
- console.log(`Flow: ${superfluidity.flowDirection}`);
155
- Object.entries(superfluidity.properties).forEach(([prop, value]) => {
156
- console.log(` ${prop.charAt(0).toUpperCase() + prop.slice(1)}: ${value ? "✓" : "✗"}`);
157
- });
158
-
159
- // 7. Torus Geometry Demo
160
- console.log("\n🍩 TORUS GEOMETRY");
161
- console.log("-".repeat(30));
162
-
163
- console.log("Torus Coordinates for key numbers:");
164
- [1, 3, 9, 27].forEach(n => {
165
- const coords = AdvancedVBM.calculateTorusCoordinates(n);
166
- console.log(`${n}: (${coords.x.toFixed(3)}, ${coords.y.toFixed(3)}, ${coords.z.toFixed(3)}) ` +
167
- `θ=${(coords.theta * 180 / PI).toFixed(1)}° DR=${coords.digitalRoot}`);
168
- });
169
-
170
- console.log("\n🎯 VBM TypeScript Implementation Complete!");
171
- console.log("All core mathematical patterns from Marko Rodin's work have been implemented.");
172
- console.log("Use these classes to explore Vortex Based Mathematics in your applications!");
173
-
174
- // Export usage examples
175
190
  export const VBMDemoExamples = {
176
191
  basicPatterns: () => {
177
192
  console.log("Basic VBM patterns demonstration");
178
193
  console.log("Mobius Circuit:", VortexMath.getMobiusCircuit());
179
194
  console.log("Spirit Numbers:", VortexMath.getSpiritNumbers());
180
195
  },
181
-
196
+
182
197
  advancedCalculations: () => {
183
198
  console.log("Advanced VBM calculations");
184
199
  console.log("Rodin Coil Sequence:", AdvancedVBM.generateRodinCoilSequence());
185
200
  console.log("Harmonic Shears:", AdvancedVBM.calculateHarmonicShears());
186
201
  },
187
-
202
+
188
203
  numberAnalysis: (n: number) => {
189
204
  console.log(`Analyzing number ${n}:`);
190
205
  return VBMNumberAnalyzer.analyzeNumber(n);
191
206
  },
192
-
207
+
193
208
  patternAnalysis: (sequence: number[]) => {
194
209
  console.log("Analyzing sequence for VBM patterns:");
195
210
  return VBMPatternAnalyzer.analyzeSequence(sequence);
196
211
  }
197
- };
212
+ };