Code Monkey home page Code Monkey logo

computer-graphics-ray-casting's People

Contributors

abhimadan avatar alecjacobson avatar psarahdactyl avatar rarora7777 avatar texify[bot] avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

computer-graphics-ray-casting's Issues

Sphere Ray Intersection

For ray-sphere intersection, do we need to consider the case where the image plane cuts the sphere into half. (i.e. 0 < t1 < 1, t2 > 1)

Problem With Building The Project

I had just finished the code of my A2, however, when I was trying to make the executable. An error occurred when building the main function while I have no idea how to fix this problem. Here is the screenshot of the error message.

alt text

alexander@AlexanderLeeLight:/mnt/c/18fall/csc418/A2/computer-graphics-ray-casting-master/build$ make
Scanning dependencies of target raycasting
[ 11%] Building CXX object CMakeFiles/raycasting.dir/src/first_hit.cpp.o
[ 22%] Building CXX object CMakeFiles/raycasting.dir/src/Plane.cpp.o
[ 33%] Building CXX object CMakeFiles/raycasting.dir/src/Sphere.cpp.o
[ 44%] Building CXX object CMakeFiles/raycasting.dir/src/Triangle.cpp.o
[ 55%] Building CXX object CMakeFiles/raycasting.dir/src/TriangleSoup.cpp.o
[ 66%] Building CXX object CMakeFiles/raycasting.dir/src/viewing_ray.cpp.o
[ 77%] Building CXX object CMakeFiles/raycasting.dir/src/write_ppm.cpp.o
[ 88%] Building CXX object CMakeFiles/raycasting.dir/main.cpp.o
In file included from /mnt/c/18fall/csc418/A2/computer-graphics-ray-casting-master/main.cpp:6:0:
/mnt/c/18fall/csc418/A2/computer-graphics-ray-casting-master/include/read_json.h: In lambda function:
/mnt/c/18fall/csc418/A2/computer-graphics-ray-casting-master/include/read_json.h:94:22: error: converting to ‘std::tuple<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1> >’ from initializer list would use explicit constructor ‘constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}; = void; _Elements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}]’
tri->corners = {
^
/mnt/c/18fall/csc418/A2/computer-graphics-ray-casting-master/include/read_json.h:121:24: error: converting to ‘std::tuple<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1> >’ from initializer list would use explicit constructor ‘constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}; = void; _Elements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}]’
tri->corners = {
^
CMakeFiles/raycasting.dir/build.make:230: recipe for target 'CMakeFiles/raycasting.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/raycasting.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/raycasting.dir/all' failed
make[1]: *** [CMakeFiles/raycasting.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

Triangle is working and but triangle soup isn't working.

I am able to print out a triangle by completing intersecting for triangle. However, when I run the triangle soup it wasn't working, the background printed ok but the triangles for the bunny were really scattered. I am not too sure why it is like this. How can I debug my code to check where the error is?

confusion on focal length and eye position

When i was writing code for viewing_ray, i noticed that in the .json files, the eye and the focal length have different values. Example, for the sphere_and_plane.json file,

"focal_length": 3,
"eye": [0,0,5],

So I am bit confused here as based on lecture, I though the eye would be positioned at the focal point.

Another point, in the readme, its mentioned -

The image rectangle (e.g., 640 pixels by 360 pixels) is placed so the image center is directly in front of the "eye" point at a certain "focal length" $d$.

However, in some of the .json files, i dont think it follows this assumption. For example, in the sphere-packing.json file,

"eye": [9.6,0.3,10],

So is the eye positioned such that it is looking at the image screen at an angle? Or is the image plane also rotated to match the eye?

IOError: .\bunny.stl could not be opened...

I‘m using visual studio 2017 on windows 10 and got this error.
I found in "read_json.h", line 110, the value of variable "stl_path" is just "bunny.stl". So how should I fix it? Change the path of "bunny.stl" through "bunny.json" or copy the STL model to the "build" folder?

bunny takes forever to run

I ran it on my linux virtual machine and it usually takes 5-7 min, for cdf machine it takes more than 15 min, is it normal?

Triangle Soup Normal Direction

Every triangle will have two surface normals, one in the "+ve" direction and one in the "-ve" direction. For the normal we return, are we supposed to pick a specific one? The reason I am asking is I get this image as my normal.ppm. While for the most of it it looks correct, the colors aren't the same as the one in the assignment description. I'm guessing that's because some normals are pointing in a certain direction and some are pointing in another. Is there a specific direction we're supposed to be picking? If so, what is it?

normal

textbook page 78

according to the method given by the textbook, to consider ray&triangle intersection. Is there any helper function in or any other lib we can use to calculate those huge matrices?
like β =

xa − xe xa − xc xd
ya − ye ya − yc yd
za − ze za − zc zd divide by

|A|

make command not executing out of the box due to json.hpp

After running "make" from the build folder after doing cmake, I'm getting a large number of issues from the Javascript files. Can anyone advise? I'm working on the ECF machines, and I'm thinking it might be a compiler issue.

Here's the results of cmake in the build folder:
-- The C compiler identification is GNU 4.4.7
-- The CXX compiler identification is GNU 4.4.7
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Failed
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Configuring done
-- Generating done
-- Build files have been written to: /u/c/sissonde/computer-graphics-ray-casting/build

And here's make:
Scanning dependencies of target raycasting
[ 12%] Building CXX object CMakeFiles/raycasting.dir/src/write_ppm.cpp.o
[ 25%] Building CXX object CMakeFiles/raycasting.dir/src/Plane.cpp.o
[ 37%] Building CXX object CMakeFiles/raycasting.dir/src/Sphere.cpp.o
[ 50%] Building CXX object CMakeFiles/raycasting.dir/src/TriangleSoup.cpp.o
[ 62%] Building CXX object CMakeFiles/raycasting.dir/src/viewing_ray.cpp.o
[ 75%] Building CXX object CMakeFiles/raycasting.dir/src/first_hit.cpp.o
[ 87%] Building CXX object CMakeFiles/raycasting.dir/src/Triangle.cpp.o
[100%] Building CXX object CMakeFiles/raycasting.dir/main.cpp.o
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:129:14: error: #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers"
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:110: error: expected nested-name-specifier before ‘json’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:110: error: ‘json’ has not been declared
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:110: error: expected ‘;’ before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:110: error: expected unqualified-id before ‘=’ token
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:271: error: expected unqualified-id before ‘using’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:274: error: expected unqualified-id before ‘using’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:281: error: expected nested-name-specifier before ‘type’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:281: error: using-declaration for non-member at class scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:281: error: expected ‘;’ before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:281: error: expected unqualified-id before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:282: error: expected nested-name-specifier before ‘value_type’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:282: error: using-declaration for non-member at class scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:282: error: expected ‘;’ before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:282: error: expected unqualified-id before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:283: error: ‘constexpr’ does not name a type
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:305: error: expected unqualified-id before ‘using’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:343: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:344: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:345: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:346: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:354: error: expected ‘;’ before ‘auto’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:365: error: expected ‘;’ before ‘auto’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:373: error: declaration of ‘auto nlohmann::detail::is_compatible_object_type<BasicJsonType, CompatibleObjectType>::constexpr’ has no initializer
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:373: error: expected ‘;’ before ‘value’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:383: error: declaration of ‘auto nlohmann::detail::is_compatible_string_type<BasicJsonType, CompatibleStringType>::constexpr’ has no initializer
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:383: error: expected ‘;’ before ‘value’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:392: error: declaration of ‘auto nlohmann::detail::is_basic_json_nested_type<BasicJsonType, T>::constexpr’ has no initializer
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:392: error: expected ‘;’ before ‘value’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:401: error: declaration of ‘auto nlohmann::detail::is_compatible_array_type<BasicJsonType, CompatibleArrayType>::constexpr’ has no initializer
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:401: error: expected ‘;’ before ‘value’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:419: error: expected nested-name-specifier before ‘RealLimits’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:419: error: using-declaration for non-member at class scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:419: error: expected ‘;’ before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:419: error: expected unqualified-id before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:420: error: expected nested-name-specifier before ‘CompatibleLimits’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:420: error: using-declaration for non-member at class scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:420: error: expected ‘;’ before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:420: error: expected unqualified-id before ‘=’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:422: error: expected ‘;’ before ‘auto’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:431: error: expected ‘;’ before ‘auto’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:444: error: expected type-specifier before ‘enable_if_t’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:444: error: expected ‘>’ before ‘enable_if_t’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:450: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:462: error: expected type-specifier before ‘enable_if_t’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:462: error: expected ‘>’ before ‘enable_if_t’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:468: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:477: error: ‘uncvref_t’ was not declared in this scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:477: error: ‘uncvref_t’ was not declared in this scope
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:477: error: expected primary-expression before ‘>’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:477: error: ‘::to_json’ has not been declared
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: ‘declval’ is not a member of ‘std’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: expected primary-expression before ‘&’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: expected primary-expression before ‘>’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: expected primary-expression before ‘)’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: ‘declval’ is not a member of ‘std’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: expected primary-expression before ‘>’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:478: error: expected primary-expression before ‘)’ token
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:483: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:490: error: expected ‘;’ before ‘bool’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:508: error: ‘constexpr’ does not name a type
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:512: error: expected constructor, destructor, or type conversion before ‘T’
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:563: error: expected ‘;’ before ‘noexcept’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:569: error: expected ‘;’ before ‘const’
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp: In static member function ‘static std::string nlohmann::detail::exception::name(const std::string&, int)’:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:576: error: call of overloaded ‘to_string(int&)’ is ambiguous
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2604: note: candidates are: std::string std::to_string(long long int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2610: note: std::string std::to_string(long long unsigned int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2616: note: std::string std::to_string(long double)
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp: In static member function ‘static nlohmann::detail::parse_error nlohmann::detail::parse_error::create(int, size_t, const std::string&)’:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:641: error: call of overloaded ‘to_string(size_t&)’ is ambiguous
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2604: note: candidates are: std::string std::to_string(long long int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2610: note: std::string std::to_string(long long unsigned int)
/usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../../include/c++/4.4.7/bits/basic_string.h:2616: note: std::string std::to_string(long double)
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp: At global scope:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:911: error: expected initializer before ‘noexcept’
In file included from /u/c/sissonde/computer-graphics-ray-casting/include/read_json.h:24,
from /u/c/sissonde/computer-graphics-ray-casting/main.cpp:6:
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:18570: error: expected ‘}’ before end of line
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:18570: error: expected ‘}’ before end of line
/u/c/sissonde/computer-graphics-ray-casting/shared/cmake/../json/json.hpp:18570: error: expected declaration before end of line
make[2]: *** [CMakeFiles/raycasting.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/raycasting.dir/all] Error 2
make: *** [all] Error 2

As expected, the error is coming from main.cpp's include statement to read_json.cpp's line which includes "json.hpp" in the json folder. No changes have been made to the program.

I'm not sure how to proceed, does anyone have ideas?

triangle has never been called.

I write a std::cout << "triangle intersect called" at the beginning of the function in order to test.
But After I run ./raycasting ..data/triangle.json nothing shows up in command window.
The plane and sphere work well.

make error

fatal erroe: Eigen/Core: No such file or directory 
#include <Eigen/Core>

Infinite Intersection

For a plane/triangle, can we assume that there will be no ray that lies on it, meaning that there are infinitely many intersection points?

what is min_t?

In every intersection function, I know how to compute $t$ but I don't understand what is min_t and how to use it. Can someone explain it. Thanks! (๑¯∀¯๑)
I know in .h file it's description is "minimum t value to consider (for viewing rays, this is typically at least the parametric distance of the image plane to the camera)".

Deprecated warnings in readstl.h for VS users

When I tried to compile this project by using Visual Studio 2015, I encountered some deprecated warnings that broke compiling. It seems because some CRT related calls, e.g. fopen, sscanf and so on, have been deprecated and VS cannot continue to compile.

One workaround that works for me without making any change of readstl.h is to add configuration item "_CRT_SECURE_NO_DEPRECATE" to "Project Properties -> Configuration Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions".

Just for VS users reference.

Correct output for sphere-and-plane and two-spheres-and-plane but no spheres on sphere-packing

On sphere-packing, my ppm output is just the background colour. So all red for id, all dark gray for depth and the light lilac colour for normal.
ex.
image

But my sphere-and-plane and my two-spheres-and-plane look exactly like the photos provided. I'm not sure if my inside-sphere is correct as there were no inside-sphere photos to reference but this is what I'm getting for the inside
image

If I remove the plane from the json file, then I just get an all black ppm image.

Bunny and triangle are working fine as well, so I'm assuming that it might be a problem with the Sphere file, but if so, why are the other sphere images working fine?

Update: I tried adding a sphere to the two-spheres-and-plane json file to see if it was a problem with overlapping spheres but it rendered fine as well? I'm really not sure why sphere-packing is not showing anything except for the background
image

`objects` vector empty after `read_json`

I'm currently debugging my code to see why all my .ppm files are displaying empty black images. I inserted a line in main.cpp right after the read_json script is executed to populate the 'objects' vector:

// Read a camera and scene description from given .json file
read_json(argc<=1?"../shared/data/sphere-and-plane.json":argv[1],camera,objects);
std::cout << objects.size()

I found that the output for this is always 0, which explains the blank images. Is anyone else encountering this issue???

Pixel Coordinates

My implementation for write_ppm assumes pixel (0,0) is the one in the top left corner since that's how we have to write the file. For assignment 2, the equation for calculating the view ray’s direction (specifically the one for calculating v) assumes pixel (0,0) is the one in the bottom left corner. So when writing my implementation for this assignment, should I change the equation for v to have (0,0) as the top left corner or should I change write_ppm to assume (0,0) is the bottom left corner?

How to run the release build

I did the following

mkdir build-release
cd build-release
cmake ../ -DCMAKE_BUILD_TYPE=Release
make

but make gives the following outcome:
make: *** No targets specified and no makefile found. Stop.
I am on windows and install the make using

choco install make

right now is an issue is that the bunny takes forever to run... I know by using build release, I can do this much faster... but the make on windows doesn't seem to be working...? For assignment 1, I just open the sln file in visual studio and build the solution, this will generate a folder called Debug in build_release folder. And I will cd to that Debug folder and execute the exe from there. I tried the same thing for assignment 2... but the running time of bunny is just way too long. ... any suggestion or advice on running this on windows?

Which .json files will be graded for assignment 2?

In the shared directory there are 6 .json files .. however in the README section of the github page, there are only 3 image results being shown (I guess we are expected to produce the same output as the images shown).

Are we going to be graded based on just the three images in the readme or all the .json files within the shared directory ?

I cannot find any information about how we are graded on the Readme section of the page.

Long Run Time for Bunny

After comparing with a few classmates, it seems we're all taking at least 5-10 minutes to generate the bunny image (even on decently high end desktops). In README.html it says this should only take a few seconds, so we're wondering if this is correct. We're also concerned because the ray tracing lab is taking over an hour to run.

Is this just a typo, or are we missing something?

Error on read_json.h

I get this error from read_json,h when I run make in linux. I have not changed/edited/added any code! Is there a way to fix this?

computer-graphics-ray-casting/include/read_json.h:94:22: error: converting to ‘std::tuple<Eigen::Matrix<double, 3,
1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1> >’ from initializer list would use explicit constructor ‘constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>};
= void; _Elements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}]’
tri->corners = {
^
computer-graphics-ray-casting/include/read_json.h:121:24: error: converting to ‘std::tuple<Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1> >’ from initializer list would use explicit constructor ‘constexpr std::tuple< >::tuple(_UElements&& ...) [with _UElements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}; = void; _Elements = {Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>}]’
tri->corners = {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.