My final project for the course TDT4230 Graphics and Visualization at the Norwegian University of Science and Technology (NTNU). The project is based on gloom, but stripped down a bit to provide minimal size.
- CMake (3.0+)
- OpenGL (4.5+)
Simply clone this repository:
git clone https://github.com/TheVaffel/reflective-sphere
The following will (hopefully) suffice to compile the project:
# Enter the repository
cd reflective-sphere
# Make a build folder
mkdir build
# Enter build folder
cd build
# Generate UNIX Makefile (point CMake to CMakeLists.txt)
cmake ..
# Execute make command
make
# Run executable
./gloom/gloom
Specific generators can also be specified with CMake if you want to create workspaces for an IDE, for example:
cmake -G "CodeBlocks - Unix Makefiles"
(This is part of the gloom README, and I have not tested this last step)
- Set the source code file to the root directory containing
CMakeLists.txt
- Binaries can be built in the directory of your choice, e.g.
reflective-sphere\build\
- Click the configure button and select which generator you would like to use
- Click the generate button
- If your generator is an IDE such as Visual Studio, then open up the newly created .sln file and build
ALL_BUILD
.
After running ./gloom/gloom, you should get a screen with a reflecting sphere levitating over a big cube, with other spheres orbiting it. You can move around with WASD and turn around with the arrow keys.
If you look at a point on the reflecting cube, you may press SPACE to create a small dent in the surface, changing how the light and surroundings are reflected in the area around it. There is a cooldown on the dent-making at one second.
A brief description of the project is contained in the report provided, apart from that, the comments scattered throughout the code is the only documentation available to this date.