Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliageometry/raytraceellipsoid.jl
Ray trace ellipsoid-shaped domes. Find intersection points and refract/reflect according to the refractive indices.
https://github.com/juliageometry/raytraceellipsoid.jl
dome ellipsoid ray-tracing reflect refract refractive-index
Last synced: about 1 month ago
JSON representation
Ray trace ellipsoid-shaped domes. Find intersection points and refract/reflect according to the refractive indices.
- Host: GitHub
- URL: https://github.com/juliageometry/raytraceellipsoid.jl
- Owner: JuliaGeometry
- License: other
- Created: 2017-07-11T13:17:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-02-11T07:40:32.000Z (almost 5 years ago)
- Last Synced: 2024-12-07T03:45:56.199Z (about 1 month ago)
- Topics: dome, ellipsoid, ray-tracing, reflect, refract, refractive-index
- Language: Julia
- Homepage:
- Size: 23.4 KB
- Stars: 11
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# RayTraceEllipsoid
[![Build status](https://ci.appveyor.com/api/projects/status/g8b6iw3wbx6mgxo5?svg=true)](https://ci.appveyor.com/project/skariel/raytraceellipsoid-jl) [![Build Status](https://travis-ci.org/JuliaGeometry/RayTraceEllipsoid.jl.svg?branch=master)](https://travis-ci.org/JuliaGeometry/RayTraceEllipsoid.jl) [![codecov.io](http://codecov.io/github/juliaGeometry/RayTraceEllipsoid.jl/coverage.svg?branch=master)](http://codecov.io/github/juliaGeometry/RayTraceEllipsoid.jl?branch=master)
This Julia package allows for geometric ray tracing with ellipsoids (actually domes shaped as ellipsoids). It includes intersection and refraction/reflection of rays with arbitrary ellipsoids. It accomplishes that in about 100 lines of code thanks to heavy use of `CoordinateTransformations.jl` and `StaticArrays.jl`.
These ellipsoid-domes are defined with `Ellipsoid` (see details with `help?> Ellipsoid`). The normal and refractive indices are defined within the `Interface` type. These two are baked into a single `OpticUnit`.
`Ray`s `advance!` to intersect with the `Ellipsoid`s and `bend!` at the `Interface`s. The `raytrace!` function includes these two actions, taking in a `Ray` and an `OpticUnit`, updating the location and direction of the ray.
## Todo
- add rotated ellipsoids
- add more shapes, so it's not only `RayTrace**Ellipsoid**`