Any questions or comments are welcome at julie.artois@ugent.be and in CC glenn.vanwallendael@ugent.be and bert.ramlot@ugent.be
+
+
Background
+
+
Read Sections 4.5–4.9 of Fundamentals of Computer Graphics (4th Edition).
+
+
Many of the classes and functions of this assignment are reused
+from the previous ray casting assignment. For example viewing_ray(),first_hit() and many more. Check the README for more info on this.
+
+
Unlike the previous assignment, this ray
+tracer will produce
+approximately accurate renderings of scenes illuminated with light.
+Ultimately, the shading and lighting models here are useful hacks. The basic
+recursive
+structure of the program is core to many methods for rendering with global
+illumination effects (e.g.,
+shadows, reflections, etc.).
+
+
+
+
+
+
+
Floating point numbers
+
+
For this assignment we will use the Eigen::Vector3d to represent points and
+vectors, but also RGB colors. For all computation (before finally writing the
+.ppm file) we will use double precision floating point numbers and 0 will
+represent no light and 1 will represent the brightest color we can display.
+
+
Floating point
+numbers\(≠\)real
+numbers, they don’t even cover all
+of the rational numbers. This
+creates a number of challenges in numerical method and rendering is not immune
+to them. We see this in the need for a fudge
+factor (for example 1e-6) to discard ray-intersections
+when computing shadows or reflections that are too close to the originating
+surface (i.e., false intersections due to numerical error).
+
+
Dynamic Range & Burning
+
+
Light obeys the superposition
+principle. Simply put,
+the light reflected of some part of an objects is the sum of contributions
+from light coming in all directions (e.g., from all light sources). If there are
+many bright lights in the scene and the object has a bright color, it is easy
+for this sum to add up to more than one. At first this seems counter-intuitive:
+How can we exceed 100% light? But this premise is false, the \(1.0\) does not mean
+the physically brightest possible light in the world, but rather the brightest
+light our screen can display (or the brightest color we can store in our chosen
+image format). High dynamic range (HDR)
+images store a larger
+range beyond this usual [0,1]. For this assignment, we will simply clamp the
+total light values at a pixel to 1.
+
+
This issue is compounded by the problem that the Blinn-Phong
+shading does not
+correctly conserve energy
+as happens with light in the physical world.
+
+
+
Once you have finished the assignment, running ./raytracing ../data/bunny.json (Linux/Macos) or raytracing.exe ..\..\..\data\bunny.json (Windows) should result in a PNG file similar to the one below. This might take a few minutes (e.g. 5 minutes in Release mode on a decent CPU). Notice the “burned out” white
+regions where the collected light has been clamped to [1,1,1]
+(white).
+
+
+
+
+
+
+
Question: Can we ever get a pixel value less than zero?
+
+
Hint: Can a light be more than off?
+
+
Side note: This doesn’t stop crafty visual effects artists from using
+“negative lights” to manipulate scenes for aesthetic purposes.
+
+
+
Whitelist
+
+
There are many ways to “multiply” two vectors. One way is to compute the
+component-wise
+multiplication: \(\mathbf{c} = \mathbf{a} \circ \mathbf{b}\) or in index notation:
+\(c_i = a_i b_i\). That is, multiply each corresponding component and store the
+result in the corresponding component of the output vector. Using the Eigen
+library this is accomplished by telling Eigen to treat each of the vectors as
+“array” (where matrix multiplication, dot product, cross product
+would not make sense) and then using the usual * multiplication:
The .matrix() converts the “array” view of the vector back to a “matrix”
+(i.e., vector) view of the vector.
+
+
Eigen also has a built in way to normalize a vector (divide a vector by its
+length): a.normalized().
+
+
C++ standard library includes a value for \(∞\) via #include <limits>. For
+example, for double floating point, use std::numeric_limits<double>::infinity().
+
+
Tasks
+
+
PointLight::direction in src/PointLight.cpp
+
+
Compute the direction to a point light source and its parametric distance from
+a query point.
+
+
DirectionalLight::direction in src/DirectionalLight.cpp
+
+
Compute the direction to a direction light source and its parametric distance from a
+query point (infinity).
+
+
src/raycolor.cpp
+
+
Make use of first_hit.cpp to shoot a ray into the scene, collect hit
+information and use this to return a color value. Use recursion to add mirror reflections.
+
+
src/blinn_phong_shading.cpp
+
+
Compute the lit color of a hit object in the scene using Blinn-Phong shading
+model. This function
+should also shoot an additional ray to each light source to check for shadows.
+
+
Important: On slide 39 of lecture CG_02_raytracing-split.pdf, the formula for the diffuse shading component is given:
+
+However, in your code, you should omit the division by r². Otherwise your scenes will appear dim.
+
+
+
Running raytracing on sphere-and-plane.json
+
+
+
+
+It is recommended to add and debug each term in your shading model. The
+ambient term will look like a faint object-ID image. The diffuse term will
+illuminate the scene, and create a dull, Lambertian look to each object. The
+specular term will add shiny highlights. Then, mask the diffuse and specular
+terms by checking for shadows. Finally, add a recursive call to account for
+mirror reflections.
+
+
+
src/reflect.cpp
+
+
Given an “incoming” vector and a normal vector, compute the mirrored, reflected
+“outgoing” vector.
+
+
Running raytracing on sphere-packing.json
+
+
+
+This should produce an image of highly reflective, metallic looking surfaces.
+
+
+
+
+
+
Pro Tip: After you’re confident that your program is working correctly,
+you can dramatically improve the performance simply by enabling compiler
+optimization:
+
+
cmake .. -DCMAKE_BUILD_TYPE=Release
+make
+
+
+
+
+
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..96fcc4f
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,63 @@
+cmake_minimum_required(VERSION 3.0)
+
+# If you choose option 1 (so use your own cpp files in lab1/)
+# you should set this to ON
+option(USE_OWN_SRC_FILES_LAB1 "Use the cpp files in lab1/" OFF)
+
+# name the project/executable (also ${PROJECT_NAME})
+project(raytracing)
+
+# define the location of the current directory as '${ROOT}'
+set(ROOT "${CMAKE_CURRENT_LIST_DIR}")
+
+# define the paths to the cpp files
+file(GLOB SRCFILES ${ROOT}/src/*.cpp)
+list(APPEND SRCFILES ${ROOT}/main.cpp)
+
+# the 'include' folder contains files that also need to be included in the project
+include_directories(${ROOT}/include ${ROOT}/eigen)
+
+# We need the code from lab 1. There are 2 options:
+
+# OPTION 1: You copy-paste your code from lab 1 into the "lab1" folder
+if(USE_OWN_SRC_FILES_LAB1)
+ # add the files in "lab1" to ${SRCFILES}
+ file(GLOB LAB1SRCFILES ${ROOT}/lab1/*.cpp)
+ list (APPEND SRCFILES ${LAB1SRCFILES})
+
+# OPTION 2: You use one of the static libraries in the "lib" folder
+else()
+ # define ${LIB_PATH} as the path to the static library, e.g. lib/Debug/win/
+
+ if(NOT CMAKE_BUILD_TYPE)
+ # Only matters for Linux and Mac (and WSL)
+ set(CMAKE_BUILD_TYPE "Debug")
+ endif()
+
+ if (MSVC)
+ set(LIB_PATH lib/Release/win/)
+ elseif (APPLE)
+ set(LIB_PATH lib/${CMAKE_BUILD_TYPE}/mac/)
+ elseif (UNIX)
+ set(LIB_PATH lib/${CMAKE_BUILD_TYPE}/linux/)
+ else()
+ message("No static lib found for your platform. See OPTION 2 in CMakeLists.txt" )
+ endif()
+
+ # Tell the compiler that the ${LIB_PATH} folder is a "library directory"
+ link_directories(${LIB_PATH})
+endif()
+
+# pass the SRCFILES files to be included during compilation
+add_executable(${PROJECT_NAME} ${SRCFILES})
+
+if(NOT USE_OWN_SRC_FILES_LAB1) # part of OPTION 2
+ # Tell the compiler that it needs to link the hw2 library. The compiler will
+ # look in the library directories, such as the ${LIB_PATH} folder from earlier
+ target_link_libraries(${PROJECT_NAME} hw2)
+endif()
+
+# if using Visual Studio, set the startup project
+if(MSVC)
+ set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
+endif()
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8dc1c88
--- /dev/null
+++ b/README.md
@@ -0,0 +1,66 @@
+# Computer Graphics Lab2 - Ray Tracing
+
+As explained in `02_RayTracing.html`, your ray _tracer_ reuses the ray _casting_ code that you wrote in the previous assignment. This leaves you with two options.
+
+**Option 1**: You feel confident that your code from lab 1 is correct. In this case, I would recommend that you copy-paste the 6 `.cpp` files from the `src/` folder of the previous assignment into the `lab1/` folder of this repository. In other words, your executable for this lab will also depend on your code from the previous lab.
+
+**Option 2**: You know that your code from lab 2 is functionally incorrect/incomplete. We _could_ give you our solution code, but that would spell all kinds of trouble. So instead we have compiled our solution code into a static library. Thanks to the CMakeLists.txt, CMake will link this library during compilation, and you will be able to call our methods, like `first_hit()` and `viewing_ray()` without viewing our source code. **However, libraries are platform dependent**, and we don't have the patience to compile one for every OS out there. We only support Windows, Ubuntu 20.04, Ubuntu 22.04 (Do you have a newer version and it works? Let us know.) and MacOS with Intel x86_64 chips (and the arm64 chips through Rosetta). More info below.
+
+## Submission
+
+You know the drill. Check if your `rgb.png` files look exactly like those in the `correct_results/` folder.
+
+## Building the project using CMake
+
+Go ahead and have a quick look at `CMakeLists.txt` before you continue. There are 2 main changes.
+
+1. If you chose Option 1 (use your own files in `lab1/`), then you need to set the `USE_OWN_SRC_FILES_LAB1` parameter on ON (explained below). Then the files in `lab1` will be added to `${SRCFILES}` and passed to the compiler through `add_executable(${PROJECT_NAME} ${SRCFILES})`. Compiling, building and running your code should go without a hitch.
+2. If you chose Option 2, then `USE_OWN_SRC_FILES_LAB1` should be OFF. The lines `link_directories(${LIB_PATH})` and `target_link_libraries(${PROJECT_NAME} hw2)` tell the compiler which static library to link.
+
+Depending on your choice between Option 1 and 2, `USE_OWN_SRC_FILES_LAB1` should be set to `ON` or `OFF` respectively. This can be achieved in several ways, for example:
+
+- by passing a command line arg to cmake, e.g.: `cmake .. -DUSE_OWN_SRC_FILES_LAB1=ON`.
+- by overwriting the 5th line in CMakeLists.txt, e.g.: `option(USE_OWN_SRC_FILES_LAB1 "Use the cpp files in lab1/" ON)`
+
+Let's say that you were able to build your executable. When you run it, it will create not only `rgb.png` but also the familiar `depth.png`. If the latter is completely black or looks wrong, then your compiler is not correctly using the code from the previous lab. If you are using Option 2, it means that our static library is incorrect or does not support your platform, so consider switching to Option 1. If that really is not a possibility, contact us.
+
+## Linux, MacOS (and WSL Windows)
+
+Pass `-DCMAKE_BUILD_TYPE=Debug` or `-DCMAKE_BUILD_TYPE=Release` to `cmake` on the command line. So for Option 1:
+
+```
+cmake .. -DUSE_OWN_SRC_FILES_LAB1=ON -DCMAKE_BUILD_TYPE=Debug
+```
+
+For Option 2:
+
+```
+cmake .. -DCMAKE_BUILD_TYPE=Debug
+```
+
+## MacOS new arm64 chips
+
+The static libraries `lib/*/mac/libhw2.a` were compiled with the x86_64 architecture in mind. So in theory, if your Mac can compile the rest of the ray tracing code as x86_64 as well (using Rosetta), you should get a fully working x86_64 executable. This in turn can be run through Rosetta. We don't have a Mac to test this on, so we cannot make it work for you. This worked for one student last year, but there are no guarantees:
+
+```
+# download the x86_64 version of cmake
+arch -x86_64 /usr/local/bin/brew install cmake
+
+# run cmake as usual, in the build folder
+arch -x86_64 /usr/local/bin/cmake .. -DCMAKE_BUILD_TYPE=Debug
+
+make
+
+# run program
+arch -x86_64 ./raytracing ../data/sphere-and-plane.json
+```
+
+## Windows
+
+Option 1: you can work in Debug or Release mode, as you wish.
+
+Option 2: you can only work in Release mode, since we did not provide you with `lib/Debug/win/hw2.lib`. So don't forget to change to Release mode in Visual Studio, or your IDE of choice.
+
+Chances are that you don't use CMake on the command line, so just alter line 5 in CMakeLists.txt to your liking.
+
+Note: while building, you might get warnings like `PDB 'hw2.pdb' was not found`, ignore these.
diff --git a/correct_results/bunny.png b/correct_results/bunny.png
new file mode 100644
index 0000000..0909cb3
Binary files /dev/null and b/correct_results/bunny.png differ
diff --git a/correct_results/inside-a-sphere.png b/correct_results/inside-a-sphere.png
new file mode 100644
index 0000000..ebdded7
Binary files /dev/null and b/correct_results/inside-a-sphere.png differ
diff --git a/correct_results/mirror.png b/correct_results/mirror.png
new file mode 100644
index 0000000..f76cb60
Binary files /dev/null and b/correct_results/mirror.png differ
diff --git a/correct_results/sphere-and-plane.png b/correct_results/sphere-and-plane.png
new file mode 100644
index 0000000..1f89fcd
Binary files /dev/null and b/correct_results/sphere-and-plane.png differ
diff --git a/correct_results/sphere-large-change.png b/correct_results/sphere-large-change.png
new file mode 100644
index 0000000..f317d1e
Binary files /dev/null and b/correct_results/sphere-large-change.png differ
diff --git a/correct_results/sphere-packing.png b/correct_results/sphere-packing.png
new file mode 100644
index 0000000..ebd139d
Binary files /dev/null and b/correct_results/sphere-packing.png differ
diff --git a/correct_results/sphere-small-change.png b/correct_results/sphere-small-change.png
new file mode 100644
index 0000000..2c3b8e9
Binary files /dev/null and b/correct_results/sphere-small-change.png differ
diff --git a/correct_results/sphere.png b/correct_results/sphere.png
new file mode 100644
index 0000000..3195a1c
Binary files /dev/null and b/correct_results/sphere.png differ
diff --git a/correct_results/triangle.png b/correct_results/triangle.png
new file mode 100644
index 0000000..50aa6b0
Binary files /dev/null and b/correct_results/triangle.png differ
diff --git a/correct_results/two-spheres-and-plane.png b/correct_results/two-spheres-and-plane.png
new file mode 100644
index 0000000..e4beafc
Binary files /dev/null and b/correct_results/two-spheres-and-plane.png differ
diff --git a/css/ambient-diffuse-specular-shadows-reflection.png b/css/ambient-diffuse-specular-shadows-reflection.png
new file mode 100644
index 0000000..b739bfa
Binary files /dev/null and b/css/ambient-diffuse-specular-shadows-reflection.png differ
diff --git a/css/ambient-diffuse-specular-shadows.png b/css/ambient-diffuse-specular-shadows.png
new file mode 100644
index 0000000..d2476a8
Binary files /dev/null and b/css/ambient-diffuse-specular-shadows.png differ
diff --git a/css/ambient-diffuse-specular.png b/css/ambient-diffuse-specular.png
new file mode 100644
index 0000000..dafd665
Binary files /dev/null and b/css/ambient-diffuse-specular.png differ
diff --git a/css/ambient-diffuse.png b/css/ambient-diffuse.png
new file mode 100644
index 0000000..e7d5221
Binary files /dev/null and b/css/ambient-diffuse.png differ
diff --git a/css/ambient.png b/css/ambient.png
new file mode 100644
index 0000000..5eed817
Binary files /dev/null and b/css/ambient.png differ
diff --git a/css/bunny.png b/css/bunny.png
new file mode 100644
index 0000000..0e0559e
Binary files /dev/null and b/css/bunny.png differ
diff --git a/css/diffuse_formula.png b/css/diffuse_formula.png
new file mode 100644
index 0000000..a48ed7b
Binary files /dev/null and b/css/diffuse_formula.png differ
diff --git a/css/github-markdown.css b/css/github-markdown.css
new file mode 100644
index 0000000..c5f9777
--- /dev/null
+++ b/css/github-markdown.css
@@ -0,0 +1,695 @@
+@font-face {
+ font-family: octicons-link;
+ src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
+}
+
+.markdown-body {
+ -ms-text-size-adjust: 100%;
+ -webkit-text-size-adjust: 100%;
+ line-height: 1.5;
+ color: #24292e;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+ font-size: 16px;
+ line-height: 1.5;
+ word-wrap: break-word;
+}
+
+.markdown-body .pl-c {
+ color: #6a737d;
+}
+
+.markdown-body .pl-c1,
+.markdown-body .pl-s .pl-v {
+ color: #005cc5;
+}
+
+.markdown-body .pl-e,
+.markdown-body .pl-en {
+ color: #6f42c1;
+}
+
+.markdown-body .pl-smi,
+.markdown-body .pl-s .pl-s1 {
+ color: #24292e;
+}
+
+.markdown-body .pl-ent {
+ color: #22863a;
+}
+
+.markdown-body .pl-k {
+ color: #d73a49;
+}
+
+.markdown-body .pl-s,
+.markdown-body .pl-pds,
+.markdown-body .pl-s .pl-pse .pl-s1,
+.markdown-body .pl-sr,
+.markdown-body .pl-sr .pl-cce,
+.markdown-body .pl-sr .pl-sre,
+.markdown-body .pl-sr .pl-sra {
+ color: #032f62;
+}
+
+.markdown-body .pl-v,
+.markdown-body .pl-smw {
+ color: #e36209;
+}
+
+.markdown-body .pl-bu {
+ color: #b31d28;
+}
+
+.markdown-body .pl-ii {
+ color: #fafbfc;
+ background-color: #b31d28;
+}
+
+.markdown-body .pl-c2 {
+ color: #fafbfc;
+ background-color: #d73a49;
+}
+
+.markdown-body .pl-c2::before {
+ content: "^M";
+}
+
+.markdown-body .pl-sr .pl-cce {
+ font-weight: bold;
+ color: #22863a;
+}
+
+.markdown-body .pl-ml {
+ color: #735c0f;
+}
+
+.markdown-body .pl-mh,
+.markdown-body .pl-mh .pl-en,
+.markdown-body .pl-ms {
+ font-weight: bold;
+ color: #005cc5;
+}
+
+.markdown-body .pl-mi {
+ font-style: italic;
+ color: #24292e;
+}
+
+.markdown-body .pl-mb {
+ font-weight: bold;
+ color: #24292e;
+}
+
+.markdown-body .pl-md {
+ color: #b31d28;
+ background-color: #ffeef0;
+}
+
+.markdown-body .pl-mi1 {
+ color: #22863a;
+ background-color: #f0fff4;
+}
+
+.markdown-body .pl-mc {
+ color: #e36209;
+ background-color: #ffebda;
+}
+
+.markdown-body .pl-mi2 {
+ color: #f6f8fa;
+ background-color: #005cc5;
+}
+
+.markdown-body .pl-mdr {
+ font-weight: bold;
+ color: #6f42c1;
+}
+
+.markdown-body .pl-ba {
+ color: #586069;
+}
+
+.markdown-body .pl-sg {
+ color: #959da5;
+}
+
+.markdown-body .pl-corl {
+ text-decoration: underline;
+ color: #032f62;
+}
+
+.markdown-body .octicon {
+ display: inline-block;
+ vertical-align: text-top;
+ fill: currentColor;
+}
+
+.markdown-body a {
+ background-color: transparent;
+}
+
+.markdown-body a:active,
+.markdown-body a:hover {
+ outline-width: 0;
+}
+
+.markdown-body strong {
+ font-weight: inherit;
+}
+
+.markdown-body strong {
+ font-weight: bolder;
+}
+
+.markdown-body h1 {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+.markdown-body img {
+ border-style: none;
+}
+
+.markdown-body code,
+.markdown-body kbd,
+.markdown-body pre {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+.markdown-body hr {
+ box-sizing: content-box;
+ height: 0;
+ overflow: visible;
+}
+
+.markdown-body input {
+ font: inherit;
+ margin: 0;
+}
+
+.markdown-body input {
+ overflow: visible;
+}
+
+.markdown-body [type="checkbox"] {
+ box-sizing: border-box;
+ padding: 0;
+}
+
+.markdown-body * {
+ box-sizing: border-box;
+}
+
+.markdown-body input {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+.markdown-body a {
+ color: #0366d6;
+ text-decoration: none;
+}
+
+.markdown-body a:hover {
+ text-decoration: underline;
+}
+
+.markdown-body strong {
+ font-weight: 600;
+}
+
+.markdown-body hr {
+ height: 0;
+ margin: 15px 0;
+ overflow: hidden;
+ background: transparent;
+ border: 0;
+ border-bottom: 1px solid #dfe2e5;
+}
+
+.markdown-body hr::before {
+ display: table;
+ content: "";
+}
+
+.markdown-body hr::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+.markdown-body table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+
+.markdown-body td,
+.markdown-body th {
+ padding: 0;
+}
+
+.markdown-body h1,
+.markdown-body h2,
+.markdown-body h3,
+.markdown-body h4,
+.markdown-body h5,
+.markdown-body h6 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.markdown-body h1 {
+ font-size: 32px;
+ font-weight: 600;
+}
+
+.markdown-body h2 {
+ font-size: 24px;
+ font-weight: 600;
+}
+
+.markdown-body h3 {
+ font-size: 20px;
+ font-weight: 600;
+}
+
+.markdown-body h4 {
+ font-size: 16px;
+ font-weight: 600;
+}
+
+.markdown-body h5 {
+ font-size: 14px;
+ font-weight: 600;
+}
+
+.markdown-body h6 {
+ font-size: 12px;
+ font-weight: 600;
+}
+
+.markdown-body p {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+
+.markdown-body blockquote {
+ margin: 0;
+}
+
+.markdown-body ul,
+.markdown-body ol {
+ padding-left: 0;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.markdown-body ol ol,
+.markdown-body ul ol {
+ list-style-type: lower-roman;
+}
+
+.markdown-body ul ul ol,
+.markdown-body ul ol ol,
+.markdown-body ol ul ol,
+.markdown-body ol ol ol {
+ list-style-type: lower-alpha;
+}
+
+.markdown-body dd {
+ margin-left: 0;
+}
+
+.markdown-body code {
+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ font-size: 12px;
+}
+
+.markdown-body pre {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ font-size: 12px;
+}
+
+.markdown-body .octicon {
+ vertical-align: text-bottom;
+}
+
+.markdown-body .pl-0 {
+ padding-left: 0 !important;
+}
+
+.markdown-body .pl-1 {
+ padding-left: 4px !important;
+}
+
+.markdown-body .pl-2 {
+ padding-left: 8px !important;
+}
+
+.markdown-body .pl-3 {
+ padding-left: 16px !important;
+}
+
+.markdown-body .pl-4 {
+ padding-left: 24px !important;
+}
+
+.markdown-body .pl-5 {
+ padding-left: 32px !important;
+}
+
+.markdown-body .pl-6 {
+ padding-left: 40px !important;
+}
+
+.markdown-body::before {
+ display: table;
+ content: "";
+}
+
+.markdown-body::after {
+ display: table;
+ clear: both;
+ content: "";
+}
+
+.markdown-body>*:first-child {
+ margin-top: 0 !important;
+}
+
+.markdown-body>*:last-child {
+ margin-bottom: 0 !important;
+}
+
+.markdown-body a:not([href]) {
+ color: inherit;
+ text-decoration: none;
+}
+
+.markdown-body .anchor {
+ float: left;
+ padding-right: 4px;
+ margin-left: -20px;
+ line-height: 1;
+}
+
+.markdown-body .anchor:focus {
+ outline: none;
+}
+
+.markdown-body p,
+.markdown-body blockquote,
+.markdown-body ul,
+.markdown-body ol,
+.markdown-body dl,
+.markdown-body table,
+.markdown-body pre {
+ margin-top: 0;
+ margin-bottom: 16px;
+}
+
+.markdown-body hr {
+ height: 0.25em;
+ padding: 0;
+ margin: 24px 0;
+ background-color: #e1e4e8;
+ border: 0;
+}
+
+.markdown-body blockquote {
+ padding: 0 1em;
+ color: #6a737d;
+ border-left: 0.25em solid #dfe2e5;
+}
+
+.markdown-body blockquote>:first-child {
+ margin-top: 0;
+}
+
+.markdown-body blockquote>:last-child {
+ margin-bottom: 0;
+}
+
+.markdown-body kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font-size: 11px;
+ line-height: 10px;
+ color: #444d56;
+ vertical-align: middle;
+ background-color: #fafbfc;
+ border: solid 1px #c6cbd1;
+ border-bottom-color: #959da5;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #959da5;
+}
+
+.markdown-body h1,
+.markdown-body h2,
+.markdown-body h3,
+.markdown-body h4,
+.markdown-body h5,
+.markdown-body h6 {
+ margin-top: 24px;
+ margin-bottom: 16px;
+ font-weight: 600;
+ line-height: 1.25;
+}
+
+.markdown-body h1 .octicon-link,
+.markdown-body h2 .octicon-link,
+.markdown-body h3 .octicon-link,
+.markdown-body h4 .octicon-link,
+.markdown-body h5 .octicon-link,
+.markdown-body h6 .octicon-link {
+ color: #1b1f23;
+ vertical-align: middle;
+ visibility: hidden;
+}
+
+.markdown-body h1:hover .anchor,
+.markdown-body h2:hover .anchor,
+.markdown-body h3:hover .anchor,
+.markdown-body h4:hover .anchor,
+.markdown-body h5:hover .anchor,
+.markdown-body h6:hover .anchor {
+ text-decoration: none;
+}
+
+.markdown-body h1:hover .anchor .octicon-link,
+.markdown-body h2:hover .anchor .octicon-link,
+.markdown-body h3:hover .anchor .octicon-link,
+.markdown-body h4:hover .anchor .octicon-link,
+.markdown-body h5:hover .anchor .octicon-link,
+.markdown-body h6:hover .anchor .octicon-link {
+ visibility: visible;
+}
+
+.markdown-body h1 {
+ padding-bottom: 0.3em;
+ font-size: 2em;
+ border-bottom: 1px solid #eaecef;
+}
+
+.markdown-body h2 {
+ padding-bottom: 0.3em;
+ font-size: 1.5em;
+ border-bottom: 1px solid #eaecef;
+}
+
+.markdown-body h3 {
+ font-size: 1.25em;
+}
+
+.markdown-body h4 {
+ font-size: 1em;
+}
+
+.markdown-body h5 {
+ font-size: 0.875em;
+}
+
+.markdown-body h6 {
+ font-size: 0.85em;
+ color: #6a737d;
+}
+
+.markdown-body ul,
+.markdown-body ol {
+ padding-left: 2em;
+}
+
+.markdown-body ul ul,
+.markdown-body ul ol,
+.markdown-body ol ol,
+.markdown-body ol ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+.markdown-body li {
+ word-wrap: break-all;
+}
+
+.markdown-body li>p {
+ margin-top: 16px;
+}
+
+.markdown-body li+li {
+ margin-top: 0.25em;
+}
+
+.markdown-body dl {
+ padding: 0;
+}
+
+.markdown-body dl dt {
+ padding: 0;
+ margin-top: 16px;
+ font-size: 1em;
+ font-style: italic;
+ font-weight: 600;
+}
+
+.markdown-body dl dd {
+ padding: 0 16px;
+ margin-bottom: 16px;
+}
+
+.markdown-body table {
+ display: block;
+ width: 100%;
+ overflow: auto;
+}
+
+.markdown-body table th {
+ font-weight: 600;
+}
+
+.markdown-body table th,
+.markdown-body table td {
+ padding: 6px 13px;
+ border: 1px solid #dfe2e5;
+}
+
+.markdown-body table tr {
+ background-color: #fff;
+ border-top: 1px solid #c6cbd1;
+}
+
+.markdown-body table tr:nth-child(2n) {
+ background-color: #f6f8fa;
+}
+
+.markdown-body img {
+ max-width: 100%;
+ box-sizing: content-box;
+ background-color: #fff;
+}
+
+.markdown-body img[align=right] {
+ padding-left: 20px;
+}
+
+.markdown-body img[align=left] {
+ padding-right: 20px;
+}
+
+.markdown-body code {
+ padding: 0.2em 0.4em;
+ margin: 0;
+ font-size: 85%;
+ background-color: rgba(27,31,35,0.05);
+ border-radius: 3px;
+}
+
+.markdown-body pre {
+ word-wrap: normal;
+}
+
+.markdown-body pre>code {
+ padding: 0;
+ margin: 0;
+ font-size: 100%;
+ word-break: normal;
+ white-space: pre;
+ background: transparent;
+ border: 0;
+}
+
+.markdown-body .highlight {
+ margin-bottom: 16px;
+}
+
+.markdown-body .highlight pre {
+ margin-bottom: 0;
+ word-break: normal;
+}
+
+.markdown-body .highlight pre,
+.markdown-body pre {
+ padding: 16px;
+ overflow: auto;
+ font-size: 85%;
+ line-height: 1.45;
+ background-color: #f6f8fa;
+ border-radius: 3px;
+}
+
+.markdown-body pre code {
+ display: inline;
+ max-width: auto;
+ padding: 0;
+ margin: 0;
+ overflow: visible;
+ line-height: inherit;
+ word-wrap: normal;
+ background-color: transparent;
+ border: 0;
+}
+
+.markdown-body .full-commit .btn-outline:not(:disabled):hover {
+ color: #005cc5;
+ border-color: #005cc5;
+}
+
+.markdown-body kbd {
+ display: inline-block;
+ padding: 3px 5px;
+ font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
+ line-height: 10px;
+ color: #444d56;
+ vertical-align: middle;
+ background-color: #fafbfc;
+ border: solid 1px #d1d5da;
+ border-bottom-color: #c6cbd1;
+ border-radius: 3px;
+ box-shadow: inset 0 -1px 0 #c6cbd1;
+}
+
+.markdown-body :checked+.radio-label {
+ position: relative;
+ z-index: 1;
+ border-color: #0366d6;
+}
+
+.markdown-body .task-list-item {
+ list-style-type: none;
+}
+
+.markdown-body .task-list-item+.task-list-item {
+ margin-top: 3px;
+}
+
+.markdown-body .task-list-item input {
+ margin: 0 0.2em 0.25em -1.6em;
+ vertical-align: middle;
+}
+
+.markdown-body hr {
+ border-bottom-color: #eee;
+}
diff --git a/css/sphere-and-plane.gif b/css/sphere-and-plane.gif
new file mode 100644
index 0000000..bb76508
Binary files /dev/null and b/css/sphere-and-plane.gif differ
diff --git a/css/sphere-and-plane.png b/css/sphere-and-plane.png
new file mode 100644
index 0000000..9e7237e
Binary files /dev/null and b/css/sphere-and-plane.png differ
diff --git a/css/sphere-packing.png b/css/sphere-packing.png
new file mode 100644
index 0000000..a996f03
Binary files /dev/null and b/css/sphere-packing.png differ
diff --git a/data/bunny.json b/data/bunny.json
new file mode 100644
index 0000000..f1e7d39
--- /dev/null
+++ b/data/bunny.json
@@ -0,0 +1,124 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 1,
+ "eye": [0,0,2],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "lights":[
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [-0.9,0.9,2]
+ },
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [0.9,0.9,2]
+ },
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [0,0.9,2]
+ },
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [0,-0.9,2]
+ }
+ ],
+
+ "materials": [
+ {
+ "name": "matte gray",
+ "ka": [0.90, 0.90, 0.90],
+ "kd": [0.95, 0.95, 0.95],
+ "ks": [0.3,0.3,0.3],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 200
+ },
+ {
+ "name": "red metal",
+ "ka": [0.894118,0.101961,0.109804],
+ "kd": [0.894118,0.101961,0.109804],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "blue metal",
+ "ka": [0.215686,0.494118,0.721569],
+ "kd": [0.215686,0.494118,0.721569],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "green metal",
+ "ka": [0.301961,0.686275,0.290196],
+ "kd": [0.301961,0.686275,0.290196],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "orange metal",
+ "ka": [1,0.49804,0],
+ "kd": [1,0.49804,0],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "purple metal",
+ "ka": [0.596078,0.305882,0.639216],
+ "kd": [0.596078,0.305882,0.639216],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "soup",
+ "material": "matte gray",
+ "stl": "bunny.stl"
+ },
+ {
+ "type": "plane",
+ "material": "red metal",
+ "point": [-1,0,0],
+ "normal": [1,0,0]
+ },
+ {
+ "type": "plane",
+ "material": "purple metal",
+ "point": [0,0,-1],
+ "normal": [0,0,1]
+ },
+ {
+ "type": "plane",
+ "material": "blue metal",
+ "point": [0,1,0],
+ "normal": [0,-1,0]
+ },
+ {
+ "type": "plane",
+ "material": "orange metal",
+ "point": [1,0,0],
+ "normal": [-1,0,0]
+ },
+ {
+ "material": "green metal",
+ "type": "plane",
+ "point": [0,-1,0],
+ "normal": [0,1,0]
+ }
+ ]
+}
+
diff --git a/data/bunny.stl b/data/bunny.stl
new file mode 100644
index 0000000..acb7ef9
Binary files /dev/null and b/data/bunny.stl differ
diff --git a/data/cube.stl b/data/cube.stl
new file mode 100644
index 0000000..87878bc
--- /dev/null
+++ b/data/cube.stl
@@ -0,0 +1,86 @@
+solid model
+facet normal 0.0 0.0 -1.0
+outer loop
+vertex 20.0 0.0 0.0
+vertex 0.0 -20.0 0.0
+vertex 0.0 0.0 0.0
+endloop
+endfacet
+facet normal 0.0 0.0 -1.0
+outer loop
+vertex 0.0 -20.0 0.0
+vertex 20.0 0.0 0.0
+vertex 20.0 -20.0 0.0
+endloop
+endfacet
+facet normal -0.0 -1.0 -0.0
+outer loop
+vertex 20.0 -20.0 20.0
+vertex 0.0 -20.0 0.0
+vertex 20.0 -20.0 0.0
+endloop
+endfacet
+facet normal -0.0 -1.0 -0.0
+outer loop
+vertex 0.0 -20.0 0.0
+vertex 20.0 -20.0 20.0
+vertex 0.0 -20.0 20.0
+endloop
+endfacet
+facet normal 1.0 0.0 0.0
+outer loop
+vertex 20.0 0.0 0.0
+vertex 20.0 -20.0 20.0
+vertex 20.0 -20.0 0.0
+endloop
+endfacet
+facet normal 1.0 0.0 0.0
+outer loop
+vertex 20.0 -20.0 20.0
+vertex 20.0 0.0 0.0
+vertex 20.0 0.0 20.0
+endloop
+endfacet
+facet normal -0.0 -0.0 1.0
+outer loop
+vertex 20.0 -20.0 20.0
+vertex 0.0 0.0 20.0
+vertex 0.0 -20.0 20.0
+endloop
+endfacet
+facet normal -0.0 -0.0 1.0
+outer loop
+vertex 0.0 0.0 20.0
+vertex 20.0 -20.0 20.0
+vertex 20.0 0.0 20.0
+endloop
+endfacet
+facet normal -1.0 0.0 0.0
+outer loop
+vertex 0.0 0.0 20.0
+vertex 0.0 -20.0 0.0
+vertex 0.0 -20.0 20.0
+endloop
+endfacet
+facet normal -1.0 0.0 0.0
+outer loop
+vertex 0.0 -20.0 0.0
+vertex 0.0 0.0 20.0
+vertex 0.0 0.0 0.0
+endloop
+endfacet
+facet normal -0.0 1.0 0.0
+outer loop
+vertex 0.0 0.0 20.0
+vertex 20.0 0.0 0.0
+vertex 0.0 0.0 0.0
+endloop
+endfacet
+facet normal -0.0 1.0 0.0
+outer loop
+vertex 20.0 0.0 0.0
+vertex 0.0 0.0 20.0
+vertex 20.0 0.0 20.0
+endloop
+endfacet
+endsolid model
diff --git a/data/frame.stl b/data/frame.stl
new file mode 100644
index 0000000..494cef5
Binary files /dev/null and b/data/frame.stl differ
diff --git a/data/inside-a-sphere.json b/data/inside-a-sphere.json
new file mode 100644
index 0000000..4fae79c
--- /dev/null
+++ b/data/inside-a-sphere.json
@@ -0,0 +1,106 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,5],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "materials": [
+ {
+ "name": "red metal",
+ "ka": [0.894118,0.101961,0.109804],
+ "kd": [0.894118,0.101961,0.109804],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "blue metal",
+ "ka": [0.215686,0.494118,0.721569],
+ "kd": [0.215686,0.494118,0.721569],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "green metal",
+ "ka": [0.301961,0.686275,0.290196],
+ "kd": [0.301961,0.686275,0.290196],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "purple metal",
+ "ka": [0.596078,0.305882,0.639216],
+ "kd": [0.596078,0.305882,0.639216],
+ "ks": [0.2,0.2,0.2],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 500
+ },
+ {
+ "name": "orange plastic",
+ "ka": [1, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ }
+ ],
+
+ "lights":[
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [0,0,6]
+ },
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [-0.9,0,3]
+ },
+ {
+ "type": "point",
+ "color": [0.3,0.3,0.3],
+ "position": [0.9,0,3]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "plane",
+ "material": "red metal",
+ "point": [-1,-1,0],
+ "normal": [1,0,0]
+ },
+ {
+ "type": "plane",
+ "material": "purple metal",
+ "point": [1,-1,0],
+ "normal": [-1,0,0]
+ },
+ {
+ "type": "plane",
+ "material": "blue metal",
+ "point": [0,1,0],
+ "normal": [0,-1,0]
+ },
+ {
+ "type": "plane",
+ "material": "green metal",
+ "point": [0,-1,0],
+ "normal": [0,1,0]
+ },
+ {
+ "type": "sphere",
+ "material": "orange plastic",
+ "center": [0.0,0,1.6],
+ "radius": 0.5
+ }
+ ]
+}
+
diff --git a/data/mirror.json b/data/mirror.json
new file mode 100644
index 0000000..aa9df54
--- /dev/null
+++ b/data/mirror.json
@@ -0,0 +1,116 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 1.1,
+ "eye": [1,0,2],
+ "up": [0,1,0],
+ "look": [-0.92388,0,-0.38268],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "lights":[
+ {
+ "type": "point",
+ "color": [0.3,0.4,0.3],
+ "position": [ 0,0.5,1.5]
+ },
+ {
+ "type": "point",
+ "color": [0.35,0.3,0.35],
+ "position": [ 0,0.5,-0.5]
+ }
+ ],
+
+ "materials": [
+ {
+ "name": "matte gray",
+ "ka": [0.90, 0.90, 0.90],
+ "kd": [0.95, 0.95, 0.95],
+ "ks": [0.3,0.3,0.3],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 200
+ },
+ {
+ "name": "black paint",
+ "ka": [0.1,0.1,0.1],
+ "kd": [0.1,0.1,0.1],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.0,0.0,0.0],
+ "phong_exponent": 200
+ },
+ {
+ "name": "brown plastic",
+ "ka": [0.596078,0.305882,0.639216],
+ "kd": [0.3,0.25,0.2],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.0,0.0,0.0],
+ "phong_exponent": 200
+ },
+ {
+ "name": "gray mirror",
+ "ka": [0.1,0.1,0.1],
+ "kd": [0.1,0.1,0.1],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.999,0.999,0.999],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "yellow bone",
+ "ka": [0.95, 0.95, 0.9],
+ "kd": [0.95, 0.95, 0.9],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.00,0.00,0.00],
+ "phong_exponent": 200
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "plane",
+ "material": "black paint",
+ "point": [-1,0,0],
+ "normal": [1,0,0]
+ },
+ {
+ "type": "plane",
+ "material": "black paint",
+ "point": [0,0,-1],
+ "normal": [0,0,1]
+ },
+ {
+ "type": "plane",
+ "material": "black paint",
+ "point": [0,1,0],
+ "normal": [0,-1,0]
+ },
+ {
+ "type": "plane",
+ "material": "black paint",
+ "point": [1,0,0],
+ "normal": [-1,0,0]
+ },
+ {
+ "material": "black paint",
+ "type": "plane",
+ "point": [0,-1,0],
+ "normal": [0,1,0]
+ },
+ {
+ "material": "brown plastic",
+ "type": "soup",
+ "stl": "../data/frame.stl"
+ },
+ {
+ "material": "gray mirror",
+ "type": "soup",
+ "stl": "../data/mirror.stl"
+ },
+ {
+ "material": "yellow bone",
+ "type": "soup",
+ "stl": "../data/skull.stl"
+ }
+ ]
+}
+
diff --git a/data/mirror.stl b/data/mirror.stl
new file mode 100644
index 0000000..4d62433
Binary files /dev/null and b/data/mirror.stl differ
diff --git a/data/skull.stl b/data/skull.stl
new file mode 100644
index 0000000..5ca8440
Binary files /dev/null and b/data/skull.stl differ
diff --git a/data/sphere-and-plane.json b/data/sphere-and-plane.json
new file mode 100644
index 0000000..e104b09
--- /dev/null
+++ b/data/sphere-and-plane.json
@@ -0,0 +1,56 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,5],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "Lambertian blue",
+ "ka": [0.2, 0.3, 0.8],
+ "kd": [0.2, 0.3, 0.8],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.3,0.3,0.3],
+ "phong_exponent": 20
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0,0,-1],
+ "color": [0.8,0.8,0.8]
+ },
+ {
+ "type": "point",
+ "position": [-10,20,10],
+ "color": [0.8,0.8,0.8]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "sphere",
+ "material": "orange plastic",
+ "center": [0,0,0],
+ "radius": 0.5
+ },
+ {
+ "type": "plane",
+ "material": "Lambertian blue",
+ "point": [0,-0.5,0],
+ "normal": [0,1,0]
+ }
+ ]
+}
diff --git a/data/sphere-large-change.json b/data/sphere-large-change.json
new file mode 100644
index 0000000..4709bff
--- /dev/null
+++ b/data/sphere-large-change.json
@@ -0,0 +1,50 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,4],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1
+ },
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1.0, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "light blue",
+ "ka": [0.1, 0.1, 0.2],
+ "kd": [0.5, 0.6, 0.8],
+ "ks": [0.05,0.05,0.1],
+ "km": [0.2,0.2,0.2],
+ "phong_exponent": 20
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0.1,0.1,-1],
+ "color": [1.0,0.6,0.6]
+ },
+ {
+ "type": "point",
+ "position": [10,-10,10],
+ "color": [0.8,1.0,0.8]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "sphere",
+ "material": "light blue",
+ "center": [0,0,0],
+ "radius": 0.5
+ }
+ ]
+}
diff --git a/data/sphere-packing.json b/data/sphere-packing.json
new file mode 100644
index 0000000..02322aa
--- /dev/null
+++ b/data/sphere-packing.json
@@ -0,0 +1,101 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 2.8,
+ "eye": [9.6,0.3,10],
+ "up": [-0.7071067812,0,0.7071067812],
+ "look": [-0.7071067812,0,-0.7071067812],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "materials": [
+ {
+ "name": "Lambertian gray",
+ "ka": [0.2, 0.2, 0.2],
+ "kd": [0.8, 0.8, 0.8],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.1,0.1,0.1],
+ "phong_exponent": 20
+ },
+ {
+ "name": "red metal",
+ "ka": [0.894118,0.101961,0.109804],
+ "kd": [0.894118,0.101961,0.109804],
+ "ks": [0.894118,0.101961,0.109804],
+ "km": [0.894118,0.101961,0.109804],
+ "phong_exponent": 2000
+ },
+ {
+ "name": "blue metal",
+ "ka": [0.215686,0.494118,0.721569],
+ "kd": [0.215686,0.494118,0.721569],
+ "ks": [0.215686,0.494118,0.721569],
+ "km": [0.215686,0.494118,0.721569],
+ "phong_exponent": 2000
+ },
+ {
+ "name": "green metal",
+ "ka": [0.301961,0.686275,0.290196],
+ "kd": [0.301961,0.686275,0.290196],
+ "ks": [0.301961,0.686275,0.290196],
+ "km": [0.301961,0.686275,0.290196],
+ "phong_exponent": 2000
+ },
+ {
+ "name": "purple metal",
+ "ka": [0.596078,0.305882,0.639216],
+ "kd": [0.596078,0.305882,0.639216],
+ "ks": [0.596078,0.305882,0.639216],
+ "km": [0.596078,0.305882,0.639216],
+ "phong_exponent": 2000
+ }
+ ],
+ "lights":[
+ {
+ "type": "point",
+ "position": [0.3,9,15],
+ "color": [0.7,0.7,0.7]
+ },
+ {
+ "type": "point",
+ "position": [9,-0.3,15],
+ "color": [0.7,0.7,0.7]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "plane",
+ "material": "Lambertian gray",
+ "point": [0,0,-1],
+ "normal": [0,0,1]
+ },
+ {
+ "type": "sphere",
+ "material": "red metal",
+ "radius": 1,
+ "center": [0,0,1]
+ },
+ {
+ "type": "sphere",
+ "material": "blue metal",
+ "radius": 1,
+ "center": [2,0,1]
+ },
+ {
+ "type": "sphere",
+ "material": "green metal",
+ "radius": 1,
+ "center": [1,1.7321,1]
+ },
+ {
+ "type": "sphere",
+ "material": "purple metal",
+ "radius": 1,
+ "center": [1,0.57735,2.633]
+ }
+ ]
+}
+
+
diff --git a/data/sphere-small-change.json b/data/sphere-small-change.json
new file mode 100644
index 0000000..46dd616
--- /dev/null
+++ b/data/sphere-small-change.json
@@ -0,0 +1,50 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,4],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1
+ },
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1.0, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "light blue",
+ "ka": [0.1, 0.1, 0.2],
+ "kd": [0.5, 0.6, 0.8],
+ "ks": [0.05,0.05,0.1],
+ "km": [0.2,0.2,0.2],
+ "phong_exponent": 20
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0,0,-1],
+ "color": [0.85,0.8,0.8]
+ },
+ {
+ "type": "point",
+ "position": [-5,10,10],
+ "color": [0.8,0.85,0.8]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "sphere",
+ "material": "light blue",
+ "center": [0,0,0],
+ "radius": 0.5
+ }
+ ]
+}
diff --git a/data/sphere.json b/data/sphere.json
new file mode 100644
index 0000000..d5070fe
--- /dev/null
+++ b/data/sphere.json
@@ -0,0 +1,50 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,4],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1.0, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "light blue",
+ "ka": [0.1, 0.1, 0.2],
+ "kd": [0.5, 0.6, 0.8],
+ "ks": [0.05,0.05,0.1],
+ "km": [0.2,0.2,0.2],
+ "phong_exponent": 20
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0,0,-1],
+ "color": [0.8,0.8,0.8]
+ },
+ {
+ "type": "point",
+ "position": [-10,20,10],
+ "color": [0.8,0.8,0.8]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "sphere",
+ "material": "light blue",
+ "center": [0,0,0],
+ "radius": 0.5
+ }
+ ]
+}
diff --git a/data/triangle.json b/data/triangle.json
new file mode 100644
index 0000000..88352df
--- /dev/null
+++ b/data/triangle.json
@@ -0,0 +1,40 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,6],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "objects": [
+ {
+ "type": "triangle",
+ "corners": [
+ [-0.5,0,0],
+ [0.5,0,0],
+ [0,0.8660254038,0]
+ ],
+ "material": "orange plastic"
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0,0,-1],
+ "color": [0.8,0.8,0.8]
+ }
+ ],
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1.0, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ }
+ ]
+}
diff --git a/data/two-spheres-and-plane.json b/data/two-spheres-and-plane.json
new file mode 100644
index 0000000..3f646e3
--- /dev/null
+++ b/data/two-spheres-and-plane.json
@@ -0,0 +1,71 @@
+{
+ "camera": {
+ "type": "perspective",
+ "focal_length": 3,
+ "eye": [0,0,5],
+ "up": [0,1,0],
+ "look": [0,0,-1],
+ "height": 1,
+ "width": 1.7777777778
+ },
+
+ "materials": [
+ {
+ "name": "orange plastic",
+ "ka": [1, 0.7, 0.2],
+ "kd": [1.0, 0.7, 0.2],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "teal plastic",
+ "ka": [0.2, 1, 0.7],
+ "kd": [0.2, 1, 0.7],
+ "ks": [0.8,0.8,0.8],
+ "km": [0.05,0.05,0.05],
+ "phong_exponent": 1000
+ },
+ {
+ "name": "Lambertian blue",
+ "ka": [0.2, 0.3, 0.8],
+ "kd": [0.2, 0.3, 0.8],
+ "ks": [0.1,0.1,0.1],
+ "km": [0.3,0.3,0.3],
+ "phong_exponent": 20
+ }
+ ],
+ "lights":[
+ {
+ "type": "directional",
+ "direction": [0,0,-1],
+ "color": [0.8,0.8,0.8]
+ },
+ {
+ "type": "point",
+ "position": [-10,20,10],
+ "color": [0.8,0.8,0.8]
+ }
+ ],
+
+ "objects": [
+ {
+ "type": "sphere",
+ "material": "teal plastic",
+ "center": [-0.6,-0.5,-3],
+ "radius": 0.5
+ },
+ {
+ "type": "sphere",
+ "material": "orange plastic",
+ "center": [1.0,0,-4],
+ "radius": 1.0
+ },
+ {
+ "type": "plane",
+ "material": "Lambertian blue",
+ "point": [0,-1,0],
+ "normal": [0,1,0]
+ }
+ ]
+}
diff --git a/eigen/Eigen/CMakeLists.txt b/eigen/Eigen/CMakeLists.txt
new file mode 100644
index 0000000..9eb502b
--- /dev/null
+++ b/eigen/Eigen/CMakeLists.txt
@@ -0,0 +1,19 @@
+include(RegexUtils)
+test_escape_string_as_regex()
+
+file(GLOB Eigen_directory_files "*")
+
+escape_string_as_regex(ESCAPED_CMAKE_CURRENT_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
+
+foreach(f ${Eigen_directory_files})
+ if(NOT f MATCHES "\\.txt" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/[.].+" AND NOT f MATCHES "${ESCAPED_CMAKE_CURRENT_SOURCE_DIR}/src")
+ list(APPEND Eigen_directory_files_to_install ${f})
+ endif()
+endforeach(f ${Eigen_directory_files})
+
+install(FILES
+ ${Eigen_directory_files_to_install}
+ DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel
+ )
+
+install(DIRECTORY src DESTINATION ${INCLUDE_INSTALL_DIR}/Eigen COMPONENT Devel FILES_MATCHING PATTERN "*.h")
diff --git a/eigen/Eigen/Cholesky b/eigen/Eigen/Cholesky
new file mode 100644
index 0000000..1332b54
--- /dev/null
+++ b/eigen/Eigen/Cholesky
@@ -0,0 +1,46 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_CHOLESKY_MODULE_H
+#define EIGEN_CHOLESKY_MODULE_H
+
+#include "Core"
+#include "Jacobi"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup Cholesky_Module Cholesky module
+ *
+ *
+ *
+ * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices.
+ * Those decompositions are also accessible via the following methods:
+ * - MatrixBase::llt()
+ * - MatrixBase::ldlt()
+ * - SelfAdjointView::llt()
+ * - SelfAdjointView::ldlt()
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/Cholesky/LLT.h"
+#include "src/Cholesky/LDLT.h"
+#ifdef EIGEN_USE_LAPACKE
+#ifdef EIGEN_USE_MKL
+#include "mkl_lapacke.h"
+#else
+#include "src/misc/lapacke.h"
+#endif
+#include "src/Cholesky/LLT_LAPACKE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_CHOLESKY_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/CholmodSupport b/eigen/Eigen/CholmodSupport
new file mode 100644
index 0000000..bed8924
--- /dev/null
+++ b/eigen/Eigen/CholmodSupport
@@ -0,0 +1,48 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_CHOLMODSUPPORT_MODULE_H
+#define EIGEN_CHOLMODSUPPORT_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+extern "C" {
+ #include
+}
+
+/** \ingroup Support_modules
+ * \defgroup CholmodSupport_Module CholmodSupport module
+ *
+ * This module provides an interface to the Cholmod library which is part of the suitesparse package.
+ * It provides the two following main factorization classes:
+ * - class CholmodSupernodalLLT: a supernodal LLT Cholesky factorization.
+ * - class CholmodDecomposiiton: a general L(D)LT Cholesky factorization with automatic or explicit runtime selection of the underlying factorization method (supernodal or simplicial).
+ *
+ * For the sake of completeness, this module also propose the two following classes:
+ * - class CholmodSimplicialLLT
+ * - class CholmodSimplicialLDLT
+ * Note that these classes does not bring any particular advantage compared to the built-in
+ * SimplicialLLT and SimplicialLDLT factorization classes.
+ *
+ * \code
+ * #include
+ * \endcode
+ *
+ * In order to use this module, the cholmod headers must be accessible from the include paths, and your binary must be linked to the cholmod library and its dependencies.
+ * The dependencies depend on how cholmod has been compiled.
+ * For a cmake based project, you can use our FindCholmod.cmake module to help you in this task.
+ *
+ */
+
+#include "src/CholmodSupport/CholmodSupport.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_CHOLMODSUPPORT_MODULE_H
+
diff --git a/eigen/Eigen/Core b/eigen/Eigen/Core
new file mode 100644
index 0000000..b923b8c
--- /dev/null
+++ b/eigen/Eigen/Core
@@ -0,0 +1,537 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008 Gael Guennebaud
+// Copyright (C) 2007-2011 Benoit Jacob
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_CORE_H
+#define EIGEN_CORE_H
+
+// first thing Eigen does: stop the compiler from committing suicide
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#if defined(__CUDACC__) && !defined(EIGEN_NO_CUDA)
+ #define EIGEN_CUDACC __CUDACC__
+#endif
+
+#if defined(__CUDA_ARCH__) && !defined(EIGEN_NO_CUDA)
+ #define EIGEN_CUDA_ARCH __CUDA_ARCH__
+#endif
+
+#if defined(__CUDACC_VER_MAJOR__) && (__CUDACC_VER_MAJOR__ >= 9)
+#define EIGEN_CUDACC_VER ((__CUDACC_VER_MAJOR__ * 10000) + (__CUDACC_VER_MINOR__ * 100))
+#elif defined(__CUDACC_VER__)
+#define EIGEN_CUDACC_VER __CUDACC_VER__
+#else
+#define EIGEN_CUDACC_VER 0
+#endif
+
+// Handle NVCC/CUDA/SYCL
+#if defined(__CUDACC__) || defined(__SYCL_DEVICE_ONLY__)
+ // Do not try asserts on CUDA and SYCL!
+ #ifndef EIGEN_NO_DEBUG
+ #define EIGEN_NO_DEBUG
+ #endif
+
+ #ifdef EIGEN_INTERNAL_DEBUGGING
+ #undef EIGEN_INTERNAL_DEBUGGING
+ #endif
+
+ #ifdef EIGEN_EXCEPTIONS
+ #undef EIGEN_EXCEPTIONS
+ #endif
+
+ // All functions callable from CUDA code must be qualified with __device__
+ #ifdef __CUDACC__
+ // Do not try to vectorize on CUDA and SYCL!
+ #ifndef EIGEN_DONT_VECTORIZE
+ #define EIGEN_DONT_VECTORIZE
+ #endif
+
+ #define EIGEN_DEVICE_FUNC __host__ __device__
+ // We need cuda_runtime.h to ensure that that EIGEN_USING_STD_MATH macro
+ // works properly on the device side
+ #include
+ #else
+ #define EIGEN_DEVICE_FUNC
+ #endif
+
+#else
+ #define EIGEN_DEVICE_FUNC
+
+#endif
+
+// When compiling CUDA device code with NVCC, pull in math functions from the
+// global namespace. In host mode, and when device doee with clang, use the
+// std versions.
+#if defined(__CUDA_ARCH__) && defined(__NVCC__)
+ #define EIGEN_USING_STD_MATH(FUNC) using ::FUNC;
+#else
+ #define EIGEN_USING_STD_MATH(FUNC) using std::FUNC;
+#endif
+
+#if (defined(_CPPUNWIND) || defined(__EXCEPTIONS)) && !defined(__CUDA_ARCH__) && !defined(EIGEN_EXCEPTIONS) && !defined(EIGEN_USE_SYCL)
+ #define EIGEN_EXCEPTIONS
+#endif
+
+#ifdef EIGEN_EXCEPTIONS
+ #include
+#endif
+
+// then include this file where all our macros are defined. It's really important to do it first because
+// it's where we do all the alignment settings (platform detection and honoring the user's will if he
+// defined e.g. EIGEN_DONT_ALIGN) so it needs to be done before we do anything with vectorization.
+#include "src/Core/util/Macros.h"
+
+// Disable the ipa-cp-clone optimization flag with MinGW 6.x or newer (enabled by default with -O3)
+// See http://eigen.tuxfamily.org/bz/show_bug.cgi?id=556 for details.
+#if EIGEN_COMP_MINGW && EIGEN_GNUC_AT_LEAST(4,6)
+ #pragma GCC optimize ("-fno-ipa-cp-clone")
+#endif
+
+#include
+
+// this include file manages BLAS and MKL related macros
+// and inclusion of their respective header files
+#include "src/Core/util/MKL_support.h"
+
+// if alignment is disabled, then disable vectorization. Note: EIGEN_MAX_ALIGN_BYTES is the proper check, it takes into
+// account both the user's will (EIGEN_MAX_ALIGN_BYTES,EIGEN_DONT_ALIGN) and our own platform checks
+#if EIGEN_MAX_ALIGN_BYTES==0
+ #ifndef EIGEN_DONT_VECTORIZE
+ #define EIGEN_DONT_VECTORIZE
+ #endif
+#endif
+
+#if EIGEN_COMP_MSVC
+ #include // for _aligned_malloc -- need it regardless of whether vectorization is enabled
+ #if (EIGEN_COMP_MSVC >= 1500) // 2008 or later
+ // Remember that usage of defined() in a #define is undefined by the standard.
+ // a user reported that in 64-bit mode, MSVC doesn't care to define _M_IX86_FP.
+ #if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || EIGEN_ARCH_x86_64
+ #define EIGEN_SSE2_ON_MSVC_2008_OR_LATER
+ #endif
+ #endif
+#else
+ // Remember that usage of defined() in a #define is undefined by the standard
+ #if (defined __SSE2__) && ( (!EIGEN_COMP_GNUC) || EIGEN_COMP_ICC || EIGEN_GNUC_AT_LEAST(4,2) )
+ #define EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC
+ #endif
+#endif
+
+#ifndef EIGEN_DONT_VECTORIZE
+
+ #if defined (EIGEN_SSE2_ON_NON_MSVC_BUT_NOT_OLD_GCC) || defined(EIGEN_SSE2_ON_MSVC_2008_OR_LATER)
+
+ // Defines symbols for compile-time detection of which instructions are
+ // used.
+ // EIGEN_VECTORIZE_YY is defined if and only if the instruction set YY is used
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_SSE
+ #define EIGEN_VECTORIZE_SSE2
+
+ // Detect sse3/ssse3/sse4:
+ // gcc and icc defines __SSE3__, ...
+ // there is no way to know about this on msvc. You can define EIGEN_VECTORIZE_SSE* if you
+ // want to force the use of those instructions with msvc.
+ #ifdef __SSE3__
+ #define EIGEN_VECTORIZE_SSE3
+ #endif
+ #ifdef __SSSE3__
+ #define EIGEN_VECTORIZE_SSSE3
+ #endif
+ #ifdef __SSE4_1__
+ #define EIGEN_VECTORIZE_SSE4_1
+ #endif
+ #ifdef __SSE4_2__
+ #define EIGEN_VECTORIZE_SSE4_2
+ #endif
+ #ifdef __AVX__
+ #define EIGEN_VECTORIZE_AVX
+ #define EIGEN_VECTORIZE_SSE3
+ #define EIGEN_VECTORIZE_SSSE3
+ #define EIGEN_VECTORIZE_SSE4_1
+ #define EIGEN_VECTORIZE_SSE4_2
+ #endif
+ #ifdef __AVX2__
+ #define EIGEN_VECTORIZE_AVX2
+ #endif
+ #ifdef __FMA__
+ #define EIGEN_VECTORIZE_FMA
+ #endif
+ #if defined(__AVX512F__) && defined(EIGEN_ENABLE_AVX512)
+ #define EIGEN_VECTORIZE_AVX512
+ #define EIGEN_VECTORIZE_AVX2
+ #define EIGEN_VECTORIZE_AVX
+ #define EIGEN_VECTORIZE_FMA
+ #ifdef __AVX512DQ__
+ #define EIGEN_VECTORIZE_AVX512DQ
+ #endif
+ #ifdef __AVX512ER__
+ #define EIGEN_VECTORIZE_AVX512ER
+ #endif
+ #endif
+
+ // include files
+
+ // This extern "C" works around a MINGW-w64 compilation issue
+ // https://sourceforge.net/tracker/index.php?func=detail&aid=3018394&group_id=202880&atid=983354
+ // In essence, intrin.h is included by windows.h and also declares intrinsics (just as emmintrin.h etc. below do).
+ // However, intrin.h uses an extern "C" declaration, and g++ thus complains of duplicate declarations
+ // with conflicting linkage. The linkage for intrinsics doesn't matter, but at that stage the compiler doesn't know;
+ // so, to avoid compile errors when windows.h is included after Eigen/Core, ensure intrinsics are extern "C" here too.
+ // notice that since these are C headers, the extern "C" is theoretically needed anyways.
+ extern "C" {
+ // In theory we should only include immintrin.h and not the other *mmintrin.h header files directly.
+ // Doing so triggers some issues with ICC. However old gcc versions seems to not have this file, thus:
+ #if EIGEN_COMP_ICC >= 1110
+ #include
+ #else
+ #include
+ #include
+ #include
+ #ifdef EIGEN_VECTORIZE_SSE3
+ #include
+ #endif
+ #ifdef EIGEN_VECTORIZE_SSSE3
+ #include
+ #endif
+ #ifdef EIGEN_VECTORIZE_SSE4_1
+ #include
+ #endif
+ #ifdef EIGEN_VECTORIZE_SSE4_2
+ #include
+ #endif
+ #if defined(EIGEN_VECTORIZE_AVX) || defined(EIGEN_VECTORIZE_AVX512)
+ #include
+ #endif
+ #endif
+ } // end extern "C"
+ #elif defined __VSX__
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_VSX
+ #include
+ // We need to #undef all these ugly tokens defined in
+ // => use __vector instead of vector
+ #undef bool
+ #undef vector
+ #undef pixel
+ #elif defined __ALTIVEC__
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_ALTIVEC
+ #include
+ // We need to #undef all these ugly tokens defined in
+ // => use __vector instead of vector
+ #undef bool
+ #undef vector
+ #undef pixel
+ #elif (defined __ARM_NEON) || (defined __ARM_NEON__)
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_NEON
+ #include
+ #elif (defined __s390x__ && defined __VEC__)
+ #define EIGEN_VECTORIZE
+ #define EIGEN_VECTORIZE_ZVECTOR
+ #include
+ #endif
+#endif
+
+#if defined(__F16C__) && !defined(EIGEN_COMP_CLANG)
+ // We can use the optimized fp16 to float and float to fp16 conversion routines
+ #define EIGEN_HAS_FP16_C
+#endif
+
+#if defined __CUDACC__
+ #define EIGEN_VECTORIZE_CUDA
+ #include
+ #if EIGEN_CUDACC_VER >= 70500
+ #define EIGEN_HAS_CUDA_FP16
+ #endif
+#endif
+
+#if defined EIGEN_HAS_CUDA_FP16
+ #include
+ #include
+#endif
+
+#if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE)
+ #define EIGEN_HAS_OPENMP
+#endif
+
+#ifdef EIGEN_HAS_OPENMP
+#include
+#endif
+
+// MSVC for windows mobile does not have the errno.h file
+#if !(EIGEN_COMP_MSVC && EIGEN_OS_WINCE) && !EIGEN_COMP_ARM
+#define EIGEN_HAS_ERRNO
+#endif
+
+#ifdef EIGEN_HAS_ERRNO
+#include
+#endif
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include // for CHAR_BIT
+// for min/max:
+#include
+
+// for std::is_nothrow_move_assignable
+#ifdef EIGEN_INCLUDE_TYPE_TRAITS
+#include
+#endif
+
+// for outputting debug info
+#ifdef EIGEN_DEBUG_ASSIGN
+#include
+#endif
+
+// required for __cpuid, needs to be included after cmath
+#if EIGEN_COMP_MSVC && EIGEN_ARCH_i386_OR_x86_64 && !EIGEN_OS_WINCE
+ #include
+#endif
+
+/** \brief Namespace containing all symbols from the %Eigen library. */
+namespace Eigen {
+
+inline static const char *SimdInstructionSetsInUse(void) {
+#if defined(EIGEN_VECTORIZE_AVX512)
+ return "AVX512, FMA, AVX2, AVX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
+#elif defined(EIGEN_VECTORIZE_AVX)
+ return "AVX SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
+#elif defined(EIGEN_VECTORIZE_SSE4_2)
+ return "SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2";
+#elif defined(EIGEN_VECTORIZE_SSE4_1)
+ return "SSE, SSE2, SSE3, SSSE3, SSE4.1";
+#elif defined(EIGEN_VECTORIZE_SSSE3)
+ return "SSE, SSE2, SSE3, SSSE3";
+#elif defined(EIGEN_VECTORIZE_SSE3)
+ return "SSE, SSE2, SSE3";
+#elif defined(EIGEN_VECTORIZE_SSE2)
+ return "SSE, SSE2";
+#elif defined(EIGEN_VECTORIZE_ALTIVEC)
+ return "AltiVec";
+#elif defined(EIGEN_VECTORIZE_VSX)
+ return "VSX";
+#elif defined(EIGEN_VECTORIZE_NEON)
+ return "ARM NEON";
+#elif defined(EIGEN_VECTORIZE_ZVECTOR)
+ return "S390X ZVECTOR";
+#else
+ return "None";
+#endif
+}
+
+} // end namespace Eigen
+
+#if defined EIGEN2_SUPPORT_STAGE40_FULL_EIGEN3_STRICTNESS || defined EIGEN2_SUPPORT_STAGE30_FULL_EIGEN3_API || defined EIGEN2_SUPPORT_STAGE20_RESOLVE_API_CONFLICTS || defined EIGEN2_SUPPORT_STAGE10_FULL_EIGEN2_API || defined EIGEN2_SUPPORT
+// This will generate an error message:
+#error Eigen2-support is only available up to version 3.2. Please go to "http://eigen.tuxfamily.org/index.php?title=Eigen2" for further information
+#endif
+
+namespace Eigen {
+
+// we use size_t frequently and we'll never remember to prepend it with std:: everytime just to
+// ensure QNX/QCC support
+using std::size_t;
+// gcc 4.6.0 wants std:: for ptrdiff_t
+using std::ptrdiff_t;
+
+}
+
+/** \defgroup Core_Module Core module
+ * This is the main module of Eigen providing dense matrix and vector support
+ * (both fixed and dynamic size) with all the features corresponding to a BLAS library
+ * and much more...
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/Core/util/Constants.h"
+#include "src/Core/util/Meta.h"
+#include "src/Core/util/ForwardDeclarations.h"
+#include "src/Core/util/StaticAssert.h"
+#include "src/Core/util/XprHelper.h"
+#include "src/Core/util/Memory.h"
+
+#include "src/Core/NumTraits.h"
+#include "src/Core/MathFunctions.h"
+#include "src/Core/GenericPacketMath.h"
+#include "src/Core/MathFunctionsImpl.h"
+#include "src/Core/arch/Default/ConjHelper.h"
+
+#if defined EIGEN_VECTORIZE_AVX512
+ #include "src/Core/arch/SSE/PacketMath.h"
+ #include "src/Core/arch/AVX/PacketMath.h"
+ #include "src/Core/arch/AVX512/PacketMath.h"
+ #include "src/Core/arch/AVX512/MathFunctions.h"
+#elif defined EIGEN_VECTORIZE_AVX
+ // Use AVX for floats and doubles, SSE for integers
+ #include "src/Core/arch/SSE/PacketMath.h"
+ #include "src/Core/arch/SSE/Complex.h"
+ #include "src/Core/arch/SSE/MathFunctions.h"
+ #include "src/Core/arch/AVX/PacketMath.h"
+ #include "src/Core/arch/AVX/MathFunctions.h"
+ #include "src/Core/arch/AVX/Complex.h"
+ #include "src/Core/arch/AVX/TypeCasting.h"
+ #include "src/Core/arch/SSE/TypeCasting.h"
+#elif defined EIGEN_VECTORIZE_SSE
+ #include "src/Core/arch/SSE/PacketMath.h"
+ #include "src/Core/arch/SSE/MathFunctions.h"
+ #include "src/Core/arch/SSE/Complex.h"
+ #include "src/Core/arch/SSE/TypeCasting.h"
+#elif defined(EIGEN_VECTORIZE_ALTIVEC) || defined(EIGEN_VECTORIZE_VSX)
+ #include "src/Core/arch/AltiVec/PacketMath.h"
+ #include "src/Core/arch/AltiVec/MathFunctions.h"
+ #include "src/Core/arch/AltiVec/Complex.h"
+#elif defined EIGEN_VECTORIZE_NEON
+ #include "src/Core/arch/NEON/PacketMath.h"
+ #include "src/Core/arch/NEON/MathFunctions.h"
+ #include "src/Core/arch/NEON/Complex.h"
+#elif defined EIGEN_VECTORIZE_ZVECTOR
+ #include "src/Core/arch/ZVector/PacketMath.h"
+ #include "src/Core/arch/ZVector/MathFunctions.h"
+ #include "src/Core/arch/ZVector/Complex.h"
+#endif
+
+// Half float support
+#include "src/Core/arch/CUDA/Half.h"
+#include "src/Core/arch/CUDA/PacketMathHalf.h"
+#include "src/Core/arch/CUDA/TypeCasting.h"
+
+#if defined EIGEN_VECTORIZE_CUDA
+ #include "src/Core/arch/CUDA/PacketMath.h"
+ #include "src/Core/arch/CUDA/MathFunctions.h"
+#endif
+
+#include "src/Core/arch/Default/Settings.h"
+
+#include "src/Core/functors/TernaryFunctors.h"
+#include "src/Core/functors/BinaryFunctors.h"
+#include "src/Core/functors/UnaryFunctors.h"
+#include "src/Core/functors/NullaryFunctors.h"
+#include "src/Core/functors/StlFunctors.h"
+#include "src/Core/functors/AssignmentFunctors.h"
+
+// Specialized functors to enable the processing of complex numbers
+// on CUDA devices
+#include "src/Core/arch/CUDA/Complex.h"
+
+#include "src/Core/IO.h"
+#include "src/Core/DenseCoeffsBase.h"
+#include "src/Core/DenseBase.h"
+#include "src/Core/MatrixBase.h"
+#include "src/Core/EigenBase.h"
+
+#include "src/Core/Product.h"
+#include "src/Core/CoreEvaluators.h"
+#include "src/Core/AssignEvaluator.h"
+
+#ifndef EIGEN_PARSED_BY_DOXYGEN // work around Doxygen bug triggered by Assign.h r814874
+ // at least confirmed with Doxygen 1.5.5 and 1.5.6
+ #include "src/Core/Assign.h"
+#endif
+
+#include "src/Core/ArrayBase.h"
+#include "src/Core/util/BlasUtil.h"
+#include "src/Core/DenseStorage.h"
+#include "src/Core/NestByValue.h"
+
+// #include "src/Core/ForceAlignedAccess.h"
+
+#include "src/Core/ReturnByValue.h"
+#include "src/Core/NoAlias.h"
+#include "src/Core/PlainObjectBase.h"
+#include "src/Core/Matrix.h"
+#include "src/Core/Array.h"
+#include "src/Core/CwiseTernaryOp.h"
+#include "src/Core/CwiseBinaryOp.h"
+#include "src/Core/CwiseUnaryOp.h"
+#include "src/Core/CwiseNullaryOp.h"
+#include "src/Core/CwiseUnaryView.h"
+#include "src/Core/SelfCwiseBinaryOp.h"
+#include "src/Core/Dot.h"
+#include "src/Core/StableNorm.h"
+#include "src/Core/Stride.h"
+#include "src/Core/MapBase.h"
+#include "src/Core/Map.h"
+#include "src/Core/Ref.h"
+#include "src/Core/Block.h"
+#include "src/Core/VectorBlock.h"
+#include "src/Core/Transpose.h"
+#include "src/Core/DiagonalMatrix.h"
+#include "src/Core/Diagonal.h"
+#include "src/Core/DiagonalProduct.h"
+#include "src/Core/Redux.h"
+#include "src/Core/Visitor.h"
+#include "src/Core/Fuzzy.h"
+#include "src/Core/Swap.h"
+#include "src/Core/CommaInitializer.h"
+#include "src/Core/GeneralProduct.h"
+#include "src/Core/Solve.h"
+#include "src/Core/Inverse.h"
+#include "src/Core/SolverBase.h"
+#include "src/Core/PermutationMatrix.h"
+#include "src/Core/Transpositions.h"
+#include "src/Core/TriangularMatrix.h"
+#include "src/Core/SelfAdjointView.h"
+#include "src/Core/products/GeneralBlockPanelKernel.h"
+#include "src/Core/products/Parallelizer.h"
+#include "src/Core/ProductEvaluators.h"
+#include "src/Core/products/GeneralMatrixVector.h"
+#include "src/Core/products/GeneralMatrixMatrix.h"
+#include "src/Core/SolveTriangular.h"
+#include "src/Core/products/GeneralMatrixMatrixTriangular.h"
+#include "src/Core/products/SelfadjointMatrixVector.h"
+#include "src/Core/products/SelfadjointMatrixMatrix.h"
+#include "src/Core/products/SelfadjointProduct.h"
+#include "src/Core/products/SelfadjointRank2Update.h"
+#include "src/Core/products/TriangularMatrixVector.h"
+#include "src/Core/products/TriangularMatrixMatrix.h"
+#include "src/Core/products/TriangularSolverMatrix.h"
+#include "src/Core/products/TriangularSolverVector.h"
+#include "src/Core/BandMatrix.h"
+#include "src/Core/CoreIterators.h"
+#include "src/Core/ConditionEstimator.h"
+
+#include "src/Core/BooleanRedux.h"
+#include "src/Core/Select.h"
+#include "src/Core/VectorwiseOp.h"
+#include "src/Core/Random.h"
+#include "src/Core/Replicate.h"
+#include "src/Core/Reverse.h"
+#include "src/Core/ArrayWrapper.h"
+
+#ifdef EIGEN_USE_BLAS
+#include "src/Core/products/GeneralMatrixMatrix_BLAS.h"
+#include "src/Core/products/GeneralMatrixVector_BLAS.h"
+#include "src/Core/products/GeneralMatrixMatrixTriangular_BLAS.h"
+#include "src/Core/products/SelfadjointMatrixMatrix_BLAS.h"
+#include "src/Core/products/SelfadjointMatrixVector_BLAS.h"
+#include "src/Core/products/TriangularMatrixMatrix_BLAS.h"
+#include "src/Core/products/TriangularMatrixVector_BLAS.h"
+#include "src/Core/products/TriangularSolverMatrix_BLAS.h"
+#endif // EIGEN_USE_BLAS
+
+#ifdef EIGEN_USE_MKL_VML
+#include "src/Core/Assign_MKL.h"
+#endif
+
+#include "src/Core/GlobalFunctions.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_CORE_H
diff --git a/eigen/Eigen/Dense b/eigen/Eigen/Dense
new file mode 100644
index 0000000..5768910
--- /dev/null
+++ b/eigen/Eigen/Dense
@@ -0,0 +1,7 @@
+#include "Core"
+#include "LU"
+#include "Cholesky"
+#include "QR"
+#include "SVD"
+#include "Geometry"
+#include "Eigenvalues"
diff --git a/eigen/Eigen/Eigen b/eigen/Eigen/Eigen
new file mode 100644
index 0000000..654c8dc
--- /dev/null
+++ b/eigen/Eigen/Eigen
@@ -0,0 +1,2 @@
+#include "Dense"
+#include "Sparse"
diff --git a/eigen/Eigen/Eigenvalues b/eigen/Eigen/Eigenvalues
new file mode 100644
index 0000000..f3f661b
--- /dev/null
+++ b/eigen/Eigen/Eigenvalues
@@ -0,0 +1,61 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_EIGENVALUES_MODULE_H
+#define EIGEN_EIGENVALUES_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include "Cholesky"
+#include "Jacobi"
+#include "Householder"
+#include "LU"
+#include "Geometry"
+
+/** \defgroup Eigenvalues_Module Eigenvalues module
+ *
+ *
+ *
+ * This module mainly provides various eigenvalue solvers.
+ * This module also provides some MatrixBase methods, including:
+ * - MatrixBase::eigenvalues(),
+ * - MatrixBase::operatorNorm()
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/misc/RealSvd2x2.h"
+#include "src/Eigenvalues/Tridiagonalization.h"
+#include "src/Eigenvalues/RealSchur.h"
+#include "src/Eigenvalues/EigenSolver.h"
+#include "src/Eigenvalues/SelfAdjointEigenSolver.h"
+#include "src/Eigenvalues/GeneralizedSelfAdjointEigenSolver.h"
+#include "src/Eigenvalues/HessenbergDecomposition.h"
+#include "src/Eigenvalues/ComplexSchur.h"
+#include "src/Eigenvalues/ComplexEigenSolver.h"
+#include "src/Eigenvalues/RealQZ.h"
+#include "src/Eigenvalues/GeneralizedEigenSolver.h"
+#include "src/Eigenvalues/MatrixBaseEigenvalues.h"
+#ifdef EIGEN_USE_LAPACKE
+#ifdef EIGEN_USE_MKL
+#include "mkl_lapacke.h"
+#else
+#include "src/misc/lapacke.h"
+#endif
+#include "src/Eigenvalues/RealSchur_LAPACKE.h"
+#include "src/Eigenvalues/ComplexSchur_LAPACKE.h"
+#include "src/Eigenvalues/SelfAdjointEigenSolver_LAPACKE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_EIGENVALUES_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/Geometry b/eigen/Eigen/Geometry
new file mode 100644
index 0000000..716d529
--- /dev/null
+++ b/eigen/Eigen/Geometry
@@ -0,0 +1,62 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_GEOMETRY_MODULE_H
+#define EIGEN_GEOMETRY_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include "SVD"
+#include "LU"
+#include
+
+/** \defgroup Geometry_Module Geometry module
+ *
+ * This module provides support for:
+ * - fixed-size homogeneous transformations
+ * - translation, scaling, 2D and 3D rotations
+ * - \link Quaternion quaternions \endlink
+ * - cross products (\ref MatrixBase::cross, \ref MatrixBase::cross3)
+ * - orthognal vector generation (\ref MatrixBase::unitOrthogonal)
+ * - some linear components: \link ParametrizedLine parametrized-lines \endlink and \link Hyperplane hyperplanes \endlink
+ * - \link AlignedBox axis aligned bounding boxes \endlink
+ * - \link umeyama least-square transformation fitting \endlink
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/Geometry/OrthoMethods.h"
+#include "src/Geometry/EulerAngles.h"
+
+#include "src/Geometry/Homogeneous.h"
+#include "src/Geometry/RotationBase.h"
+#include "src/Geometry/Rotation2D.h"
+#include "src/Geometry/Quaternion.h"
+#include "src/Geometry/AngleAxis.h"
+#include "src/Geometry/Transform.h"
+#include "src/Geometry/Translation.h"
+#include "src/Geometry/Scaling.h"
+#include "src/Geometry/Hyperplane.h"
+#include "src/Geometry/ParametrizedLine.h"
+#include "src/Geometry/AlignedBox.h"
+#include "src/Geometry/Umeyama.h"
+
+// Use the SSE optimized version whenever possible. At the moment the
+// SSE version doesn't compile when AVX is enabled
+#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
+#include "src/Geometry/arch/Geometry_SSE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_GEOMETRY_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
+
diff --git a/eigen/Eigen/Householder b/eigen/Eigen/Householder
new file mode 100644
index 0000000..89cd81b
--- /dev/null
+++ b/eigen/Eigen/Householder
@@ -0,0 +1,30 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_HOUSEHOLDER_MODULE_H
+#define EIGEN_HOUSEHOLDER_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup Householder_Module Householder module
+ * This module provides Householder transformations.
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/Householder/Householder.h"
+#include "src/Householder/HouseholderSequence.h"
+#include "src/Householder/BlockHouseholder.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_HOUSEHOLDER_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/IterativeLinearSolvers b/eigen/Eigen/IterativeLinearSolvers
new file mode 100644
index 0000000..957d575
--- /dev/null
+++ b/eigen/Eigen/IterativeLinearSolvers
@@ -0,0 +1,48 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
+#define EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
+
+#include "SparseCore"
+#include "OrderingMethods"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/**
+ * \defgroup IterativeLinearSolvers_Module IterativeLinearSolvers module
+ *
+ * This module currently provides iterative methods to solve problems of the form \c A \c x = \c b, where \c A is a squared matrix, usually very large and sparse.
+ * Those solvers are accessible via the following classes:
+ * - ConjugateGradient for selfadjoint (hermitian) matrices,
+ * - LeastSquaresConjugateGradient for rectangular least-square problems,
+ * - BiCGSTAB for general square matrices.
+ *
+ * These iterative solvers are associated with some preconditioners:
+ * - IdentityPreconditioner - not really useful
+ * - DiagonalPreconditioner - also called Jacobi preconditioner, work very well on diagonal dominant matrices.
+ * - IncompleteLUT - incomplete LU factorization with dual thresholding
+ *
+ * Such problems can also be solved using the direct sparse decomposition modules: SparseCholesky, CholmodSupport, UmfPackSupport, SuperLUSupport.
+ *
+ \code
+ #include
+ \endcode
+ */
+
+#include "src/IterativeLinearSolvers/SolveWithGuess.h"
+#include "src/IterativeLinearSolvers/IterativeSolverBase.h"
+#include "src/IterativeLinearSolvers/BasicPreconditioners.h"
+#include "src/IterativeLinearSolvers/ConjugateGradient.h"
+#include "src/IterativeLinearSolvers/LeastSquareConjugateGradient.h"
+#include "src/IterativeLinearSolvers/BiCGSTAB.h"
+#include "src/IterativeLinearSolvers/IncompleteLUT.h"
+#include "src/IterativeLinearSolvers/IncompleteCholesky.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_ITERATIVELINEARSOLVERS_MODULE_H
diff --git a/eigen/Eigen/Jacobi b/eigen/Eigen/Jacobi
new file mode 100644
index 0000000..17c1d78
--- /dev/null
+++ b/eigen/Eigen/Jacobi
@@ -0,0 +1,33 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_JACOBI_MODULE_H
+#define EIGEN_JACOBI_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup Jacobi_Module Jacobi module
+ * This module provides Jacobi and Givens rotations.
+ *
+ * \code
+ * #include
+ * \endcode
+ *
+ * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation:
+ * - MatrixBase::applyOnTheLeft()
+ * - MatrixBase::applyOnTheRight().
+ */
+
+#include "src/Jacobi/Jacobi.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_JACOBI_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
+
diff --git a/eigen/Eigen/LU b/eigen/Eigen/LU
new file mode 100644
index 0000000..6418a86
--- /dev/null
+++ b/eigen/Eigen/LU
@@ -0,0 +1,50 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_LU_MODULE_H
+#define EIGEN_LU_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup LU_Module LU module
+ * This module includes %LU decomposition and related notions such as matrix inversion and determinant.
+ * This module defines the following MatrixBase methods:
+ * - MatrixBase::inverse()
+ * - MatrixBase::determinant()
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/misc/Kernel.h"
+#include "src/misc/Image.h"
+#include "src/LU/FullPivLU.h"
+#include "src/LU/PartialPivLU.h"
+#ifdef EIGEN_USE_LAPACKE
+#ifdef EIGEN_USE_MKL
+#include "mkl_lapacke.h"
+#else
+#include "src/misc/lapacke.h"
+#endif
+#include "src/LU/PartialPivLU_LAPACKE.h"
+#endif
+#include "src/LU/Determinant.h"
+#include "src/LU/InverseImpl.h"
+
+// Use the SSE optimized version whenever possible. At the moment the
+// SSE version doesn't compile when AVX is enabled
+#if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX
+ #include "src/LU/arch/Inverse_SSE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_LU_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/MetisSupport b/eigen/Eigen/MetisSupport
new file mode 100644
index 0000000..85c41bf
--- /dev/null
+++ b/eigen/Eigen/MetisSupport
@@ -0,0 +1,35 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_METISSUPPORT_MODULE_H
+#define EIGEN_METISSUPPORT_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+extern "C" {
+#include
+}
+
+
+/** \ingroup Support_modules
+ * \defgroup MetisSupport_Module MetisSupport module
+ *
+ * \code
+ * #include
+ * \endcode
+ * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis).
+ * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink
+ */
+
+
+#include "src/MetisSupport/MetisSupport.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_METISSUPPORT_MODULE_H
diff --git a/eigen/Eigen/OrderingMethods b/eigen/Eigen/OrderingMethods
new file mode 100644
index 0000000..d8ea361
--- /dev/null
+++ b/eigen/Eigen/OrderingMethods
@@ -0,0 +1,73 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_ORDERINGMETHODS_MODULE_H
+#define EIGEN_ORDERINGMETHODS_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/**
+ * \defgroup OrderingMethods_Module OrderingMethods module
+ *
+ * This module is currently for internal use only
+ *
+ * It defines various built-in and external ordering methods for sparse matrices.
+ * They are typically used to reduce the number of elements during
+ * the sparse matrix decomposition (LLT, LU, QR).
+ * Precisely, in a preprocessing step, a permutation matrix P is computed using
+ * those ordering methods and applied to the columns of the matrix.
+ * Using for instance the sparse Cholesky decomposition, it is expected that
+ * the nonzeros elements in LLT(A*P) will be much smaller than that in LLT(A).
+ *
+ *
+ * Usage :
+ * \code
+ * #include
+ * \endcode
+ *
+ * A simple usage is as a template parameter in the sparse decomposition classes :
+ *
+ * \code
+ * SparseLU > solver;
+ * \endcode
+ *
+ * \code
+ * SparseQR > solver;
+ * \endcode
+ *
+ * It is possible as well to call directly a particular ordering method for your own purpose,
+ * \code
+ * AMDOrdering ordering;
+ * PermutationMatrix perm;
+ * SparseMatrix A;
+ * //Fill the matrix ...
+ *
+ * ordering(A, perm); // Call AMD
+ * \endcode
+ *
+ * \note Some of these methods (like AMD or METIS), need the sparsity pattern
+ * of the input matrix to be symmetric. When the matrix is structurally unsymmetric,
+ * Eigen computes internally the pattern of \f$A^T*A\f$ before calling the method.
+ * If your matrix is already symmetric (at leat in structure), you can avoid that
+ * by calling the method with a SelfAdjointView type.
+ *
+ * \code
+ * // Call the ordering on the pattern of the lower triangular matrix A
+ * ordering(A.selfadjointView(), perm);
+ * \endcode
+ */
+
+#ifndef EIGEN_MPL2_ONLY
+#include "src/OrderingMethods/Amd.h"
+#endif
+
+#include "src/OrderingMethods/Ordering.h"
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_ORDERINGMETHODS_MODULE_H
diff --git a/eigen/Eigen/PaStiXSupport b/eigen/Eigen/PaStiXSupport
new file mode 100644
index 0000000..de3a63b
--- /dev/null
+++ b/eigen/Eigen/PaStiXSupport
@@ -0,0 +1,48 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_PASTIXSUPPORT_MODULE_H
+#define EIGEN_PASTIXSUPPORT_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+extern "C" {
+#include
+#include
+}
+
+#ifdef complex
+#undef complex
+#endif
+
+/** \ingroup Support_modules
+ * \defgroup PaStiXSupport_Module PaStiXSupport module
+ *
+ * This module provides an interface to the PaSTiX library.
+ * PaSTiX is a general \b supernodal, \b parallel and \b opensource sparse solver.
+ * It provides the two following main factorization classes:
+ * - class PastixLLT : a supernodal, parallel LLt Cholesky factorization.
+ * - class PastixLDLT: a supernodal, parallel LDLt Cholesky factorization.
+ * - class PastixLU : a supernodal, parallel LU factorization (optimized for a symmetric pattern).
+ *
+ * \code
+ * #include
+ * \endcode
+ *
+ * In order to use this module, the PaSTiX headers must be accessible from the include paths, and your binary must be linked to the PaSTiX library and its dependencies.
+ * The dependencies depend on how PaSTiX has been compiled.
+ * For a cmake based project, you can use our FindPaSTiX.cmake module to help you in this task.
+ *
+ */
+
+#include "src/PaStiXSupport/PaStiXSupport.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_PASTIXSUPPORT_MODULE_H
diff --git a/eigen/Eigen/PardisoSupport b/eigen/Eigen/PardisoSupport
new file mode 100644
index 0000000..340edf5
--- /dev/null
+++ b/eigen/Eigen/PardisoSupport
@@ -0,0 +1,35 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_PARDISOSUPPORT_MODULE_H
+#define EIGEN_PARDISOSUPPORT_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include
+
+/** \ingroup Support_modules
+ * \defgroup PardisoSupport_Module PardisoSupport module
+ *
+ * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers.
+ *
+ * \code
+ * #include
+ * \endcode
+ *
+ * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies.
+ * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration.
+ *
+ */
+
+#include "src/PardisoSupport/PardisoSupport.h"
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_PARDISOSUPPORT_MODULE_H
diff --git a/eigen/Eigen/QR b/eigen/Eigen/QR
new file mode 100644
index 0000000..c7e9144
--- /dev/null
+++ b/eigen/Eigen/QR
@@ -0,0 +1,51 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_QR_MODULE_H
+#define EIGEN_QR_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include "Cholesky"
+#include "Jacobi"
+#include "Householder"
+
+/** \defgroup QR_Module QR module
+ *
+ *
+ *
+ * This module provides various QR decompositions
+ * This module also provides some MatrixBase methods, including:
+ * - MatrixBase::householderQr()
+ * - MatrixBase::colPivHouseholderQr()
+ * - MatrixBase::fullPivHouseholderQr()
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/QR/HouseholderQR.h"
+#include "src/QR/FullPivHouseholderQR.h"
+#include "src/QR/ColPivHouseholderQR.h"
+#include "src/QR/CompleteOrthogonalDecomposition.h"
+#ifdef EIGEN_USE_LAPACKE
+#ifdef EIGEN_USE_MKL
+#include "mkl_lapacke.h"
+#else
+#include "src/misc/lapacke.h"
+#endif
+#include "src/QR/HouseholderQR_LAPACKE.h"
+#include "src/QR/ColPivHouseholderQR_LAPACKE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_QR_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/QtAlignedMalloc b/eigen/Eigen/QtAlignedMalloc
new file mode 100644
index 0000000..4f07df0
--- /dev/null
+++ b/eigen/Eigen/QtAlignedMalloc
@@ -0,0 +1,40 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_QTMALLOC_MODULE_H
+#define EIGEN_QTMALLOC_MODULE_H
+
+#include "Core"
+
+#if (!EIGEN_MALLOC_ALREADY_ALIGNED)
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+void *qMalloc(std::size_t size)
+{
+ return Eigen::internal::aligned_malloc(size);
+}
+
+void qFree(void *ptr)
+{
+ Eigen::internal::aligned_free(ptr);
+}
+
+void *qRealloc(void *ptr, std::size_t size)
+{
+ void* newPtr = Eigen::internal::aligned_malloc(size);
+ std::memcpy(newPtr, ptr, size);
+ Eigen::internal::aligned_free(ptr);
+ return newPtr;
+}
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif
+
+#endif // EIGEN_QTMALLOC_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/SPQRSupport b/eigen/Eigen/SPQRSupport
new file mode 100644
index 0000000..f70390c
--- /dev/null
+++ b/eigen/Eigen/SPQRSupport
@@ -0,0 +1,34 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPQRSUPPORT_MODULE_H
+#define EIGEN_SPQRSUPPORT_MODULE_H
+
+#include "SparseCore"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include "SuiteSparseQR.hpp"
+
+/** \ingroup Support_modules
+ * \defgroup SPQRSupport_Module SuiteSparseQR module
+ *
+ * This module provides an interface to the SPQR library, which is part of the suitesparse package.
+ *
+ * \code
+ * #include
+ * \endcode
+ *
+ * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...).
+ * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules
+ *
+ */
+
+#include "src/CholmodSupport/CholmodSupport.h"
+#include "src/SPQRSupport/SuiteSparseQRSupport.h"
+
+#endif
diff --git a/eigen/Eigen/SVD b/eigen/Eigen/SVD
new file mode 100644
index 0000000..5d0e75f
--- /dev/null
+++ b/eigen/Eigen/SVD
@@ -0,0 +1,51 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SVD_MODULE_H
+#define EIGEN_SVD_MODULE_H
+
+#include "QR"
+#include "Householder"
+#include "Jacobi"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/** \defgroup SVD_Module SVD module
+ *
+ *
+ *
+ * This module provides SVD decomposition for matrices (both real and complex).
+ * Two decomposition algorithms are provided:
+ * - JacobiSVD implementing two-sided Jacobi iterations is numerically very accurate, fast for small matrices, but very slow for larger ones.
+ * - BDCSVD implementing a recursive divide & conquer strategy on top of an upper-bidiagonalization which remains fast for large problems.
+ * These decompositions are accessible via the respective classes and following MatrixBase methods:
+ * - MatrixBase::jacobiSvd()
+ * - MatrixBase::bdcSvd()
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#include "src/misc/RealSvd2x2.h"
+#include "src/SVD/UpperBidiagonalization.h"
+#include "src/SVD/SVDBase.h"
+#include "src/SVD/JacobiSVD.h"
+#include "src/SVD/BDCSVD.h"
+#if defined(EIGEN_USE_LAPACKE) && !defined(EIGEN_USE_LAPACKE_STRICT)
+#ifdef EIGEN_USE_MKL
+#include "mkl_lapacke.h"
+#else
+#include "src/misc/lapacke.h"
+#endif
+#include "src/SVD/JacobiSVD_LAPACKE.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_SVD_MODULE_H
+/* vim: set filetype=cpp et sw=2 ts=2 ai: */
diff --git a/eigen/Eigen/Sparse b/eigen/Eigen/Sparse
new file mode 100644
index 0000000..136e681
--- /dev/null
+++ b/eigen/Eigen/Sparse
@@ -0,0 +1,36 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPARSE_MODULE_H
+#define EIGEN_SPARSE_MODULE_H
+
+/** \defgroup Sparse_Module Sparse meta-module
+ *
+ * Meta-module including all related modules:
+ * - \ref SparseCore_Module
+ * - \ref OrderingMethods_Module
+ * - \ref SparseCholesky_Module
+ * - \ref SparseLU_Module
+ * - \ref SparseQR_Module
+ * - \ref IterativeLinearSolvers_Module
+ *
+ \code
+ #include
+ \endcode
+ */
+
+#include "SparseCore"
+#include "OrderingMethods"
+#ifndef EIGEN_MPL2_ONLY
+#include "SparseCholesky"
+#endif
+#include "SparseLU"
+#include "SparseQR"
+#include "IterativeLinearSolvers"
+
+#endif // EIGEN_SPARSE_MODULE_H
+
diff --git a/eigen/Eigen/SparseCholesky b/eigen/Eigen/SparseCholesky
new file mode 100644
index 0000000..b6a320c
--- /dev/null
+++ b/eigen/Eigen/SparseCholesky
@@ -0,0 +1,45 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// Copyright (C) 2008-2013 Gael Guennebaud
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPARSECHOLESKY_MODULE_H
+#define EIGEN_SPARSECHOLESKY_MODULE_H
+
+#include "SparseCore"
+#include "OrderingMethods"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+/**
+ * \defgroup SparseCholesky_Module SparseCholesky module
+ *
+ * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices.
+ * Those decompositions are accessible via the following classes:
+ * - SimplicialLLt,
+ * - SimplicialLDLt
+ *
+ * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module.
+ *
+ * \code
+ * #include
+ * \endcode
+ */
+
+#ifdef EIGEN_MPL2_ONLY
+#error The SparseCholesky module has nothing to offer in MPL2 only mode
+#endif
+
+#include "src/SparseCholesky/SimplicialCholesky.h"
+
+#ifndef EIGEN_MPL2_ONLY
+#include "src/SparseCholesky/SimplicialCholesky_impl.h"
+#endif
+
+#include "src/Core/util/ReenableStupidWarnings.h"
+
+#endif // EIGEN_SPARSECHOLESKY_MODULE_H
diff --git a/eigen/Eigen/SparseCore b/eigen/Eigen/SparseCore
new file mode 100644
index 0000000..76966c4
--- /dev/null
+++ b/eigen/Eigen/SparseCore
@@ -0,0 +1,69 @@
+// This file is part of Eigen, a lightweight C++ template library
+// for linear algebra.
+//
+// This Source Code Form is subject to the terms of the Mozilla
+// Public License v. 2.0. If a copy of the MPL was not distributed
+// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+#ifndef EIGEN_SPARSECORE_MODULE_H
+#define EIGEN_SPARSECORE_MODULE_H
+
+#include "Core"
+
+#include "src/Core/util/DisableStupidWarnings.h"
+
+#include
+#include