Files
orx/orx-math/README.md
2025-08-27 19:48:23 +00:00

66 lines
2.0 KiB
Markdown

# orx-math
Mathematical utilities
<!-- __demos__ -->
## Demos
### linearrange/DemoLinearRange02
![linearrange-DemoLinearRange02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/linearrange-DemoLinearRange02Kt.png)
[source code](src/jvmDemo/kotlin/linearrange/DemoLinearRange02.kt)
### linearrange/DemoLinearRange03
![linearrange-DemoLinearRange03Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/linearrange-DemoLinearRange03Kt.png)
[source code](src/jvmDemo/kotlin/linearrange/DemoLinearRange03.kt)
### matrix/DemoLeastSquares01
Demonstrate least squares method to find a regression line through noisy points
Line drawn in red is the estimated line, in green is the ground-truth line
Ax = b => x = A⁻¹b
because A is likely inconsistent, we look for an approximate x based on AᵀA, which is consistent.
x̂ = (AᵀA)⁻¹ Aᵀb
![matrix-DemoLeastSquares01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/matrix-DemoLeastSquares01Kt.png)
[source code](src/jvmDemo/kotlin/matrix/DemoLeastSquares01.kt)
### matrix/DemoLeastSquares02
Demonstrate least squares method to fit a cubic bezier to noisy points
![matrix-DemoLeastSquares02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/matrix-DemoLeastSquares02Kt.png)
[source code](src/jvmDemo/kotlin/matrix/DemoLeastSquares02.kt)
### rbf/RbfInterpolation01
![rbf-RbfInterpolation01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/rbf-RbfInterpolation01Kt.png)
[source code](src/jvmDemo/kotlin/rbf/RbfInterpolation01.kt)
### rbf/RbfInterpolation02
![rbf-RbfInterpolation02Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/rbf-RbfInterpolation02Kt.png)
[source code](src/jvmDemo/kotlin/rbf/RbfInterpolation02.kt)
### simplexrange/DemoSimplexRange3D01
![simplexrange-DemoSimplexRange3D01Kt](https://raw.githubusercontent.com/openrndr/orx/media/orx-math/images/simplexrange-DemoSimplexRange3D01Kt.png)
[source code](src/jvmDemo/kotlin/simplexrange/DemoSimplexRange3D01.kt)