Git Product home page Git Product logo

tracepy's Introduction

TracePy

Codacy Badge Build Status Documentation Status PyPI version

Ray Tracing and Optical Design in Python

Overview

TracePy is a sequential ray tracing package written in Python 3 for designing optical systems in the geometric optics regime. It features lens optimization from Scipy.

Installation

To use TracePy you can either clone the repository and use the command "pip3 install ." in the download directory, or you can download TracePy directly through pypi with the command below.

pip3 install tracepy

Examples

To get started using the software, you can look at the examples provided in the 'examples' folder. The UI for TracePy is most similar to BEAM4, and TracePy's ray tracing algorithm was recreated from Spencer and Murty's iconic paper, "General Ray-Tracing Procedure".

tracepy's People

Contributors

codacy-badger avatar gniendorf avatar mikemork avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

tracepy's Issues

Trace chief and marginal rays

Currently TracePy has no way to approximate the chief or marginal rays. This would be used as both a cosmetic feature - to show the chief and marginal rays for a given optical system, and as a useful tool for functions such as spot diagrams which should be shown with points near the chief ray.

3d plotting function

Right now TracePy only has support for 2d plotting of an optical system. Eventually it is necessary to have 3d plotting, but this is not a priority.

How to change wavelength

I see from the code that the ray class takes 'wvl' as an attribute, but how do we pass a new wavelength to ray? The call to ray_plane to create the ray bundle does not take 'wvl'. I've poked around and can't see how to do this.

Thanks

Allow user to specify glass type

Right now you can only specify the index of refraction N. However, there are several public databases that contain glass types and their index of refraction as a function of the wavelength of incident light, usually in the form of coefficients for some given functional form. It is straight forward to implement this: find a comprehensive database containing glass types and their coefficients, create some function that takes a glass type and wavelength and outputs an index N, and allow a surface to have a variable index of refraction that calls this function when needed.

Load optics tables

Currently you can only save a given geometry as a csv file, but you cannot load that csv file directly from TracePy. Also, the ability to load optics tables from other ray tracing software such as BEAM4 would allow us to validate TracePy's outputs

Use exact intersection solutions for certain conics

Some conics allow for exact solutions for ray tracing - situations where numerically solving for the intersection point of the ray and surface is extremely wasteful. This could offer significant speedups.

Beam Splitter

As an action of a geometrical object can either be reflection or refraction it is not possible to create a simple beam splitter.
I think this is an very important feature missing here.

Best regards

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.