Giter Site home page Giter Site logo

ray_tracing's Introduction

Ray Tracing

This codes performs ray tracing and computes the points where the rays intersect a geometry described by a stl file.

Installation

The depends on boost, Kokkos, and ArborX. You can configure ray_tracing using:

cmake \
  -D CMAKE_CXX_COMPILER=${KOKKOS_INSTALL_DIR}/bin/nvcc_wrapper \ 
  -D CMAKE_CXX_EXTENSIONS=OFF \
  -D CMAKE_PREFIX_PATH="${KOKKOS_INSTALL_DIR};${ARBORX_INSTALL_DIR};${BOOST_INSTALL_DIR}" \
${RAY_TRACING_SOURCE_DIR}

nvcc_wrapper is only necessary when using nvcc.

Usage

The code expects the following options:

  • -s: the name of the STL file that contains the geometry
  • -r: prefix of the ray file. The file name is expected to be of the form: ray_prefix-i.txt with i a number starting at zero.
  • -n: number of ray files.
  • -o: prefix of the output files. The file name is of the form output_prefix-i.txt or output_prefix-i.vtk
  • -t: type of the output: csv, numpy (the array can be loaded using loadtxt), or vtk.

The format of the ray file is the following:

Number of rays
Coordinates of the ray origin  Direction of the ray

In practice, a file with three rays starting in (0,0,0) and following the axes x, y, and z will look as follows

3
0. 0. 0. 1. 0. 0.
0. 0. 0. 0. 1. 0.
0. 0. 0. 0. 0. 1.

ray_tracing's People

Contributors

rombur avatar stvdwtt avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

rombur

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.