{"id":25039464,"url":"https://github.com/ishanoshada/geometry-pyramid-analyzer","last_synced_at":"2026-04-30T01:39:07.162Z","repository":{"id":273090156,"uuid":"918676595","full_name":"Ishanoshada/Geometry-Pyramid-Analyzer","owner":"Ishanoshada","description":"Pyramid Geometry This repository explores the geometry of pyramids, with calculations linking pyramid parameters to mathematical constants like Pi and the Golden Ratio, and includes a formula approximating the speed of light.","archived":false,"fork":false,"pushed_at":"2025-01-22T12:28:59.000Z","size":4415,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T02:51:51.659Z","etag":null,"topics":["analysis","analytics","golang","math","pypi","pyramid","pyramid-pattern","pyramids","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ishanoshada.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-18T15:12:01.000Z","updated_at":"2025-01-22T12:29:03.000Z","dependencies_parsed_at":"2025-01-18T16:38:00.551Z","dependency_job_id":null,"html_url":"https://github.com/Ishanoshada/Geometry-Pyramid-Analyzer","commit_stats":null,"previous_names":["ishanoshada/geometry-pyramid-analyzer"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FGeometry-Pyramid-Analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FGeometry-Pyramid-Analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FGeometry-Pyramid-Analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ishanoshada%2FGeometry-Pyramid-Analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ishanoshada","download_url":"https://codeload.github.com/Ishanoshada/Geometry-Pyramid-Analyzer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246385390,"owners_count":20768668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","analytics","golang","math","pypi","pyramid","pyramid-pattern","pyramids","python"],"created_at":"2025-02-06T02:51:58.869Z","updated_at":"2026-04-30T01:39:07.155Z","avatar_url":"https://github.com/Ishanoshada.png","language":"Python","funding_links":["https://buymeacoffee.com/ishanoshada"],"categories":[],"sub_categories":[],"readme":"# Pyramid Mathematics and Geometry Calculator\n\n\n![Language](https://img.shields.io/badge/language-python-orange) ![Language](https://img.shields.io/badge/language-golang-blue)  ![License](https://img.shields.io/badge/license-MIT-green) ![GitHub Repo Size](https://img.shields.io/github/repo-size/Ishanoshada/geometry-pyramid-analyzer) ![GitHub Issues](https://img.shields.io/github/issues/Ishanoshada/geometry-pyramid-analyzer) ![GitHub Pull Requests](https://img.shields.io/github/issues-pr/Ishanoshada/geometry-pyramid-analyzer) ![GitHub Contributors](https://img.shields.io/github/contributors/Ishanoshada/geometry-pyramid-analyzer) ![GitHub Last Commit](https://img.shields.io/github/last-commit/Ishanoshada/geometry-pyramid-analyzer) ![GitHub Forks](https://img.shields.io/github/forks/Ishanoshada/geometry-pyramid-analyzer?style=social) ![GitHub Stars](https://img.shields.io/github/stars/Ishanoshada/geometry-pyramid-analyzer?style=social) ![GitHub Watchers](https://img.shields.io/github/watchers/Ishanoshada/geometry-pyramid-analyzer?style=social)\n\nThis repository contains tools for calculating pyramid dimensions, randomly generating formulas using base lengths, height, and other geometric properties, and comparing these results against known constants like π (Pi). Both **Python** and **Go** implementations are available.\n\n# Table of Contents\n\n1. [Introduction](#pyramid-mathematics-and-geometry-calculator)\n2. [Directory Structure](#directory-structure)\n3. [Project Structure](#project-structure)\n4. [Key Parameters](#key-parameters)\n5. [Special Calculations](#special-calculations)\n6. [Speed of Light Approximation](#speed-of-light-approximation)\n7. [Python Tools](#python-tools)\n   - [Key Features](#key-features)\n   - [How to Use](#how-to-use)\n   - [Example Output](#example-output)\n8. [cs.py - Supporting Constants](#cs-py---supporting-constants-for-pyramid-analysis)\n   - [Key Constants](#key-constants)\n   - [Use in pyramid_analysis.py](#use-in-pyramid_analysispy)\n9. [pyramid_viz.py](#pyramid_vizpy---visualization-and-golden-ratio-spiral)\n   - [Pyramid Calculator](#pyramid-calculator)\n10. [Go Tool](#go-tool)\n    - [Features](#features)\n    - [Usage](#usage)\n    - [Arguments](#arguments)\n    - [Output](#output)\n    - [How It Works](#how-it-works)\n11. [Analysis](#analysis)\n    - [Comparison of Ancient Egyptian Pyramids](#comparison-of-ancient-egyptian-pyramids-measurements-with-pi-and-golden-ratio)\n    - [My Best Pyramids with Pi and Golden Ratio](#My-best-pyramids-with-pi-and-golden-ratio)\n    - [Analysis of Ancient Egyptian Pyramids and Pi/Golden Ratio Relationships](#analysis-of-ancient-egyptian-pyramids-and-pigolden-ratio-relationships)\n12. [Research Contact](#research-by-ishan-oshada)\n13. [PyramidMath - A Python Package for Pyramid Geometry and Mathematical Constants](#pyramidmath---a-python-package-for-pyramid-geometry-and-mathematical-constants)\n14. [Sinhala](#sinhala)\n14. [License](#license)\n\n## Give us a ⭐️ if you find this project helpful!  \n\nIf you like this project, please consider giving it a star ⭐️ on GitHub. Your support motivates me to keep improving it!  \n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://buymeacoffee.com/ishanoshada\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" height=\"50\" alt=\"Buy Me a Coffee\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n### Directory Structure:\n\n```python\ngeometry-pyramid-analysis/\n├── README.md\n├── data/\n├── pyramid.py\n├── pyramid_analysis.py\n├── requirements.txt\n├── cs.py\n├── img/\n├── pyramid_analysis.go\n├── egypt.py\n├── my_pyramids.py\n└── pyramid_viz.py\n```\n\n\n\n### Project Structure\n\n- **pyramid.py**: Contains essential functions and classes for working with pyramid properties.\n- **pyramid_analysis.py**: Performs detailed analysis of pyramid geometries, such as calculating base areas, heights, and other geometric properties.\n- **pyramid_analysis.go**: Go-based implementation of pyramid analysis, providing an alternative backend for geometric computations.\n- **cs.py**: Constants file containing important mathematical and geometric constants used throughout the project.\n- **pyramid_viz.py**: Visualization module using graphical representations to depict pyramids and their properties.\n- **my_pyramids.py**: My pyramid calculations, including Pi and Golden Ratio differences.\n- **egypt.py**: All Egyptian pyramids, Pi, and Golden Ratio differences calculations.\n- **data/**: Directory for storing data files, such as geometric values or test datasets.\n- **img/**: Directory for storing images used for visualizations.\n- **requirements.txt**: File listing Python dependencies required for the project.\n\n![img5](/img/pyr_giza.png)\n\n## Key Parameters\n- **Base Lengths**: North and East\n- **Height**\n- **Slope Angle**\n- **Apothem**: Calculated using the Pythagorean theorem.\n- **Edge**: Distance from peak to a corner of the base.\n- **Diagonal** (same as **CG**): Calculated using  sqrt{2Base Length^2}\n\n## Special Calculations\n\n```\nThe screenshots have been used and when showing the formula from github, it comes with an error\n```\n\n![sp](/img/s1.png)\n\n![sp2](/img/s2.png)\nThis formula demonstrates how geometric constants can be linked to fundamental physics constants. The data in `data/light_of_speed.txt` played a key role in my discovery of this relationship, and the formula was devised as part of the pyramid geometry analysis in this project.\n\n**Known Values**:\n- Height: 515.28 ft\n- Base Length North: 809.4 ft\n- Base Length East: 809.4 ft\n- Apothem: 655.20651 ft\n- Diagonal Base: 1144.66446 ft\n- Half Base: 404.7 ft\n\nThe calculated value is:\n\n$$ \\text{Calculated Speed of Light} = 2.997884 \\, \\text{ft/s} $$\n\n**Actual Speed of Light**:\n\n$$ \\text{Actual Speed of Light} = 2.997924 \\times 10^8 \\, \\text{m/s} $$\n\n**Difference**:\n\n$$ \\text{Difference} = 0.000040 \\, \\text{ft/s} $$\n\n\u003cbr\u003e\nThis difference is small enough to indicate that the pyramid's dimensions, through this calculation, yield a close approximation to the actual speed of light.\n\n\n---\n\n\n## Python Tools\n\nThe Python tool uses random operations on pyramid dimensions (base lengths, height, etc.) and compares the calculated values with constants like π. It continuously runs until it finds a low difference between the calculated and actual constant values. The results are logged in a text file (`pyramid_results_n.txt`).\n\n### Key Features:\n- **Random Calculations**: Randomly combines pyramid lengths and applies random mathematical operations.\n- **Comparison with Constants**: Compares the calculated results with constants such as π and logs any low differences.\n- **Safety Checks**: Functions like `safe_tan`, `safe_cos`, `safe_sin`, and others ensure valid mathematical operations without errors.\n- **Output to File**: Results with low differences are saved to a text file for future reference.\n\n### How to Use:\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/ishanoshada/geometry-pyramid-analyzer.git\n    ```\n\n2. Install dependencies:\n    ```bash\n    pip install -r requirements.txt\n    ```\n    \n\n3. Run the Python script:\n    ```bash\n    python pyramid_analysis.py\n    ```\n    ```bash\n    python pyramid_analysis.py output.txt\n    ```\n\n4. The script will prompt you for base lengths and height, and it will start calculating and comparing values.\n\n5. Results with low differences will be printed to the console and saved to the file `pyramid_results_n.txt` | `output.txt` .\n\n\n\n## cs.py - Supporting Constants for Pyramid Analysis\n\nThe `cs.py` module provides essential constants that are utilized in the `pyramid_analysis.py` calculations. These constants are critical for performing various mathematical and geometric operations related to pyramid structures. Below is a summary of the available constants in `cs.py`:\n\n### Key Constants:\n- **Pi (`pi`)**: The constant π used in many geometric formulas.\n- **Square Roots**: The module contains square roots for small integers like 2, 3, 5, 7, and others, which are often used for geometric and trigonometric calculations.\n- **Cube and Higher Roots**: Cube roots for large numbers such as 1,000,000 and 1,250,000, along with higher-order roots for composite numbers.\n- **Irrational and Transcendental Constants**: Includes mathematical constants like the square root of 3/2 and 5/2, as well as logarithmic constants.\n- **Universal Constants**: Constants like the speed of light, gravitational constant, and Planck's constant are included for more advanced physics-related calculations.\n\n### Use in `pyramid_analysis.py`\nThe constants provided in `cs.py` are imported into `pyramid_analysis.py` and used to calculate various properties of a pyramid, such as:\n- Slope angle\n- Base lengths\n- Heights and apothems\n- Ratios involving the Golden Ratio, Tribonacci constant, and square roots of small integers.\n\nExample usage in `pyramid_analysis.py`:\n```python\n...........\nfrom cs import constants\n..........\n\n```\n\nThis integration ensures that your pyramid analysis tool can work with predefined mathematical constants, allowing for more accurate and efficient computations when dealing with pyramid geometries.\n\n\n### Example Output:\n\n```\nFormula Value: base_length_north + base_length_east / height =\u003e base_length_north, base_length_east, height\nLow Difference Found:\nConstant: pi\nCalculated Value: 3.141593\nActual Value: 3.141593\nDifference: 0.000000\nFormula Used: base_length_north + base_length_east / height\nLengths Used: base_length_north, base_length_east, height\n--------------------------------------------------\n\nLow Difference Found:\nConstant: .......\nCalculated Value: 1.618089\nActual Value: ......\nDifference: 0.000055\nFormula Used: log(log(apothem / base_length_north + base_length_east - edge))\nLengths Used: apothem, base_length_north, base_length_east, edge, diagonal_base, half_base\nLength Values: apothem = 655.20651; base_length_north = 809.40000; base_length_east = 809.40000; edge = 655.20651; diagonal_base = 1144.66446; half_base = 404.70000\n--------------------------------------------------\n\nLow Difference Found:\nConstant: power(2,2/pi)\nCalculated Value: 1.554665\nActual Value: 1.554682\nDifference: 0.000017\nFormula Used: log(apothem / base_length_east) - height + diagonal_base / half_base\nLengths Used: apothem, base_length_east, base_length_north, height, diagonal_base, half_base\nLength Values: apothem = 655.20651; base_length_east = 809.40000; base_length_north = 809.40000; height = 515.28000; diagonal_base = 1144.66446; half_base = 404.70000\n--------------------------------------------------\n\n```\n\n\n\n\n## Usage:\nRun the `pyramid.py` file from your terminal or command prompt.\n\n```bash\npython pyramid.py\n```\n\nYou will be prompted with two options:\n1. **Enter angle to predict dimensions**:\n    - You can provide a slope angle and either the height or base length to predict the other parameters.\n    - Select the desired constraint (height or base length).\n\n2. **Enter known dimensions**:\n    - Manually input base lengths (north/east) and height to perform calculations.\n\nThe tool will then output:\n- The pyramid's calculated dimensions.\n- Comparisons with mathematical constants like π, φ (Golden Ratio), Tribonacci, √5, etc.\n- A spiral visualization generated from the Golden Ratio.\n\n## Example Output:\n### Example 1: Entering slope angle to predict dimensions\n```\nPyramid Calculator\n1. Enter angle to predict dimensions\n2. Enter known dimensions\nChoose option (1 or 2): 1\nEnter slope angle in degrees: 51\nSelect constraint:\n1. Specify desired height\n2. Specify desired base length\n3. Use default height (481 feet)\nChoose constraint (1, 2, or 3): 1\nEnter desired height in feet: 500\n\nDetailed Analysis of Pyramid with 51° slope:\n\nMeasurements and Calculated Values:\nNorth Base Length: 640.27 ft\nEastern Base Length: 640.27 ft\nHeight: 500.00 ft\n\nApothem = 640.36122669\nDiagonal = 904.28967846\nEdge Length: 640.27 ft\n\nSpecial Calculations vs Mathematical Constants:\n(North base + Eastern base) / Height = 2.56109075\nActual π value = 3.14159265\nDifference from π = 0.58050189\nMy Method 1: (sin(North base / (Eastern base / 2) / Height) * North base) = 3.14160107 , diff = 0.58050842 \nMy Method 2: (calculate_apothem()-calculate_edge()+base_length_north/self.height*base_length_east/half_base) = 3.14160107 , diff = 0.58050842\n\nEdge / (Base length / 2) = 1.99999999\nActual φ (Golden Ratio) = 1.61803399\nDifference from φ = 0.38196600\n\nApothem / Height = 1.28072245\nActual √φ = 1.27201965\nDifference from √φ = 0.00870280\n\nPyramid Slope Angle: 51.000000 degrees\n\nDiagonal base / Base Length = 1.41421356\nDifference from √2 = 0.00000000\n\nCalculated Tribonacci Constant = 1.83928676\nActual Tribonacci Constant = 1.8393\nDifference from Tribonacci Constant = 0.00000000\n\n(Base Length + Apothem) / Apothem = 1.99856565\nActual √5 = 2.23606798\nDifference from √5 = 0.23750233\n\n(Height + CG + CG) / (North Base + Eastern Base) = 1.73205080\nActual √3 = 1.73205081\nDifference from √3 = 0.00000001\n\nApothem / (Apothem + Half Base Length) = 0.81812425\nActual φ - 1 = 0.61803399\nDifference from φ - 1 = 0.20009026\n\nSpiral Visualizing Golden Ratio...\n\n```\n\n### Example 2: Entering known dimensions\n```\nPyramid Calculator\n1. Enter angle to predict dimensions\n2. Enter known dimensions\nChoose option (1 or 2): 2\nEnter base length north in feet: 640\nEnter base length east in feet: 640\nEnter height in feet: 500\n\nDetailed Analysis of Custom Pyramid:\n\nMeasurements and Calculated Values:\nNorth Base Length: 640.00 ft\nEastern Base Length: 640.00 ft\nHeight: 500.00 ft\n\nApothem = 640.36122669\nDiagonal = 904.28967846\nEdge Length: 640.00 ft\n\nSpecial Calculations vs Mathematical Constants:\n(North base + Eastern base) / Height = 2.56109075\nActual π value = 3.14159265\nDifference from π = 0.58050189\nMy Method 1: (sin(North base / (Eastern base / 2) / Height) * North base) = 3.14160107 , diff = 0.58050842 \nMy Method 2: (calculate_apothem()-calculate_edge()+base_length_north/self.height*base_length_east/half_base) = 3.14160107 , diff = 0.58050842\n\nEdge / (Base length / 2) = 1.99999999\nActual φ (Golden Ratio) = 1.61803399\nDifference from φ = 0.38196600\n\nApothem / Height = 1.28072245\nActual √φ = 1.27201965\n\n\nDifference from √φ = 0.00870280\n\nPyramid Slope Angle: 51.000000 degrees\n\nDiagonal base / Base Length = 1.41421356\nDifference from √2 = 0.00000000\n\nCalculated Tribonacci Constant = 1.83928676\nActual Tribonacci Constant = 1.8393\nDifference from Tribonacci Constant = 0.00000000\n\n(Base Length + Apothem) / Apothem = 1.99856565\nActual √5 = 2.23606798\nDifference from √5 = 0.23750233\n\n(Height + CG + CG) / (North Base + Eastern Base) = 1.73205080\nActual √3 = 1.73205081\nDifference from √3 = 0.00000001\n\nApothem / (Apothem + Half Base Length) = 0.81812425\nActual φ - 1 = 0.61803399\nDifference from φ - 1 = 0.20009026\n```\nHere's an updated section for the `README.md` with the usage details for `pyramid_viz.py` and the pyramid calculator example:\n\n---\n\n### `pyramid_viz.py` - Visualization and Golden Ratio Spiral\n\nThe `pyramid_viz.py` script allows you to visualize pyramids in 2D and also draws a pyramid based on the golden ratio value, which relates to the golden spiral. You can use it to explore the geometric properties of pyramids, and the script can calculate values such as apothem, diagonal, and edge length. Additionally, it compares the calculated values to mathematical constants like Pi.\n\n### Pyramid Calculator\n\nThis section lets you interact with the pyramid calculator. You can either input dimensions to predict the pyramid's properties or enter known dimensions for a detailed analysis.\n\n#### Example of Usage:\n\n1. **Enter angle to predict dimensions** or **Enter known dimensions**.\n2. **Choose option (1 or 2)** to proceed.\n\n**Example output:**\n\n```bash\nPyramid Calculator\n1. Enter angle to predict dimensions\n2. Enter known dimensions\nChoose option (1 or 2): 2\nEnter base length north in feet: 809.4\nEnter base length east in feet: 809.4\nEnter height in feet: 515.28\n\nDetailed Analysis of Custom Pyramid:\n\nMeasurements and Calculated Values:\nNorth Base Length: 809.40 ft\nEastern Base Length: 809.40 ft\nHeight: 515.28 ft\n\nApothem = 655.20650821\nDiagonal = 1144.66445738\nEdge Length: 655.21 ft\n\nSpecial Calculations vs Mathematical Constants:\n(North base + Eastern base) / Height = 3.14159292\nActual π value = 3.14159265\nDifference from π = 0.00000027\nMy Method 1: (sin(North base / (Eastern base / 2) / Height) * North base) = 3.1415850322659074\n...\n```\n\n![img2](/img/pyramid.png)\n![img3](/img/spiral.png)\n\n---\n\n\n## Go Tool\n\nThe Go implementation performs similar calculations but in a statically typed language. It allows for efficient, concurrent processing and can be used for large-scale computations or when performance is a critical factor.\n\n### Key Features:\n- **Pyramid Calculations**: Similar to the Python tool, Go performs random calculations with the base lengths, height, and other pyramid parameters.\n- **Comparison with Constants**: Finds and reports low differences between calculated values and known constants like π.\n- **Efficient and Concurrent**: Can be extended to handle concurrent calculations and large datasets.\n\n### How to Use:\n\n2. Build the Go tool:\n    ```bash\n    go build pyramid_analysis.go\n    ```\n\n3. Run the Go tool:\n    ```bash\n    ./pyramid_analysis\n    ```\n\n4. Similar to the Python version, the Go tool will prompt you for base lengths and height and begin comparing results with constants.\n\n## Features\n\n- **Constant Approximation**: Detect configurations approximating π or Φ with high precision.\n- **Customizable Ranges**: Specify base length and height ranges for analysis.\n- **Step Control**: Fine-tune the granularity of the analysis by adjusting step sizes.\n- **Output File**: Save results in a neatly formatted, sorted text file.\n- **Graceful Exit**: Responds to termination signals, ensuring clean exits.\n\n---\n\n## Usage\n\nRun the application using command-line flags to configure the analysis.\n\n### Syntax\n\n```bash\ngo run pyramid_analysis.go --base=\u003cbase_range\u003e --height=\u003cheight_range\u003e --output=\u003coutput_file\u003e --basestep=\u003cbase_step\u003e --heightstep=\u003cheight_step\u003e\n```\n\n### Arguments\n\n| Flag           | Description                                             | Default       |\n|----------------|---------------------------------------------------------|---------------|\n| `--base`       | Base length range in the format `start-end`.            | `100-200`     |\n| `--height`     | Height range in the format `start-end`.                 | `100-200`     |\n| `--output`     | File to save the analysis results.                      | `data.txt`    |\n| `--basestep`   | Increment step for the base length during analysis.     | `1`           |\n| `--heightstep` | Increment step for the height during analysis.          | `1`           |\n\n### Example\n\nTo analyze a base range of `150-160` and height range of `130-140` with step sizes of `0.5` for both dimensions, and save results to `results.txt`:\n\n```bash\ngo run pyramid_analysis.go --base=150-160 --height=130-140 --output=results.txt --basestep=0.5 --heightstep=0.5\n```\n\n---\n\n## Output\n\nThe program outputs a file (e.g., `results.txt`) containing a table of results:\n\n```\nConstant Name   Base Length     Height          Calculated Pi        Pi Difference        Calculated GR        GR Difference       \nπ               756.0400        481.3100        3.1415927365         0.0000000829         1.6189931602         0.0009591714        \nπ               755.9300        481.2400        3.1415925526         0.0000001010         1.6189932188         0.0009592301        \nπ               756.1500        481.3800        3.1415929204         0.0000002668         1.6189931016         0.0009591128        \nπ               755.8200        481.1700        3.1415923686         0.0000002850         1.6189932774         0.0009592887        \nπ               756.2600        481.4500        3.1415931042         0.0000004506         1.6189930430         0.0009590542        \nπ               755.7100        481.1000        3.1415921846         0.0000004690         1.6189933361         0.0009593473        \nπ               756.3700        481.5200        3.1415932879         0.0000006343         1.6189929844         0.0009589957        \nπ               755.6000        481.0300        3.1415920005         0.0000006531         1.6189933948         0.0009594060        \nπ               756.4800        481.5900        3.1415934716         0.0000008180         1.6189929259         0.0009589371        \nπ               755.4900        480.9600        3.1415918164         0.0000008372         1.6189934535         0.0009594647        \nπ               756.5900        481.6600        3.1415936553         0.0000010017         1.6189928673         0.0009588786        \nπ               755.3800        480.8900        3.1415916322         0.0000010214         1.6189935122         0.0009595234        \nπ               756.7000        481.7300        3.1415938389         0.0000011853         1.6189928088         0.0009588201        \nπ               755.2700        480.8200        3.1415914479         0.0000012056         1.6189935709         0.0009595821        \nπ               756.8100        481.8000        3.1415940224         0.0000013688         1.6189927503         0.0009587616        \nπ               755.1600        480.7500        3.1415912637         0.0000013899         1.6189936296         0.0009596409        \nπ               756.9200        481.8700        3.1415942059         0.0000015523         1.6189926918         0.0009587031        \nπ               755.0500        480.6800        3.1415910793         0.0000015743         1.6189936884         0.0009596996        \nπ               757.0300        481.9400        3.1415943893         0.0000017358         1.6189926334         0.0009586446        \nπ               754.9400        480.6100        3.1415908949         0.0000017587         1.6189937472         0.0009597584        \nπ               757.1400        482.0100        3.1415945727         0.0000019191         1.6189925749         0.0009585862        \nπ               754.8300        480.5400        3.1415907105         0.0000019431         1.6189938059         0.0009598172        \nπ               757.2500        482.0800        3.1415947561         0.0000021025         1.6189925165         0.0009585277        \nπ               754.7200        480.4700        3.1415905259         0.0000021276         1.6189938648         0.0009598760        \nπ               757.3600        482.1500        3.1415949393         0.0000022857         1.6189924581         0.0009584693        \nπ               754.6100        480.4000        3.1415903414         0.0000023122         1.6189939236         0.0009599348    \nGolden Ratio    756.1500        481.2100        3.1427027701         0.0011101165         1.6186395060         0.0006055173        \nGolden Ratio    756.2600        481.2800        3.1427027926         0.0011101390         1.6186394989         0.0006055101        \nπ               757.6100        482.4800        3.1404825070         0.0011101465         1.6193471745         0.0013131858        \nGolden Ratio    756.3700        481.3500        3.1427028150         0.0011101614         1.6186394917         0.0006055030        \nπ               755.7100        481.2700        3.1404824735         0.0011101801         1.6193471852         0.0013131965        \nGolden Ratio    756.4800        481.4200        3.1427028374         0.0011101838         1.6186394846         0.0006054958        \nGolden Ratio    756.5900        481.4900        3.1427028599         0.0011102063         1.6186394774         0.0006054887        \nGolden Ratio    756.7000        481.5600        3.1427028823         0.0011102287         1.6186394703         0.0006054816        \nGolden Ratio    756.8100        481.6300        3.1427029047         0.0011102511         1.6186394632         0.0006054744        \nGolden Ratio    756.9200        481.7000        3.1427029271         0.0011102735         1.6186394560         0.0006054673        \nGolden Ratio    757.0300        481.7700        3.1427029495         0.0011102960         1.6186394489         0.0006054601        \nGolden Ratio    757.1400        481.8400        3.1427029719         0.0011103184         1.6186394418         0.0006054530        \nGolden Ratio    757.2500        481.9100        3.1427029943         0.0011103407         1.6186394346         0.0006054459        \nGolden Ratio    757.3600        481.9800        3.1427030167         0.0011103631         1.6186394275         0.0006054387        \nGolden Ratio    757.4700        482.0500        3.1427030391         0.0011103855         1.6186394204         0.0006054316        \nGolden Ratio    757.5800        482.1200        3.1427030615         0.0011104079         1.6186394132         0.0006054245        \nGolden Ratio    757.6900        482.1900        3.1427030838         0.0011104303         1.6186394061         0.0006054174        \nGolden Ratio    757.8000        482.2600        3.1427031062         0.0011104526         1.6186393990         0.0006054103        \nGolden Ratio    757.9100        482.3300        3.1427031286         0.0011104750         1.6186393919         0.0006054031        \nπ               757.5000        482.4100        3.1404821625         0.0011104911         1.6193472844         0.0013132957        \nπ               755.6000        481.2000        3.1404821280         0.0011105256         1.6193472954         0.0013133067        \nπ               757.3900        482.3400        3.1404818178         0.0011108358         1.6193473944         0.0013134056        \n```\n\n---\n\n## How It Works\n\n1. **Iterative Analysis**: \n   - For each combination of base length and height within the specified ranges, the program calculates:\n     - Approximation of **π**: `2 × base length / height`\n     - Approximation of **Φ**: Ratio of pyramid's edge length to half its base.\n   \n2. **Constant Crossing Detection**:\n   - Identifies dimensions where the calculated constants are within a small difference (`\u003c0.01`) of the actual values.\n\n3. **Result Sorting**:\n   - Prioritizes configurations with the smallest difference for **π** and **Φ**.\n\n4. **Signal Handling**:\n   - Ensures that partial progress is not lost if the program is interrupted.\n\n---\n\u003cbr\u003e\n\n# Analysis\n\n## Comparison of Ancient Egyptian Pyramids' Measurements with Pi and Golden Ratio\n\n\n| Pyramid | Height (m) | Base Length (m) | Pi Comparison | Pi Difference | Golden Ratio Comparison | Golden Ratio Difference |\n|---------|------------|-----------------|---------------|---------------|------------------------|-------------------------|\n| Great Pyramid (Pyramid of Khufu) | 480.971144 | 755.905536 | 3.1432 | 0.001654277 | 1.6185 | 0.000432258 |\n| Pyramid of Khafre | 470.80054 | 706.364852 | 3.0007 | 0.140895789 | 1.6664 | 0.048384972 |\n| Pyramid of Menkaure | 213.2546 | 335.301848 | 3.1446 | 0.003022731 | 1.6180 | 0.000003140 |\n| Pyramid of Djoser (Step Pyramid) | 203.41208 | 357.61156 | 3.5161 | 0.374536379 | 1.5147 | 0.103383152 |\n| Pyramid of Sneferu (Bent Pyramid) | 344.4882 | 618.766424 | 3.5924 | 0.450788299 | 1.4966 | 0.121434436 |\n| Pyramid of Sneferu (Red Pyramid) | 341.20736 | 721.7848 | 4.2308 | 1.089176577 | 1.3762 | 0.241849300 |\n| Pyramid of Teti | 170.60368 | 255.90552 | 3.0000 | 0.141592654 | 1.6667 | 0.048632678 |\n| Pyramid of Amenemhat II | 180.4462 | 344.4882 | 3.8182 | 0.676589165 | 1.4483 | 0.169757196 |\n| Pyramid of Unas | 141.07612 | 221.4567 | 3.1395 | 0.002057770 | 1.6196 | 0.001615586 |\n| Pyramid of Userkaf | 160.76116 | 237.8609 | 2.9592 | 0.182408980 | 1.6814 | 0.063381530 |\n| Pyramid of Sahure | 154.19948 | 255.90552 | 3.3191 | 0.177556283 | 1.5660 | 0.052041016 |\n| Pyramid of Neferirkare | 196.8504 | 344.4882 | 3.5000 | 0.358407346 | 1.5186 | 0.099441730 |\n| Pyramid of Niuserre | 164.042 | 344.4882 | 4.2000 | 1.058407346 | 1.3810 | 0.237081608 |\n| Pyramid of Amenemhat I | 164.042 | 328.084 | 4.0000 | 0.858407346 | 1.4142 | 0.203820426 |\n| Pyramid of Amenemhat III | 173.88452 | 301.83728 | 3.4717 | 0.330105460 | 1.5256 | 0.092417810 |\n| Pyramid of Senusret II | 157.48032 | 255.90552 | 3.2500 | 0.108407346 | 1.5858 | 0.032224133 |\n| Pyramid of Pepi I | 172.2441 | 257.54594 | 2.9905 | 0.151116463 | 1.6701 | 0.052031649 |\n| Pyramid of Merenre | 164.042 | 246.063 | 3.0000 | 0.141592654 | 1.6667 | 0.048632678 |\n| Pyramid of Pepi II | 170.60368 | 259.18636 | 3.0385 | 0.103131115 | 1.6532 | 0.035161583 |\n| Pyramid of Khendjer | 121.39108 | 170.60368 | 2.8108 | 0.330781843 | 1.7393 | 0.121261250 |\n| Pyramid of Ibi | 114.82939999999999 | 196.8504 | 3.4286 | 0.286978775 | 1.5366 | 0.081443246 |\n| Pyramid of Qakare Ibi | 104.98688 | 180.4462 | 3.4375 | 0.295907346 | 1.5343 | 0.083742756 |\n| Pyramid of Khui | 131.2336 | 203.41208 | 3.1000 | 0.041592654 | 1.6325 | 0.014428067 |\n| Pyramid of Senusret III | 200.13124 | 344.4882 | 3.4426 | 0.301030297 | 1.5330 | 0.085055621 |\n| Pyramid of Neferuptah | 114.82939999999999 | 147.6378 | 2.5714 | 0.570164082 | 1.8493 | 0.231223453 |\n| Meidum Pyramid | 301.83728 | 472.44096 | 3.1304 | 0.011157871 | 1.6226 | 0.004530663 |\n| Southern Pyramid of Mazghuna | 114.82939999999999 | 170.60368 | 2.9714 | 0.170164082 | 1.6769 | 0.058906731 |\n| Northern Pyramid of Mazghuna | 104.98688 | 164.042 | 3.1250 | 0.016592654 | 1.6243 | 0.006281252 |\n| Pyramid of Sekhemkhet | 147.6378 | 229.65879999999999 | 3.1111 | 0.030481542 | 1.6288 | 0.010788047 |\n| Layer Pyramid | 141.07612 | 278.8714 | 3.9535 | 0.811895719 | 1.4226 | 0.195477199 |\n\n\n![img4](/img/pyra_deta.png)\n\n## My Best Pyramids with Pi and Golden Ratio\n\n| Pyramid | Height (ft) | Base Length (ft) | Pi Comparison | Pi Difference | Golden Ratio Comparison | Golden Ratio Difference |\n|---------|------------|-----------------|---------------|---------------|------------------------|-------------------------|\n| my_pyramid1 | 515.28 | 809.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid2 | 524.32 | 823.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid3 | 506.24 | 795.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid4 | 533.36 | 837.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid5 | 542.4 | 852.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid6 | 551.44 | 866.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid7 | 497.2 | 781.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid8 | 560.48 | 880.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid9 | 569.52 | 894.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid10 | 578.56 | 908.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid11 | 488.16 | 766.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid12 | 587.6 | 923.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid13 | 596.64 | 937.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid14 | 605.68 | 951.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid15 | 614.72 | 965.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid16 | 479.12 | 752.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid17 | 623.76 | 979.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid18 | 632.8 | 994.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid19 | 470.08 | 738.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid20 | 461.04 | 724.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid21 | 452.0 | 710.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid22 | 442.96 | 695.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid23 | 433.92 | 681.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid24 | 424.88 | 667.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid25 | 415.84 | 653.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid26 | 406.8 | 639.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid27 | 397.76 | 624.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid28 | 388.72 | 610.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid29 | 126.56 | 198.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid30 | 135.6 | 213.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid31 | 144.64 | 227.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid32 | 153.68 | 241.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid33 | 162.72 | 255.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid34 | 117.52 | 184.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid35 | 379.68 | 596.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid36 | 108.48 | 170.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid37 | 171.76 | 269.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid38 | 370.64 | 582.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid39 | 99.44 | 156.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid40 | 180.8 | 284.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid41 | 361.6 | 568.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid42 | 90.4 | 142.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid43 | 189.84 | 298.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid44 | 352.56 | 553.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid45 | 198.88 | 312.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid46 | 343.52 | 539.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid47 | 207.92 | 326.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid48 | 216.96 | 340.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid49 | 334.48 | 525.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid50 | 226.0 | 355.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid51 | 325.44 | 511.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid52 | 235.04 | 369.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid53 | 316.4 | 497.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid54 | 307.36 | 482.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid55 | 298.32 | 468.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid56 | 289.28 | 454.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid57 | 244.08 | 383.4 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid58 | 280.24 | 440.2 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid59 | 271.2 | 426.0 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid60 | 253.12 | 397.6 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid61 | 262.16 | 411.8 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid62 | 481.31 | 756.04 | 3.1416 | 0.000000083 | 1.6190 | 0.000959171 |\n| my_pyramid63 | 481.24 | 755.93 | 3.1416 | 0.000000101 | 1.6190 | 0.000959230 |\n| my_pyramid64 | 481.38 | 756.15 | 3.1416 | 0.000000267 | 1.6190 | 0.000959113 |\n| my_pyramid65 | 481.17 | 755.82 | 3.1416 | 0.000000285 | 1.6190 | 0.000959289 |\n| my_pyramid66 | 481.45 | 756.26 | 3.1416 | 0.000000451 | 1.6190 | 0.000959054 |\n| my_pyramid67 | 481.1 | 755.71 | 3.1416 | 0.000000469 | 1.6190 | 0.000959347 |\n| my_pyramid68 | 481.52 | 756.37 | 3.1416 | 0.000000634 | 1.6190 | 0.000958996 |\n| my_pyramid69 | 481.03 | 755.6 | 3.1416 | 0.000000653 | 1.6190 | 0.000959406 |\n| my_pyramid70 | 481.59 | 756.48 | 3.1416 | 0.000000818 | 1.6190 | 0.000958937 |\n| my_pyramid71 | 480.96 | 755.49 | 3.1416 | 0.000000837 | 1.6190 | 0.000959465 |\n| my_pyramid72 | 549.08 | 863.32 | 3.1446 | 0.003012868 | 1.6180 | 0.000000003 |\n| my_pyramid73 | 424.88 | 668.04 | 3.1446 | 0.003012882 | 1.6180 | 0.000000008 |\n| my_pyramid74 | 496.8 | 781.12 | 3.1446 | 0.003012821 | 1.6180 | 0.000000011 |\n| my_pyramid75 | 621.0 | 976.4 | 3.1446 | 0.003012821 | 1.6180 | 0.000000011 |\n| my_pyramid76 | 124.2 | 195.28 | 3.1446 | 0.003012821 | 1.6180 | 0.000000011 |\n| my_pyramid77 | 372.6 | 585.84 | 3.1446 | 0.003012821 | 1.6180 | 0.000000011 |\n| my_pyramid78 | 248.4 | 390.56 | 3.1446 | 0.003012821 | 1.6180 | 0.000000011 |\n| my_pyramid79 | 549.08 | 863.32 | 3.1446 | 0.003012868 | 1.6180 | 0.000000003 |\n| my_pyramid80 | 424.88 | 668.04 | 3.1446 | 0.003012882 | 1.6180 | 0.000000008 |\n| my_pyramid81 | 394.8 | 623.24 | 3.1572 | 0.015651521 | 1.6140 | 0.004000000 |\n| my_pyramid82 | 575.36 | 904.64 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid83 | 431.52 | 678.48 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid84 | 143.84 | 226.16 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid85 | 359.6 | 565.4 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid86 | 215.76 | 339.24 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid87 | 287.68 | 452.32 | 3.1446 | 0.003012463 | 1.6180 | 0.000000125 |\n| my_pyramid88 | 0.043 | 0.0676 | 3.1442 | 0.002593393 | 1.6182 | 0.000133413 |\n| my_pyramid89 | 336.64 | 529.3 | 3.1446 | 0.003012860 | 1.6180 | 0.000000001 |\n| my_pyramid90 | 491.89 | 773.4 | 3.1446 | 0.003012848 | 1.6180 | 0.000000003 |\n| my_pyramid91 | 518.03 | 814.5 | 3.1446 | 0.003012871 | 1.6180 | 0.000000004 |\n| my_pyramid92 | 181.39 | 285.2 | 3.1446 | 0.003012892 | 1.6180 | 0.000000011 |\n| my_pyramid93 | 362.78 | 570.4 | 3.1446 | 0.003012892 | 1.6180 | 0.000000011 |\n| my_pyramid94 | 544.17 | 855.6 | 3.1446 | 0.003012892 | 1.6180 | 0.000000011 |\n| my_pyramid95 | 0.043 | 0.0676 | 3.1442 | 0.002593393 | 1.6182 | 0.000133413 |\n\n## Analysis of Ancient Egyptian Pyramids and Pi/Golden Ratio Relationships\n\n![img6](/img/py7.png)\n\n### Observations\n\n1. **Pi Comparison**:\n   - The ratio between the base length and height of the Great Pyramid of Giza (Khufu) shows remarkable closeness to \\(\\pi\\) (3.1432), with a minimal difference of 0.0017.\n   - Many other pyramids, such as Menkaure (3.1446) and Unas (3.1395), have proportions close to \\(\\pi\\), but others, like the Red Pyramid (4.2308), deviate significantly.\n   - Pyramids such as Teti (3.0000) and Khendjer (2.8108) have ratios far removed from \\(\\pi\\), indicating variability in the architectural intent or design constraints.\n\n2. **Golden Ratio**:\n   - All pyramids have a consistent golden ratio comparison difference of 0.3819, suggesting the golden ratio was not directly used in most ancient pyramid constructions.\n   - This consistency in deviation hints that the golden ratio was likely coincidental rather than intentional in Egyptian pyramid designs.\n\n3. **Deviation from Precision**:\n   - Pyramids like Djoser (3.5161) and Amenemhat II (3.8182) exhibit large deviations from both \\(\\pi\\) and the golden ratio, possibly due to their non-standard designs or structural limitations.\n   - Earlier pyramids (e.g., Step Pyramid of Djoser) show less adherence to the mathematical proportions observed in later structures like the Great Pyramid.\n\n4. **Custom Pyramids and Precision**:\n   - In contrast to ancient pyramids, the \"my_pyramid\" series displays extreme precision with a pi ratio of 3.1416 and golden ratio of 1.6190, almost perfectly aligning with mathematical values. \n   - This level of precision is reflective of modern computational methods and could symbolize what ancient builders might have achieved with advanced tools and knowledge.\n\n5. **Variation by Period**:\n   - Old Kingdom pyramids (e.g., Khufu, Khafre) display closer adherence to \\(\\pi\\) compared to Middle and Late Kingdom pyramids, which show greater deviations.\n   - This suggests a potential decline in precision engineering or a shift in architectural priorities over time.\n\n![img1](/img/pyr4.png)\n\n### Key Findings\n- The Great Pyramid remains the closest to \\(\\pi\\), supporting theories of advanced mathematical understanding during its construction.\n- The golden ratio does not appear to be a deliberate design element but may have emerged naturally in some cases due to structural aesthetics or practical constraints.\n- Modern precise pyramids (e.g., \"my_pyramid\" series) highlight the limitations of ancient construction methods while showcasing the possibilities of intentional mathematical design.\n\n### Implications\nThis analysis underscores the mathematical ingenuity of ancient Egyptian architects, particularly in the Great Pyramid. While other pyramids suggest varying levels of precision and intent, the diversity in designs reflects a blend of practical, aesthetic, and possibly symbolic considerations, rather than a universal application of mathematical constants like \\(\\pi\\) or the golden ratio.\n\n![img8](/img/pyr1.png)\n\n# Research by Ishan Oshada  \nEmail: [ishan.kodithuwakku.offical@gmail.com](ishan.kodithuwakku.offical@gmail.com)\n\n\n\n# PyramidMath - A Python Package for Pyramid Geometry and Mathematical Constants\n\n**Overview**  \n`pyramid_math` is a Python package designed for anyone interested in exploring the geometry of pyramids, specifically their relationship to mathematical constants such as Pi (\\(\\pi\\)), the Golden Ratio (\\(\\phi\\)), and the Tribonacci constant. The package provides tools for calculating key pyramid properties like the apothem, edge length, slope angle, and more, all while comparing these measurements to well-known mathematical constants.\n\nThis package offers a practical way to study ancient Egyptian pyramids, including the Great Pyramid of Giza, Pyramid of Khafre, and others, as well as custom pyramids. It also enables users to perform detailed analyses of these iconic structures and provides insight into how ancient engineers might have utilized mathematical concepts.\n\n**Mathematical Significance**  \nBy using the package, users can calculate various pyramid properties and compare them with mathematical constants. This comparison may offer clues about ancient Egyptian understanding of geometry, mathematics, and proportions in architectural design.\n\n---\n\n### Features and Benefits\n\n- **Geometrical Calculations**: Automatically calculates the apothem, edge length, and slope angle of a pyramid.\n- **Comparison with Constants**: Compares various pyramid dimensions to mathematical constants like \\(\\pi\\), \\(\\phi\\), and the Tribonacci constant.\n- **Predefined and Custom Pyramids**: Users can access predefined pyramids such as the Great Pyramid of Giza, or create their own custom pyramids by inputting measurements.\n- **Educational Tool**: Great for students, researchers, and math enthusiasts interested in exploring the mathematical properties of pyramids.\n\n---\n\n### Installation\n\nYou can easily install `pyramid_math` via `pip` from PyPI:\n\n```bash\npip install pyramid_math\n```\n\nOr you can visit the GitHub repository to explore the source code and contribute to the project:\n\n[GitHub Repository - Pyramid Math](https://github.com/Ishanoshada/Pyramid-Math/)\n\n---\n\n### Enhanced Usage Examples\n\nBelow are enhanced descriptions of some of the features of the package, which include examples of how to use the package for detailed analyses:\n\n1. **Predefined Pyramid Example**:\n   - This is useful for those who want to explore the properties of famous pyramids, such as the Great Pyramid of Giza. When you perform a detailed analysis on a predefined pyramid, it automatically compares the pyramid’s measurements with the values of \\(\\pi\\) and \\(\\phi\\), offering insight into ancient Egyptian construction techniques and their possible use of these constants.\n\n   ```python\n   # Load the Great Pyramid of Giza from the predefined database\n   giza = Pyramid.from_database(\"great_pyramid_giza\")\n\n   # Perform detailed analysis\n   giza.detailed_analysis(json=False)\n   ```\n\n2. **Custom Pyramid Example**:\n   - This allows you to input any pyramid’s dimensions and run the package’s special calculations, providing detailed insights into how the pyramid compares to known mathematical constants.\n\n   ```python\n   # Create a custom pyramid with specified measurements (base lengths and height)\n   pyramid = Pyramid(\"Test Pyramid\", 100, 100, 50)\n\n   # Perform special calculations on the custom pyramid\n   special_calcs = pyramid.perform_special_calculations()\n   print(special_calcs)\n   ```\n\n3. **Mathematical Constants and Comparisons**:\n   - The most exciting aspect of this package is the ability to compare pyramid measurements with well-known mathematical constants, including:\n     - **π (Pi)**: The ratio of the perimeter to the height.\n     - **φ (Golden Ratio)**: The ratio of the edge length to half the base length.\n     - **Tribonacci Constant**: A constant derived from the geometry of the pyramid.\n     - **√5, √3**: Square roots of well-known constants compared with pyramid measurements.\n\n---\n\n### Detailed Output Example:\n\nThe detailed analysis output can help you compare various calculated and theoretical constants:\n\n```bash\nDetailed Analysis of Great Pyramid of Giza:\nMeasurements and Calculated Values:\nNorth Base Length: 756.00 ft\nEastern Base Length: 756.00 ft\nHeight: 481.00 ft\n\nSpecial Calculations vs Mathematical Constants:\n(North base + Eastern base) / Height = 3.1454\nActual π value = 3.1416\nDifference from π = 0.0038\n\nEdge / (Base length / 2) = 1.6180\nActual φ (Golden Ratio) = 1.6180\nDifference from φ = 0.0000\n\nApothem / Height = 0.7273\nActual √φ = 0.8510\nDifference from √φ = 0.1237\n\nPyramid Slope Angle: 51.84 degrees\n\ncalculate_diagonal (CG) / Base Length = 0.9220\nDifference from √2 = 0.0214\n\nCalculated Tribonacci Constant = 1.8393\nActual Tribonacci Constant = 1.8393\nDifference from Tribonacci Constant = 0.0000\n\n(Base Length + Apothem) / Apothem = 2.6180\nActual √5 = 2.2361\nDifference from √5 = 0.3819\n```\n\nThis analysis not only compares dimensions but also highlights the closeness to the constants, revealing how precisely the pyramids' proportions match certain mathematical relationships.\n\n---\n\n## Sinhala\n\nFor a detailed explanation of the pyramid analysis in **Sinhala**, you can read the blog post here:\n\n[Read the blog in Sinhala: Pyramid Analysis](https://ishan-oshada.vercel.app/post/Pyramid-Analysis-si/)\n\n\n\n## License\n\nThis repository is licensed under the MIT License. See `LICENSE` for more information.\n\n\n\n**Repository Views** ![Views](https://profile-counter.glitch.me/pyramids/count.svg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanoshada%2Fgeometry-pyramid-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishanoshada%2Fgeometry-pyramid-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishanoshada%2Fgeometry-pyramid-analyzer/lists"}