Skip to content

Procedural hexagonal close packing geometry voxel point cloud and graphical data generation

Notifications You must be signed in to change notification settings

IdominionI/Virtual_Worlds_prototype01

Repository files navigation

Virtual Worlds

Introduction

Procedural hexagonal close packing (HCP) point cloud data and voxel generation

This is a working project to demonstrate the concept of a different form of procedural point cloud and voxel geometry to use in 3D space. Voxels are conventionally defined as a cube in 3D space, but for the purposes of simulation and cellular automata, cubic voxels would not be a particularly good choice as the distaces between each cubic voxel are not all equal. An arrangement of hexagonal close packing (HCP) spheres of equal radius can produce such a geometry that every data point in space is surrounded by neighbours all of equal distance from it. Where as a cube is the space filling geometric shape that defines a cubic voxel space, the geometric shape of a Trapezo-rhombic dodecahedron is what can be used to fill a HCP matrix of points in 3D space, and can be used as a space filling voxel.

In the directory Documentation of this project are a series of PDF documentation files that can explain at length this concept and implementation. In the directory Build/Current_release is a working demonstration application that can be used to get an idea of how this concept can be used and visualised.

This project is not a fully functioning application, but is a working prototype and model of an application with the aim to be a basis of evolution to test ideas and concepts so as to create an application that utilises a HCP geometry for simulation, celluar automata, pocedural graphical generation, and any other ideas that may come to being.

As there was nothing that could be found that resembles this concept and idea, it is presented here to bring to attention, an alternative geometric system to use with a solution of example code on how this can be done. The intention here is to give an idea to those that have better skills, knowledge and understanding than this author to use and take this further and develop quicker or in other areas.

The intent is also to have this concept and idea completely open source and any derivation free of copywrite or any other retriction that could be imposed.

Installation:

This project is a Visual Studio 2022 C++ project set up for windows.

If any user wishes to install it on their PC computer, just a simple copy of all the files should suffice. The dependancies are all provided in the directory Universal, so there should not be any requirement to download anything else.

For non visual studio or window users, then they will need to down load the dependancies listed below for their systems and configure the project to accomadate them

Dependencies

All dependencies are placed in the Universal directory and should remain constant and not change

  • glm
  • glew
  • glfw
  • ImGui
  • imgui-docking
  • ImGuizmo
  • imGuIZMO_quat
  • tinyFileDialog
  • assimp - From initial devolpment : Not used but may be needed in future
  • boost - From initial devolpment : May not be used but may be needed in future

Source Code

Because this is a working project, within the source code is a lot of debugging code that has largely been commented out or of redundant nature from migration from a previous Qt implementation ready to be reused or modifed.

Much of the code has been written for as easy reading as possible to understand what the code does. However some of the code that has been adopted or copied from 3rd parties may follow a different naming convention.