# CST 325 – Week 1 – Vectors

It’s the first week of Graphics Programming, and I am really glad to be back to programming after a lack of it in Computer Networks. It has been about a decade since I took a math class, and I have never taken Linear Algebra, so I had to really sit down and talk through the math required for this week.

We are also required to do all the programming assignments with a partner in this class, which is helpful since it forces you to see another’s ideas and talk through points of confusion.

This week we covered vectors, operations on vectors, and how to convert from a vector to a scalar. We also learned how to find the closest point of intersection of a (unit) ray and a sphere, given the distance vector of the ray, the ray’s origin, the sphere’s radius, and the sphere’s center vector. This can be done by using the quadratic formula (after some rearranging of terms to get the equation into a standard form, we can identify each component–a, b, and c).

However, there are cases that we need to catch: when the ray’s point of intersection is opposite the ray’s direction (the result of the quadratic is negative), when the c component of the quadratic is negative (this means that the magnitude of the vector from the ray origin to the sphere center is LESS THAN the radius. In other words, the ray is INSIDE the sphere), and when the discriminant is negative (there are no points of intersection). These three cases should be caught to yield no result.

In our first programming assignment, we implemented a Vector3 class and a Sphere class in order to calculate the nearest points of intersection between a given ray and a sphere (and to catch instances that were invalid).

# Week 8 CST 311

It is now our final week in CST 311 and, in addition to studying for our final, we have a final Wireshark lab and homework assignments about Network Security. Our final will be timed and online at a specific time. No pressure!

# CST 311 Week 7

We’re in our penultimate week of Networking and we are focusing on two chapters this week–one on the Link Layer of the OSI model and one on Security and encryption.

I’m most interested in learning more about Network security and cryptography.

# CST 311 Week 6

This week we learned more about the network layer, focusing on the control plane in contrast to the data plane.

We also studied two types of shortest path (least cost) algorithms — Dijkstra’s algorithm and the distance-vector algorithm.

What confused me at first about Dijkstra’s algorithm is that I thought that nodes had to be traveled in the order in which they were added to N’. This is not the case. As soon as nodes are added to N’, you can traverse them if they are an immediate neighbor of whichever node you are currently on.

Secondly, I was confused about the distance-vector algorithm on this week’s assignment. While I understood how the distance-vector algorithm works, I was hung up on the wording of the problem, which instructed to “show the distance table entries at node z”. I eventually surmised that “entries at node z” meant to only determine the entries from node z and its immediate neighbors.

# Week 5 CST 311

This week has focused on the Network layer. For one assignment, we had to determine the subnets and IP address allocations on a fictional network. Without any solid examples of how to work a problem like this out, I had to do a lot of extensive independent research to figure out how to ultimately solve this problem.

As usual, diagramming things out really helped me. You can find my diagram below:

Basically, given a network broken up into separate subnets, if you know how many interfaces each subnet should support, you can use CIDR to determine how many bits of a 32 bit IP address should be allocated to network addresses. In the example above, we are given that subnet A should support 250 interfaces. First, we determine how many bits are needed to represent 250 unique values. If we allocate 8 bits, that is 2^8 or 256 unique values (0 – 255). Subtracting those 8 bits from the total 32 bits allocated to an IP address, we get 24. This is the number of bits used for the subnet mask, written as /24.

Since we were given a starting address of 216.32.254.0, we know that the address of subnet A is 216.32.254.0/24 and that it supports IP addresses on the range 216.32.254.1 – 216.32.254.255.

Last, I was able to check my understanding with this CIDR subnet calculator!