severinstrobl / overlap Goto Github PK
View Code? Open in Web Editor NEWExact calculation of the overlap volume and area of spheres and mesh elements
License: GNU General Public License v3.0
Exact calculation of the overlap volume and area of spheres and mesh elements
License: GNU General Public License v3.0
Using cibuildwheel
it should be fairly easy to also build the Python wheels for non-native architectures, in particular AArch64.
The documentation needs to be improved significantly regarding at least the following aspects:
scalar_t
, vector_t
)I have found this library today and it will help me a lot in my project. I have read the related article and thanks for the Python library. I have question that how could I get each mesh cells occupied volume by spheres (where is the documentation? Is it existed? Is it just the readme? If so, IMO, it needs to be improved) if we have a medium full of spheres.
I am attempting to use this program to calculate the overlap area of a tetrahedron and a sphere (the example in the README). I notice that it gives the overlap area for each tetrahedron face and sums that up as the total overlap area. Is there also a way to return the overlap area of the sphere (that is, the area of the spherical cap residing inside the tetrahedron)?
Hi there! Your overlap library has many more applications than you might imagine :) I'd like to use it in the data science world which is Python dominated. Is it possible to provide a compiled version of this as a Python package? There are things like pybind
that will automatically generate Python bindings from your header file.
I have 0 experience on the C++ side but would be interested to help you out wherever I can on the Python side, testing, packaging etc!
Hello, I was testing the code and I have found that for the following set of inputs, the area calculated is wrong (even negative).
#include <iostream>
#include "../overlap.hpp"
int main(void) {
// Sphere data:
double radius = 0.25;
vector_t center { 0.5, 0.5, 1.0 };
Sphere sphere{ center, radius };
// Tetrahedron vertices.
vector_t node0 { 0.807798, 0.649062, 1.072417 };
vector_t node1 { 0.804911, 0.511303, 0.962443 };
vector_t node2 { 0.687459, 0.655182, 0.976268 };
vector_t node3 { 0.681356, 0.534586, 1.056372 };
Tetrahedron tetra{ node0, node1, node2, node3 };
auto intersect_area = overlapArea(sphere, tetra);
for (auto& area: intersect_area) {
std::cout << area << std::endl;
}
}
The expected value for the sphere section is around 0.0065m² but the output from the function is -0.160697m², the area of the tetrahedron face sections also does not match the expected data.
Recently Eigen 3.4.0 was released, marking the first major release in a while. The overlap library should be tested with this release and if everything works out the Eigen sub-module should be updated accordingly.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.