All Projects → Libbum → spherical-cow

Libbum / spherical-cow

Licence: other
A high volume fraction sphere packing library

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to spherical-cow

Jsxgraph
JSXGraph is a cross-browser library for interactive geometry, function plotting, charting, and data visualization in a web browser.
Stars: ✭ 605 (+2420.83%)
Mutual labels:  geometry, mathematics
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (+5637.5%)
Mutual labels:  geometry, mathematics
Korma
Mathematics library focused on geometry for Multiplatform Kotlin 1.3
Stars: ✭ 65 (+170.83%)
Mutual labels:  geometry, mathematics
Mather
zzllrr mather(an offline tool for Math learning, education and research)小乐数学,离线可用的数学学习(自学或教学)、研究辅助工具。计划覆盖数学全部学科的解题、作图、演示、探索工具箱。目前是演示Demo版(抛转引玉),但已经支持数学公式编辑显示,部分作图功能,部分学科,如线性代数、离散数学的部分解题功能。最终目标是推动专业数学家、编程专家、教育工作者、科普工作者共同打造出更加专业级的Mather数学工具
Stars: ✭ 270 (+1025%)
Mutual labels:  geometry, mathematics
alchemy
Generate any a-by-( b + c ) finite rectangle SVG containing potentially Infinitely many a-by-( 2 * b ) finite rectangles animated along a number line of ( ( c - b ) / a )^n scale symmetry.
Stars: ✭ 29 (+20.83%)
Mutual labels:  geometry, mathematics
Cindyjs
A JavaScript framework for interactive (mathematical) content.
Stars: ✭ 495 (+1962.5%)
Mutual labels:  geometry, mathematics
Algorithms
A collection of algorithms and data structures
Stars: ✭ 11,553 (+48037.5%)
Mutual labels:  geometry, mathematics
Dotscad
Reduce the burden of mathematics when playing OpenSCAD
Stars: ✭ 344 (+1333.33%)
Mutual labels:  geometry, mathematics
Mathematics for Machine Learning
Learn mathematics behind machine learning and explore different mathematics in machine learning.
Stars: ✭ 28 (+16.67%)
Mutual labels:  geometry, mathematics
humke-4d-geometry
A web-based 4D Geometry viewer
Stars: ✭ 51 (+112.5%)
Mutual labels:  geometry, mathematics
Math Toolbox
Lightweight and modular math toolbox
Stars: ✭ 71 (+195.83%)
Mutual labels:  geometry, mathematics
birkhoff
Euclidean plane and its relatives; a minimalist introduction.
Stars: ✭ 15 (-37.5%)
Mutual labels:  geometry, mathematics
geometer
A geometry library written in Python
Stars: ✭ 89 (+270.83%)
Mutual labels:  geometry, mathematics
curve-shortening-demo
Visualize curve shortening flow in your browser.
Stars: ✭ 19 (-20.83%)
Mutual labels:  geometry, mathematics
euclid.js
2D Euclidean geometry classes, utilities, and drawing tools
Stars: ✭ 69 (+187.5%)
Mutual labels:  geometry, mathematics
meyda-rs
This may become an audio feature extraction library for Rust.
Stars: ✭ 15 (-37.5%)
Mutual labels:  rust-library
Python-Matematica
Explorando aspectos fundamentais da matemática com Python e Jupyter
Stars: ✭ 41 (+70.83%)
Mutual labels:  mathematics
glossary
https://machinelearning.wtf/ - An online glossary of machine learning terms.
Stars: ✭ 28 (+16.67%)
Mutual labels:  mathematics
osu-playground
osu!Playground
Stars: ✭ 21 (-12.5%)
Mutual labels:  geometry
pymadcad
Simple yet powerful CAD (Computer Aided Design) library, written with Python.
Stars: ✭ 63 (+162.5%)
Mutual labels:  geometry

Spherical Cow

A high volume fraction sphere packing library

Crates.io Docs.rs Travis-ci Codecov FOSSA Status

Based on the advancing fronts algorithm outlined in Valera et al., Computational Particle Mechanics 2, 161 (2015).

Milk production at a dairy farm was low, so the farmer wrote to the local university, asking for help from academia. A multidisciplinary team of professors was assembled, headed by a theoretical physicist, and two weeks of intensive on-site investigation took place. The scholars then returned to the university, notebooks crammed with data, where the task of writing the report was left to the team leader. Shortly thereafter the physicist returned to the farm, saying to the farmer, "I have the solution, but it works only in the case of spherical cows in a vacuum".

Usage

Complete documentation can be found at docs.rs.

A simple example to get you packing spheres of radii (0.1..0.2) into a container sphere of radius 2.

use spherical_cow::shapes::Sphere;
use rand::distributions::Uniform;
use nalgebra::Point3;

fn main() {
    let boundary = Sphere::new(Point3::origin(), 2.0).unwrap();
    let mut sizes = Uniform::new(0.1, 0.2);

    let spheres = spherical_cow::pack_spheres(boundary, &mut sizes).unwrap();

    println!("Number of spheres: {}", spheres.len());
}

More elaborate examples can be found in the examples directory.

Output

True to its name, it is indeed possible to build a spherical cow:

spherical cow in vacuum

You can run this example yourself from show_in_cow.

Example use cases

The paper which this algorithm comes from gives two examples of real world use cases:

  1. Sphere packing a skull model to study fractures due to shocks and penetrating objects.
  2. Sphere packing a cutting tool to identify the failure / breaking points when the tool is placed under load.

The reason this library was initially written was to optimise the layout of inflatable space habitats which may one day be constructed on the Moon and Mars.

License

Licensed under the Apache License, Version 2.0 or the MIT license, at your option. These files may not be copied, modified, or distributed except according to those terms.

FOSSA Status

Deeply linked dependencies

A large number of example files within this repository (but NOT distributed as part of this library) have GPL licensing obligations. Below is one example:

The wayland-protocols library (released under an MIT license) is used by kiss3d (used for visualisation previews in the examples). Content therein: the file misc/server-decoration.xml, is Copyright (C) 2015 Martin Gräßlin and licensed under the GNU Lesser General Public Library, version 2.1. You can find a copy of this license at https://www.gnu.org/licenses/lgpl-2.1.en.html

For a complete list of these obligations, please refer to the license information from the associated crates. The Fossa links above can also assist.

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].