Author Topic: Teach me linear algebra!  (Read 9463 times)

0 Members and 1 Guest are viewing this topic.

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Teach me linear algebra!
« on: April 22, 2008, 01:52:26 am »
So I spoke with a professor at my university today and he agreed to be my supervisor for my master's thesis.  My thesis topic apparently interested him:

Quote
Like many programmers, I got into the field because I was fascinated with games.  They’ve been something I’ve wanted to work on for as long as I can remember.  As games have become projected into 3D worlds, I’ve become more disappointed in them; they seem to lack depth or the feeling of true “immersion” that should be possible.  Of course, there are hardware limitations; it would be physically impossible with a home PC to simulate a midday lunch rush of New York City, for instance.  But frequently, I believe that these limitations are supporting excuses for a bigger issue: budget concerns.

What I’m interested in is procedural generation of terrain, architecture, texture, and material data based on statistical input and predefined parameters, and then using that pre-generated information as a basis for the merge of modifications by creative and development teams.  For example, if I wanted to generate a city similar to Gilbert, I might give the system inputs of “99% flat terrain; 90% rectangular roadways; population 180,000; 70% single-story residence, 15% two-story residence, 10% single-story commercial, 3% multi-story commercial, 2% industrial; 98% probability for residential structures to be near other residential structures; desert location; religious population; young population; many recreational areas; many outdoor recreational areas”.

I might take it a step further and define within the system that most houses in Gilbert use stucco siding and tiled roofs, providing models or texture/bump maps when appropriate.  I believe that CityEngine (http://www.vision.ee.ethz.ch/~pmueller/wiki/CityEngine/Front) takes in a few models and generates from that.

However, I want to take it further than CityEngine does it.  I want the ability to contextually control the interior layout of buildings.  For example, if a building is deemed “residential,” then it should be pre-populated with other varied models such as desks and beds, walls should be cut out for things like televisions or entertainment systems, and a kitchen should be easily located.

To use the system in a practical way, the procedural generation should use pseudorandom generation formulas, so that, given identical inputs, it produces identical output.  This would be of great benefit to software developers; consider that physical media no longer needs to contain all of the textures and meshes of all of the items in the “game world,” but rather simply a diff between the procedurally-generated terrain and the final result.  The software installer then runs the procedural generation algorithm and stores the result on the target computer, merging the diff with the procedural algorithm.

I spent about 45 minutes this afternoon with Peter Wonka, who, I was pleasantly surprised to find out, has ties to a couple gaming companies as well as to Pascal Mueller, the person who created CityEngine, which I mentioned in my description.

Part of what we'll need to do, though, is linear algebra.

I survived through Calc 3, but dropped CS before I hit linalg.

So, teach!
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Teach me linear algebra!
« Reply #1 on: April 22, 2008, 07:44:22 am »
O god it's boring!  But whatever.  I suggest learning how to use Matlab.  It's really nice, and it's what we used in my Linear Systems class.

Offline dark_drake

  • Mufasa was 10x the lion Simba was.
  • x86
  • Hero Member
  • *****
  • Posts: 2440
  • Dun dun dun
    • View Profile
Re: Teach me linear algebra!
« Reply #2 on: April 22, 2008, 10:42:23 am »
O god it's boring!  But whatever.  I suggest learning how to use Matlab.  It's really nice, and it's what we used in my Linear Systems class.
Meh, Matlab is nice for small things, but once you get to huge matrices and whatnot, it really bogs down. That's not to say it's not useful for testing a method, it's just not useful on a large scale.

MyndFyre: There isn't too terribly much to linear algebra that you won't/haven't pick up in your other courses. They just didn't call it linear algebra. When I took it last semester, I already knew most of the material taught, and the rest was definitions.
« Last Edit: April 22, 2008, 10:51:54 am by dark_drake »
errr... something like that...

Offline Sidoh

  • Moderator
  • Hero Member
  • *****
  • Posts: 17634
  • MHNATY ~~~~~
    • View Profile
    • sidoh
Re: Teach me linear algebra!
« Reply #3 on: April 22, 2008, 11:05:49 am »
O god it's boring!  But whatever.  I suggest learning how to use Matlab.  It's really nice, and it's what we used in my Linear Systems class.

At least here, linear systems is a different class than linear algebra.  It's a prerequisite, in fact.  My linear algebra class is 80%-90% proofs.  Linear systems had a couple of proofs, but it had a much different purpose.

Meh, Matlab is nice for small things, but once you get to huge matrices and whatnot, it really bogs down. That's not to say it's not useful for testing a method, it's just not useful on a large scale.

MyndFyre: There isn't too terribly much to linear algebra that you won't/haven't pick up in your other courses. They just didn't call it linear algebra. When I took it last semester, I already knew most of the material taught, and the rest was definitions.

This is sort of going off topic, but probably worth mentioning.  My friend works in the "pattern analysis lab", which, among quite a few other things, deals with facial recognition.  They use a ton of linear algebra and they've been using matlab for a bunch of things.  I'm sure it has weaknesses where its alternatives trump it, but I think it's worth knowing a bit about if you're going to be doing higher level maths.

Yeah, if you've taken differential equations, most of the computational stuff taught in linear algebra will seem familiar to you.  At least in my experience, though, linear algebra is a whole lot more abstract (again, really heavy on proofs).

Myndy, the book we're using is Linear Algebra with Applications by Steven Leon.  It's a bit expensive, but it's well written and has a bunch of pretty neat examples.  One of the other sections is using an online textbook.  If you're interested, I can ask a friend what it's titled.  I think the best way to learn it if you're not going to be taking any classes that are going to expose you to it without expecting you to know it already is pick up the book, read through it and do example problems.

Offline Nate

  • Full Member
  • ***
  • Posts: 425
  • You all suck
    • View Profile
Re: Teach me linear algebra!
« Reply #4 on: April 22, 2008, 11:21:52 am »
most of linear algebra is covered in Diff EQ except for like SVD, LU, moore-penrose, etc, etc all things that matlab can do for you, or you can pick up on your own.

Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: Teach me linear algebra!
« Reply #5 on: April 22, 2008, 08:59:23 pm »
Well, according to this (thanks, Hell-Lord), MATLAB is the 26th most popular langauge, above even Awk, Bash, Tc/Tkl, Objective-C, and Haskell (and LabView, but I hate LabView).

Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: Teach me linear algebra!
« Reply #6 on: April 24, 2008, 04:54:18 pm »
Oooh, DiffEq, forgot about that....

Change the subject to: Teach me differential equations!
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Ender

  • Moderator
  • Hero Member
  • *****
  • Posts: 2390
    • View Profile
Re: Teach me linear algebra!
« Reply #7 on: April 25, 2008, 04:17:36 am »
Do you want to learn lin alg and diff eq theoretically or computationally? This choice would help determine what book would be best for you, should you want a book, or more generally which program of learning would be best.

I imagine you want to learn them computationally though.

Offline Rule

  • x86
  • Hero Member
  • *****
  • Posts: 1588
    • View Profile
Re: Teach me linear algebra!
« Reply #8 on: May 21, 2008, 08:21:03 pm »
O god it's boring!  But whatever.  I suggest learning how to use Matlab.  It's really nice, and it's what we used in my Linear Systems class.
Meh, Matlab is nice for small things, but once you get to huge matrices and whatnot, it really bogs down. That's not to say it's not useful for testing a method, it's just not useful on a large scale.

MyndFyre: There isn't too terribly much to linear algebra that you won't/haven't pick up in your other courses. They just didn't call it linear algebra. When I took it last semester, I already knew most of the material taught, and the rest was definitions.

No, Matlab is great for linear algebra.  Most people who do serious numerical algebra research use it heavily.  It uses LAPACK, which is a Fortran subroutine library.  You're not going to get faster than Matlab for linear algebra.   But be careful to make the best use of all of the available routines -- often there will be a shortcut to accomplishing your goal.  For example, you may not need to calculate the inverse of a matrix to solve a particular equation, etc.
« Last Edit: May 21, 2008, 09:29:42 pm by Rule »

Offline nslay

  • Hero Member
  • *****
  • Posts: 786
  • Giraffe meat, mmm
    • View Profile
Re: Teach me linear algebra!
« Reply #9 on: May 26, 2008, 01:18:40 am »
O god it's boring!  But whatever.  I suggest learning how to use Matlab.  It's really nice, and it's what we used in my Linear Systems class.
Meh, Matlab is nice for small things, but once you get to huge matrices and whatnot, it really bogs down. That's not to say it's not useful for testing a method, it's just not useful on a large scale.

MyndFyre: There isn't too terribly much to linear algebra that you won't/haven't pick up in your other courses. They just didn't call it linear algebra. When I took it last semester, I already knew most of the material taught, and the rest was definitions.

No, Matlab is great for linear algebra.  Most people who do serious numerical algebra research use it heavily.  It uses LAPACK, which is a Fortran subroutine library.  You're not going to get faster than Matlab for linear algebra.   But be careful to make the best use of all of the available routines -- often there will be a shortcut to accomplishing your goal.  For example, you may not need to calculate the inverse of a matrix to solve a particular equation, etc.

And! You can link to BLAS and LAPACK as though they were C...granted you make headers for the subroutines.  Just remember, everything is a pointer in Fortran.  netlib.org also has the C interfaces for BLAS and LAPACK...somewhere.
If you install Linux, go ahead and grab Intel's icc and ifort which contain parallelized and vectorized BLAS and LAPACK...icc is not free on Windows or OS X.
You might want to take graduate numerical analysis courses too...it will give you an idea about how it all works.
An adorable giant isopod!