Git Product home page Git Product logo

3d-pli / sphere-histo Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 9.22 MB

Spherical histogram made simple! The surface colors indicate the density of points lying in the respective direction. Variable bin size. Works with large data sets. Points are read from your .npy files.

License: MIT License

C++ 96.94% Python 1.49% CMake 1.57%
sphere histogram color-coded spherical direction sphere-histo triangles npy

sphere-histo's Introduction

sphere histo logo

Brief description

sphere-histo is a graphical tool to depict a distribution of points in 3D space on a sphere approximated by congruent triangles. The triangles' colors indicate the density of points lying in the respective direction. Points can be read from .npy files with shape (n, 3).

Dependencies

For building:

  • CMake (>= v.3.5)
  • make
  • g++

How to deploy

(Incl. example commands for Debian/Ubuntu based Linux distributions)

  1. Make sure to have the dependencies installed on your system
    (Package names for Debian/Ubuntu: qt5-default libgl1-mesa-dev zlib1g-dev libglm-dev)

  2. Clone this Git repository
    $ git clone https://jugit.fz-juelich.de/a.roethenbacher/sphere-histo.git

  3. Change into the project's source directory
    $ cd sphere-histo/sphere-histo

  4. Create a build directory and change into it
    $ mkdir build

  5. Change into build directory
    $ cd build

  6. Use CMake to generate Makefile
    $ cmake ..

  7. Use make to install
    $ make

  8. Start application from the same directory
    $ ./sphere-histo [optional: filepath of .npy file]

How to use

Example overview image

  • Inside the application window click File->Open to open a .npy file

  • A first .npy file can also be passed as a command line argument while starting the application

  • Use the selection box next to the slider to choose your preferred color map

  • Use the slider below the sphere to change the number of triangles, that approximate the sphere

  • The value above the colorbar indicates the maximum number of points "inside" a single triangle with the current settings in place

  • To turn the sphere, press the left mouse button while moving the mouse

  • To move the sphere, press the right mouse button while moving the mouse

  • Use the mouse wheel to zoom

  • Use the checkboxes to display sphere points or both

  • Use the checkbox "Mirror Points" to select wether the opened points should be mirrored with reference to (0,0,0)

Slider example image Options example image

How to contribute

Information on how to contribute to this repository is documented inside CONTRIBUTING.md.

License

This project is licensed under the MIT License (s. LICENSE file).

Acknowledgements

This project uses the following third-party open source libraries with great appreciation:

  • cnpy
  • GLM
  • Qt 5
  • zlib

Special gratitude is given to matplotlib (https://matplotlib.org/index.html) for freely distributing their wonderful colormaps and the Khronos(c) Group (https://www.khronos.org/) for sharing and maintaining the Free OpenGL API (https://www.opengl.org//).

The used libraries are released under the following license conditions:

cnpy

MIT License (https://github.com/rogersce/cnpy/blob/master/LICENSE)

GLM

MIT License (https://glm.g-truc.net/copying.txt)

QT 5

GNU Lesser General Public License (LGPL) version 3 (https://doc.qt.io/qt-5/lgpl.html)

zlib

zlib.h -- interface of the 'zlib' general purpose compression library version 1.2.11, January 15th, 2017

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler [email protected] [email protected]

sphere-histo's People

Contributors

aroethen avatar nschubert1 avatar thyre avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.