# kabschjs

> implementation of kabsch algorithm

Latest version **1.2.0** (published 2022-04-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install kabschjs
pnpm add kabschjs
yarn add kabschjs
bun add kabschjs
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2022-04-22 |
| First published | 2022-04-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 152 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Shakil Ahmed |
| Maintainers | sha-kil |
| Keywords | kabsch, gpu, rigid transformation |

## Links

- npm: https://www.npmjs.com/package/kabschjs
- Repository: https://github.com/sha-kil/kabschjs
- Homepage: https://github.com/sha-kil/kabschjs#readme
- Issues: https://github.com/sha-kil/kabschjs/issues
- npm.io page: https://npm.io/package/kabschjs

## Dependencies (4)

- [gpu.js](https://npm.io/package/gpu.js.md) ^2.15.2
- [mathjs](https://npm.io/package/mathjs.md) ^10.4.3
- [svd-js](https://npm.io/package/svd-js.md) ^1.1.1
- [node-gyp](https://npm.io/package/node-gyp.md) ^9.0.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.0 (latest) — 2022-04-22
- 1.1.0 — 2022-04-17
- 1.0.0 — 2022-04-17

## README

![example workflow](https://github.com/sha-kil/kabschjs/actions/workflows/build.yml/badge.svg?branch=master)&nbsp;&nbsp;&nbsp;&nbsp;
![example workflow](https://github.com/sha-kil/kabschjs/actions/workflows/test.yml/badge.svg?branch=master)<br>
# kabschjs

A simple library to compute rigid transformation matrix between two point sets.
Implements kabsch algorithm as explained in https://en.wikipedia.org/wiki/Kabsch_algorithm to compute rotation matrix. By default, utilizes gpu if webgl
is supported.

## usage
```
import { getRigidTransformation } from 'kabschjs';

const setA = [ [1,2,3], [4,5,6] ];
const setB = [ [11,12,13], [14,15,16] ];

const [R, T] = getRigidTransformation(setA, setB);
```
<br>
getRigidTransformation returns rigid transformation between two points sets
setA and setB (from setA to setB).<br><br>
SetA and SetB are two dimensional arrays. As the expected point dimension is 3, each element of a set must be array and of length 3.<br><br>
The output is also a two dimension array of size: 4x3 which represents the rigid transformation matrix. First element is the rotation matrix and the second one is the translation vector.
<br><br>

## installation
`npm install kabschjs`

---
_Source: https://npm.io/package/kabschjs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
