Metadata-Version: 2.4
Name: fit-3d-plane
Version: 0.1.0
Summary: Given a set of discrete points in 3D space (with at least three non-collinear points), fit a plane using these points.
License: MIT
License-File: LICENSE
Author: GGN_2015
Author-email: neko@jlulug.org
Requires-Python: >=3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: numpy
Description-Content-Type: text/markdown

# fit_3d_plane
Given a set of discrete points in 3D space (with at least three non-collinear points), fit a plane using these points.

## Installation

```bash
pip install fit_3d_plane
```

## Usage

```python
from fit_3d_plane import fit_3d_plane

# Test 3D points (these points lie on the z=0 plane)
test_points = [
    [0, 0, 0],
    [1, 0, 0],
    [0, 1, 0],
    [1, 1, 0],
    [2, 3, 0]
]

# Fit plane
normal_vector, plane_eq = fit_3d_plane(test_points)

# Print results
print(f"Fitted plane normal vector: {normal_vector}")
print(f"Plane equation: {plane_eq[0]:.6f}x + {plane_eq[1]:.6f}y + {plane_eq[2]:.6f}z + {plane_eq[3]:.6f} = 0")
```

