Coder Social home page Coder Social logo

bundle_gen's Introduction

Bundle gen

A framework for generating wavelength light scattering tables of bundles of fibers based on singular fiber tables.

This was created as part of my bachelor thesis on light scattering in fibers.

Description

Essentially this framework traces rays through a bundle structure and aggregates the resulting data into a new table. For it to work the data for a single fiber has to be generated through methods like the following: https://github.com/mandyxmq/WaveFiber3d/

These can then be read into a high-dimensional table in the code and subsequently can be used for the rendering.

Process

Once the light scattering tables have been generated the fiber bundle structure is created by placing parallel cylinders in 3d space. This representation is loaded as a scene to then be traced through using the Mitsuba Rendering Engine and Dr. JIT.

The light is then traced using common path tracing methods. Each ray that leaves the scene is used to slowly build the resulting table using its magnitude and orientation.

The resulting table is then aggregated and saved in a manner that allows it to use it further down the road.

Running the Code

First my fork of the Mitsuba library has to be built, since slight changes to the cylinder interaction were required. For further info on this step head to the Mitsuba Developer Guid

git clone --recursive [email protected]:awallenfang/mitsuba3.git
cd ./mitsuba3
mkdir build
cd build
cmake -GNinja ..
ninja

This Mitsuba version then has to be activated to be used by Python:

source setpath.sh

Once the Mitsuba fork was successfully activated the generated light scattering data should be placed in a folder called fiber_model. The representation and structure that is used here is the one by Mandy Xia et al.: https://github.com/mandyxmq/WaveFiber3d/

Changes to the structure or representation can be done in the init method of the TabulatedBCRDF class. Or a new BRDF class can be created as well.

Once the data has been generated the bundle structure can be defined by filling the fiber list at the top of main.py.

Finally the code can be run by simply running main.py

python main.py

Results

The results and inner workings of the code are also described in my thesis that can be found in this repository: Computation of BCSDFs for elliptical multi-fiber bundles

bundle_gen's People

Contributors

awallenfang avatar

Watchers

 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.