23rd Oct 2019

I spent today working on the C++ program to represent the 3 methods described yesterday. The vast majority of the time was spent editing the object "Vertex" provided to accommodate a W coordinate and creating the object "Four-sided shape" Which provided a way to store each vertex point without storing a vector of vectors Vertexes (making the code much more readable). After this up until the rotate function, the rest of the code came with relative ease as the object built was made to handle all of the vector delivery and storage. The rotator method was slightly more difficult as it required the use of "Math.h" due to rotation using Sine and Cosine. While writing the code for the iterations of rotation I used the same iteration variable "iterations" and another loop variable called "iterationCount". Due to the similar names, when writing the loop I found that it only draws 1 rotated rectangle. This was because the "iterations" int never changes, and I accidentally used that where I should have been using iteration count, which gets iterated at the end of every loop.

Comments