Rotate But Stay Still

After applying a rotation matrix, what should be the new center of the camera such that the origin seems like it's in the same part of the view?

Advertisements

Memory Leak

In the program, when a button that does a certain operation is clicked, a large chunk of memory is allocated without being released. New memory is allocated for every time this operation is performed until the program eventually crashes from lack of memory. I was taught to always try to reproduce the problem first whenever... Continue Reading →

Filter and Sort

A new assignment at work has me working with a language and design pattern I've never used before, and brings me back to old loves-- strings and data structures.

Rectangular Pieces

I encountered a problem at work that cost me an entire day's worth of productivity to solve. I thought of different ways to go about it and finished coding many ideas only to realize fatal flaws during testing that rendered my "solution" useless. I found a solution at around 2:30 in the morning, while I... Continue Reading →

Efficiency

I wanted to delete the boolean variable x because it didn't seem to have any effect on the program. Everywhere the getX() function was used, it was always of the form: if (getX()) return; But when I searched all instances of setX(), it was always set to false.┬áThe variable x is also a member of... Continue Reading →

Create a free website or blog at WordPress.com.

Up ↑