star-2d

Contour structuring for efficient 2D geometric queries
git clone git://git.meso-star.fr/star-2d.git
Log | Files | Refs | README | LICENSE

commit 2896dd06c5382d6382d7e90087c17b5af1debaf4
parent b0f88a092686acf1051f3c1d7cb6b4814f04f394
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Wed, 12 Jul 2023 15:09:22 +0200

Rewrite the README file to make it less bloated

Small rewrite of the preview section. Clean up the requirements
section and completely rewrite the installation section regarding using
a POSIX Makefile and no longer CMake as the first build system.
Remove the quickstart section which was actually useless.

Diffstat:
MREADME.md | 127++++++++++++++++++-------------------------------------------------------------
1 file changed, 29 insertions(+), 98 deletions(-)

diff --git a/README.md b/README.md @@ -1,99 +1,30 @@ # Star 2D -## Overview - -Star-2D is a C library that manages a virtual 2D environment composed of line -segments. The resulting virtual scene can then be accessed through -*ray-tracing*, *uniform sampling* or *closest point query*, providing an -efficient way to deal with geometric data of arbitrary 2D contents. To ensure -the efficiency of these operators, Star-3D internally relies on [Intel(R) -Rendering Framework](https://software.intel.com/en-us/rendering-framework): -[Embree](https://embree.github.io) that provides highly optimized acceleration -structures as well as traversal kernels for a wide range of data workloads. - -To query the scene data one has to create a *view* of the scene. On its -creation, the view internally builds data structures required by the -aforementioned access operators. These data structures are built from the scene -geometry as defined at the moment of the view creation; a view is thus -insensitive to scene updates following its creation. This means that several -views can be used to register different states of the same scene, giving to the -caller a great flexibility to manage the scene data. - -## Install - -### Pre-requisites - -Star-2D is compatible GNU/Linux as well as Microsoft Windows 7 and later, both -in 64-bits. It was successfully built with the [GNU Compiler -Collection](https://gcc.gnu.org) (versions 4.7 and later) as well as with -Microsoft Visual Studio 2015. It relies on [CMake](http://www.cmake.org) and the -[RCMake](https://gitlab.com/vaplv/rcmake/) package to build. It also depends on -the [RSys](https://gitlab.com/vaplv/rsys/) and -[Embree](https://embree.github.io/) libraries. - -### How to build - -First ensure that CMake and a C/C++ compiler is installed on your system. Then -install the [RCMake](https://gitlab.com/vaplv/rcmake.git) package as well as -the [RSys](https://gitlab.com/vaplv/rsys.git) and -[Embree](https://embree.github.io) libraries. Finally generate the project from -the `cmake/CMakeLists.txt` file by appending to the `CMAKE_PREFIX_PATH` -variable the `<RCMAKE_DIR>`, `<RSYS_DIR>` and `<EMBREE_DIR>` -directories, where `<RCMAKE_DIR>`, `<RSYS_DIR>` and `<EMBREE_DIR`> are the -install directories of the RCMake package, the RSys and the Embree libraries, -respectively. The resulting project can be edited, built, tested and installed -as any CMake project (Refer to the [CMake -documentation](https://cmake.org/documentation) for further informations on -CMake). - -Example on a GNU/Linux system: - - ~ $ git clone https://gitlab.com/meso-star/star-2d.git - ~ $ mkdir star-3d/build && cd star-2d/build - ~/star-2d/build $ cmake -G "Unix Makefiles" \ - > -DCMAKE_PREFIX_PATH="<RCMAKE_DIR>;<RSYS_DIR>;<EMBREE_DIR>" \ - > -DCMAKE_INSTALL_PREFIX=<STAR2D_INSTALL_DIR> \ - > ../cmake - ~/star-2d/build $ make && make test - ~/star-2d/build $ make install - -with `<STAR2D_INSTALL_DIR>` the directory in which Star-2D is going to be -installed. - -## Quick Start - -Once installed, the Star-2D library and its associated headers are deployed, -providing the whole environment required to develop C/C++ applications with -Star-2D. The `<STAR2D_INSTALL_DIR>/include/star/s2d.h` header defines the -Star-2D Application Programming Interface (API). Refer to this -[file](https://gitlab.com/meso-star/star-2d/blob/master/src/s2d.h) for the API -reference documentation. - - -A Star-2D [CMake -package](https://cmake.org/cmake/help/v3.5/manual/cmake-packages.7.html) is -also installed to facilitate the use of Star-2D in projects relying on the -CMake build system. For instance, the following `CMakeLists.txt` file uses the -Star-2D package to build an executable relying on the Star-2D library. - - project(my_project C) - - # Use the Star-2D CMake package - find_package(Star2D REQUIRED) - - # Define the program to build - add_executable(my_program main.c) - - # Link the program against Star-2D - target_link_libraries(my_program Star2D) - -This `CMakeLists.txt` is then used to generate the target project as, for -instance, on a GNU/Linux system: - - cmake -G "Unix Makefiles" -DCMAKE_PREFIX_PATH="<STAR2D_INSTALL_DIR>" <MY_PROJECT_DIR> - -with `<STAR2D_INSTALL_DIR>` the install directory of Star-2D and -`<MY_PROJECT_DIR>` the location of the `CMakeLists.txt` file. +Star-2D is a C library that manages *2D geometries* and implements operators +to access them efficiently such as uniform sampling, ray tracing or a closest +point query. + +The main concept exposed in Star-2D is the *shape*. A shape is a set of +segments representing the outline of a 2D geometry. Shape data is user-defined +and can be updated at any time. The shapes are then attached to a *scene* where +they can be queried using a *view* of the scene. When it is created, the view +internally builds the accelerating structures necessary for the access +operators. These data structures are constructed from the scene geometry as +defined at the time of view creation; a view is thus insensitive to updates of +the scene following its creation. This means that multiple views can be used to +save different states of the same scene, giving the caller great flexibility in +managing scene data. + +## Requirements + +A C99 compiler, POSIX Make, pkg-config, and the RSys and Embree header files +and libraries. + +## Installation + +Edit config.mk as needed, then run: + + make clean install ## Release notes @@ -161,8 +92,8 @@ argument. For closest point queries, this range is from 0 to query radius. ## License -Copyright (C) 2016-2021, 2023 |Méso|Star> (<contact@meso-star.com>). Star-2D is -free software released under the CeCILL v2.1 license. You are welcome to -redistribute it under certain conditions; refer to the COPYING files for -details. +Copyright (C) 2016-2021, 2023 |Méso|Star> (contact@meso-star.com) +Star-2D is free software released under the CeCILL v2.1 license. You are +welcome to redistribute it under certain conditions; refer to the COPYING files +for details.