raysect / source Goto Github PK
View Code? Open in Web Editor NEWThe main source repository for the Raysect project.
Home Page: http://www.raysect.org
License: BSD 3-Clause "New" or "Revised" License
The main source repository for the Raysect project.
Home Page: http://www.raysect.org
License: BSD 3-Clause "New" or "Revised" License
The kdTree needs to be rebuilt and optimised for meshes. Should be rebuilt such that it can support both meshes and other primitives. Optimised for speed, etc.
A useful feature would be a built in orthogonal projection camera, which fires parallel rays from a regular grid of sources and return a grid of pixels. This would allow to have a schematic view of the world and to avoid perspective effects unlike the pinhole camera. Moreover there is almost nothing to change from the pinhole camera to get it.
We currently have interpolators for 1d, 2d, 3d functions, etc. Do we need an interpolator for vector fields?
As the geometrical position of objects are sometimes defined through a couple position + direction, it can be nice to have a built in function calculating the rotation matrix needed to implement this kind of objects in the scenegraph. The solution matrix is the one transforming the z vector (because most of scenegraph objects are defined along the z vector) of the reference frame into the direction vector. One must be careful that there is an infinite number of solution matrix, as the direction vector define only two angles, the third one is up to the user.
This function would help a lot to place cameras or cylinders (for beams) for example.
Currently it takes a long time to process large meshes. In some cases, it can take as long as an hour to process all the mesh nodes and build the kd-tree. It would make sense to pre-process a mesh and save the python mesh representation with all its acceleration structures into a dedicated raysect mesh file format. This allows users to only process meshes when changes are made to the underlying mesh components. For routine ray-tracing with the same meshes, the meshes can quickly be re-loaded from the raysect mesh files.
Add additional utility classes to reduce code repetition and simplify for core.
Add support for a parabolic primitive to enable parabolic lenses.
To be consistent with the Conductor() object it would make sense to convert the Dielectric material to accept attenuation definition in terms of extinction, a utility function can be provided to handle attenuation coefficients (Special SpectralFunction that applies the conversion)
We need a primitive base class that can be used to encapsulate other primitives and hide their attributes from the user. The use case for this is to allow developers to assemble CSG objects and protect their internal structure from user interaction. Examples: biconvex lens primitive - can easily be constructed using basic primitives and CSG. The user should not interact with the components directly, instead the lens specific attributes should be used e.g. focal length or width.
class Biconvex(EncapsulatedPrimitive):
etc...
The class will need to contain a scenegraph that forwards geometry modifications to the primary scenegraph containing the EncapsulatedPrimitive (as occurs for the CSG primitives... generalise?)
Form a new raysect.primitive.utility package?
Currently there is no where to store our demos. Would be nice if we could create a dedicated examples or demo folder for storing examples as we go with the development.
We already have a base class for cameras. We need an appropriate base class for line of sight observers such as optical fibres.
Create a readthedocs account for raysect. Post the initial api documentation. Layout the basic structure. Start a process for updating the documentation and adding examples.
The Ray class is quite important and needs more documentation.
Run "python setup.py install" on a clean environment, check the installer works, all tests work and demos can be run. This is the final step to complete before v0.1 can be officially tagged as ready for release.
Expose materials as classes derived from their core material e.g. Gold(Conductor).
library.glass.Schott("N-BK7")
library.dielectric.Water(temperature=20.0)
library.plastic....
library.filter.....
library.metal.Gold
Make a demo reel of pretty pictures plus raysect's feature highlights.
Post on youtube.
We need a cone primitive. It needs to be written in cython.
From now onwards, all demo pictures should be captured in a gallery folder inside the demos folder. An image .png should be accompanied by a demo script of the same name.
add a metal material.
A new, general kd-tree object was developed for the Mesh primitive. This version is more highly optimised than the kd-tree previously developed for the world accelerator. Unifying the world and mesh kd-trees will reduce code duplication.
Create a ray for diagnostic purposes. Ideally it would enable visualisation of the ray path in the scene. For example, see the path of a ray through a dispersive element, such as a lens.
Create a library module in optical that contains predefined materials, spectra and observers.
Example items for the library:
The core materials from which these are derived e.g. conductor, dielectric etc... that require data before use will remain in the material folder. Similarly the observer components and generic CCD objects (when created) will remain in observers.
A user wanted to know if we can use raysect to calculate the power deposited on a material surface. Use case was "real time" calculation of power received by material in wall of tokamak.
Some applications will require raysect to use a camera defined by an external party. For example, the camera may have already been calibrated in terms of its distortion and spatial properties. One option is to make a Camera class where every pixel maps to a sight line vector. The array of vectors can be supplied by the user. Another option is to specify a camera in terms of its optics, i.e. lens types, focal length, etc. But this will be left to a later date.
Review optical classes (particularly materials) to make it easier for users to add generic BRDF materials.
Passing these in as arguments occurs in many places throughout the code:
Encapsulating them in a class in raysect.optical will simplify code.
Raysect needs a proper logo. Then this logo can be used in the documentation pages and on github, etc.
Need a 2D kd-tree implementation for the interpolated data meshes.
Select a basic set of prisims from thorlabs catalog. Implement both a general purpose constructor and complementory catalog selector.
Get documentation ready in time for PyCon UK. A number of smaller tickets will be created to represent this task.
Split the current kdtree into a 2D and 3D implementation.
Currently we have some smart lens builders with validators for the "planar" and "bi" lenses, four of the six fundamental spherical lenses. The meniscus lens are more dificult to validate because to degeneracy issues. Instead it would be better to have a general purpose lens constructor that can work for any spherical lens and performs simpler validation.
Can we calculate a colour temperature from the returned spectrum.
Try to do an initial pass of documentation on all core classes. Check them with Alex at the next sprint.
The current CSG objects were developed assuming only two intersections per primitive. These object do no appear to work with meshes involving more intersections. Explore and fix.
Add materials that modify the intersection (e.g. perturb the surface normal) before passing the intersection on to an actual material class. We can then add support for height (bump) textures and rough surfaces - frosted glass, scratched metal etc...
Similarly modifier materials can modify the returned spectrum, this can be used to simulate surface coatings e.g. filters.
It would be useful for demo/ITER to predict the power incident on machine surfaces. Could be implemented as a large pixel, or collection of large pixels with cosine weighted hemispherical sampling.
Ready to tag a master branch commit as the official v0.1 release and close milestone v0.1 release.
Select a basic set of aspheric lenses from the thorlabs catalog. Implement both a general purpose constructor and complementory catalog selector.
In order to quickly displays shapes, it would be useful to have a built in display material which is only made to see the shapes of primitives on the world. It could also implement a set of basic color (monochromatic to avoid calculation) or RGB colors so as to be able to tell the difference between different primitives.
For a number of physics use cases, volume emission dominates over surface reflection effects and other possible light sources (i.e. a tokamak plasma). The emission model of a volume emitter can be very complicated, and interpreting the spectral output can sometimes be very difficult. A couple of times I have wanted to sample the properties of the emitting material during ray-tracing for latter analysis. In the case of a plasma for example, I wanted to log the temperature, density and magnitude of magnetic field at every ray evaluation point. This helps to understand the output spectra.
At the moment I have "hacked" this kind of functionality by putting an ndarray on the emitting material, and every time it is called by ray to evaluate its emitted spectra, I log the coordinates and local parameter values. Is there a cleaner way to do this?
Default arguments should be None and set in init function and not in init arguments.
It would be useful to have a common set of classes to represent pixels, fibre optic tips etc...
e.g:
square pixel - launches rays that sample over acceptance cone and pixel surface
point pixel - launches rays that sample over an acceptance code
Then define a few acceptance cones classes - hemisphere, cone, delta function.
Can then easily build CCD observers etc...
Because ray tracer is a path tracer, you get a different path, each time you sample. Need to add a sample() method to ray that can launch N sample paths and average their spectra.
Add raysect v0.1 to the python repository, check it can be installed with pip, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.