CodeCat

Game development and others.

Breads vs. Cakes

| Comments

What is the fundamental difference between breads and cakes? Some of the guesses include:

  • Cakes are sweet and breads, not sweet
  • Cakes have a “smoother” texture while bread has a rougher texture.
  • Breads are “stretchy” while cakes are not as stretchy.

Line Intersection With Homogenous Coordinates

| Comments

There are a couple of ways to compute the intersection of two lines in two dimensions. Usually, computing them when they exist is easy, the hard part is handling the special cases where they don’t intersect or when they’re coincident. You’ll end up with all sorts of branches in your code which checks for parallelism which may slow it down (especially if you’re implementing it in a GPU).

Line Representations 1

| Comments

When doing calculations on the computer, the first thing to know is how to represent data. Depending on the kind of calculations one does, some representations may be easier to work with than another. Geometric lines, in particular, has many representations (even for such a simple concept!). I’ll list down the representations that I know and describe them in detail. Note that I’m assuming that we’re working in Euclidean geometry.