All Projects → korlibs → Korma

korlibs / Korma

Licence: other
Mathematics library focused on geometry for Multiplatform Kotlin 1.3

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Korma

Computational Geometry
Computational Geometry Unity library with implementations of intersection algorithms, triangulations like delaunay, voronoi diagrams, polygon clipping, bezier curves, ear clipping, convex hulls, mesh simplification, etc
Stars: ✭ 325 (+400%)
Mutual labels:  triangulation, interpolation, bezier
Gonum
开源Go语言数值算法库(An open numerical library purely based on Go programming language)
Stars: ✭ 128 (+96.92%)
Mutual labels:  matrix, mathematics, interpolation
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (-56.92%)
Mutual labels:  geometry, matrix, mathematics
Mather
zzllrr mather(an offline tool for Math learning, education and research)小乐数学,离线可用的数学学习(自学或教学)、研究辅助工具。计划覆盖数学全部学科的解题、作图、演示、探索工具箱。目前是演示Demo版(抛转引玉),但已经支持数学公式编辑显示,部分作图功能,部分学科,如线性代数、离散数学的部分解题功能。最终目标是推动专业数学家、编程专家、教育工作者、科普工作者共同打造出更加专业级的Mather数学工具
Stars: ✭ 270 (+315.38%)
Mutual labels:  mathematics, geometry
Cpp Spline
Package provides C++ implementation of spline interpolation
Stars: ✭ 54 (-16.92%)
Mutual labels:  interpolation, bezier
spherical-cow
A high volume fraction sphere packing library
Stars: ✭ 24 (-63.08%)
Mutual labels:  geometry, mathematics
motionLib
quaternion, euler angle, interpolation, cubic bezier, cubic spline, PCA, etc.
Stars: ✭ 23 (-64.62%)
Mutual labels:  interpolation, bezier
Nurbs Python
Object-oriented pure Python B-Spline and NURBS library
Stars: ✭ 295 (+353.85%)
Mutual labels:  geometry, bezier
Data Structures Algorithms
My implementation of 85+ popular data structures and algorithms and interview questions in Python 3 and C++
Stars: ✭ 273 (+320%)
Mutual labels:  matrix, mathematics
Dotscad
Reduce the burden of mathematics when playing OpenSCAD
Stars: ✭ 344 (+429.23%)
Mutual labels:  mathematics, geometry
Jsxgraph
JSXGraph is a cross-browser library for interactive geometry, function plotting, charting, and data visualization in a web browser.
Stars: ✭ 605 (+830.77%)
Mutual labels:  mathematics, geometry
Pycm
Multi-class confusion matrix library in Python
Stars: ✭ 1,076 (+1555.38%)
Mutual labels:  matrix, mathematics
Online-Tools
Webpage offering a wide range of online tools
Stars: ✭ 38 (-41.54%)
Mutual labels:  interpolation, mathematics
Graphene
A thin layer of graphic data types
Stars: ✭ 268 (+312.31%)
Mutual labels:  matrix, mathematics
birkhoff
Euclidean plane and its relatives; a minimalist introduction.
Stars: ✭ 15 (-76.92%)
Mutual labels:  geometry, mathematics
Cindyjs
A JavaScript framework for interactive (mathematical) content.
Stars: ✭ 495 (+661.54%)
Mutual labels:  mathematics, geometry
Cglm
📽 Highly Optimized Graphics Math (glm) for C
Stars: ✭ 887 (+1264.62%)
Mutual labels:  matrix, bezier
Sharpmath
A small .NET math library.
Stars: ✭ 36 (-44.62%)
Mutual labels:  matrix, geometry
curve-shortening-demo
Visualize curve shortening flow in your browser.
Stars: ✭ 19 (-70.77%)
Mutual labels:  geometry, mathematics
euclid.js
2D Euclidean geometry classes, utilities, and drawing tools
Stars: ✭ 69 (+6.15%)
Mutual labels:  geometry, mathematics

Korma

Korma

Korma is a Mathematical Library mostly focused on geometry for Multiplatform Kotlin 1.3

Build Status Maven Version Discord

Support korma

If you like korma, or want your company logo here, please consider becoming a sponsor ★,
in addition to ensure the continuity of the project, you will get exclusive content.

Info:

It includes structures for Points and Matrices (2D and 3D), Typed Angles, Rectangles, BoundsBuilder, Anchors, Vector graphics with Bezier curves support and Context2D-like API for building vectors, Interpolation facilities, Easing, Triangulation, BinPacking and Path Finding in Bidimensional arrays and Triangulated Spatial Meshes.

Full Documentation: https://korlibs.soywiz.com/korma/

Some samples:

val vector = VectorPath {
    // Here we can use moveTo, lineTo, quadTo, cubicTo, circle, ellipse, arc...
    rect(0, 0, 100, 100)
    rect(300, 0, 100, 100)
}.triangulate().toString()
// "[[Triangle((0, 100), (100, 0), (100, 100)), Triangle((0, 100), (0, 0), (100, 0))], [Triangle((300, 100), (400, 0), (400, 100)), Triangle((300, 100), (300, 0), (400, 0))]]"

// Angles
val angle = 90.degrees
val angleInRadians = angle.radians

// Matrices
val a = Matrix(2, 1, 1, 2, 10, 10)
val b = a.inverted()
assertEquals(identity, a * b)

// Rectangle + ScaleMode + Anchor
assertEquals(Rectangle(0, -150, 600, 600), Size(100, 100).applyScaleMode(Rectangle(0, 0, 600, 300), ScaleMode.COVER, Anchor.MIDDLE_CENTER))

// PathFinding (Matrix)
val points = AStar.find(
    board = Array2("""
        .#....
        .#.##.
        .#.#..
        ...#..
    """) { c, x, y -> c == '#' },
    x0 = 0,
    y0 = 0,
    x1 = 4,
    y1 = 2,
    findClosest = false
)
println(points)
// [(0, 0), (0, 1), (0, 2), (0, 3), (1, 3), (2, 3), (2, 2), (2, 1), (2, 0), (3, 0), (4, 0), (5, 0), (5, 1), (5, 2), (4, 2)]

// PathFinding (Shape)
assertEquals(
    "[(10, 10), (100, 50), (120, 52)]",
    (Rectangle(0, 0, 100, 100).toShape() + Rectangle(100, 50, 50, 50).toShape()).pathFind(
        IPoint(10, 10),
        IPoint(120, 52)
    ).toString()
)

Usage with gradle:

def kormaVersion = "1.9.1"

repositories {
    maven { url "https://dl.bintray.com/korlibs/korlibs" }
}

dependencies {
    // For multiplatform projects
    implementation "com.soywiz.korlibs.korma:korma:$kormaVersion"
    
    // For JVM/Android only
    implementation "com.soywiz.korlibs.korma:korma-jvm:$kormaVersion"
    // For JS only
    implementation "com.soywiz.korlibs.korma:korma-js:$kormaVersion"
}

// Additional funcionality using Clipper and poly2try code (with separate licenses):
// - https://github.com/korlibs/korma/blob/master/korma-shape/LICENSE
dependencies {
    implementation "com.soywiz.korlibs.korma:korma-shape:$kormaVersion"
}

// settigs.gradle
enableFeaturePreview('GRADLE_METADATA')
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].