3d-pli / sphere-histo

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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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 jloup@gzip.org madler@alumni.caltech.edu

About

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


Languages

Language:C++ 96.9%Language:CMake 1.6%Language:Python 1.5%