Lighting Puzzle
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Hehe, really, these are all valid answers. You shouldn't go about this riddle and think there's only one true answer. The fun about these kinds of problems is thinking creatively, because you need to come up with something which is not mentioned in the problem itself; for that matter, the riddle has no "mathematical" solution. So, bringing along a webcam is just as good as the classical answer, if not even better. Webcams will still work when the good old light bulb is long gone and replaced by LEDs, the classical answer, however, might get into trouble 
- ajs15822
- OGRE Expert User

- Posts: 570
- Joined: Mon Jan 02, 2006 2:05 am
- Location: Texas
- x 2
- Contact:
Pfft, so easy, two words: x-ray vision.
Joking aside, here's a hint for those who've never seen this problem before:
Joking aside, here's a hint for those who've never seen this problem before:
Highlight the following text to reveal what I wrote:If you leave one of the lights on, it factors out one of the switches, so you're really only left with figuring out which of two switches goes with which of two bulbs.
- Kentamanos
- Minaton
- Posts: 980
- Joined: Sat Aug 07, 2004 12:08 am
- Location: Dallas, TX
- KungFooMasta
- OGRE Contributor

- Posts: 2087
- Joined: Thu Mar 03, 2005 7:11 am
- Location: WA, USA
- x 16
- Contact:
I feel really dumb, but I don't get it. All I can think of is 90 degrees and rotating the [a1,a2] by 90 degrees.
Creator of QuickGUI!
- Minthos
- Kobold
- Posts: 37
- Joined: Fri Apr 28, 2006 11:59 pm
- Location: Norway
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
Yep, the matrix is a rotation matrix in 2D space, in this case it rotates a vector by 90° (go figure that). And the picture just has a funny way of showing that off 
Try a simple case like the vector (1,0). With cos(90°) = 0 and sin(90°) = 1, you end up with the vector (0,-1) which is the original vector rotated by 90° to the right.
Try a simple case like the vector (1,0). With cos(90°) = 0 and sin(90°) = 1, you end up with the vector (0,-1) which is the original vector rotated by 90° to the right.
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Code: Select all
[ cos 90 sin 90
-sin 90 cos 90 ]
=
[ 0 1
-1 0 ]
=
X : [ 0, 1]
Y : [-1, 0]
EDIT: Wait, isn't the picture wrong
- Kojack
- OGRE Moderator

- Posts: 7157
- Joined: Sun Jan 25, 2004 7:35 am
- Location: Brisbane, Australia
- x 538
No, it's a right rotation.
That matrix rotates to the left for row vectors and to the right for column vectors. The pic has a column vector.
The dot product operator can tell you how much of one vector is contained inside another vector, so it you do the dot product of a normalised axis vector with any point in space, it tells you how far along that axis the point is. A matrix multiply is basically a series of dot products. Each axis in the matrix is dot producted with the vector, to find out how far along each axis the vector is. The distance along the new x axis is used as the x coordinate of the new vector, and so on.
That matrix rotates to the left for row vectors and to the right for column vectors. The pic has a column vector.
Matrices never made sense to me until I realised that they contained axes of the transformed coordinate system.I honestly have no idea how matrix multiplication always makes stuff Just Work if all we're really doing is creating some axises, but, hey
The dot product operator can tell you how much of one vector is contained inside another vector, so it you do the dot product of a normalised axis vector with any point in space, it tells you how far along that axis the point is. A matrix multiply is basically a series of dot products. Each axis in the matrix is dot producted with the vector, to find out how far along each axis the vector is. The distance along the new x axis is used as the x coordinate of the new vector, and so on.
-
CABAListic
- OGRE Retired Team Member

- Posts: 2903
- Joined: Thu Jan 18, 2007 2:48 pm
- x 58
- Contact:
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
Oh, rightKojack wrote:No, it's a right rotation.
That matrix rotates to the left for row vectors and to the right for column vectors. The pic has a column vector.
That's how I think of them, too. And only lately have I realized that the dot product is very similar to a matrix multiplication. I think the first time I saw it was when someone transformed stuff to tangent space using dot products instead of a matrix.Matrices never made sense to me until I realised that they contained axes of the transformed coordinate system.I honestly have no idea how matrix multiplication always makes stuff Just Work if all we're really doing is creating some axises, but, hey
The dot product operator can tell you how much of one vector is contained inside another vector, so it you do the dot product of a normalised axis vector with any point in space, it tells you how far along that axis the point is. A matrix multiply is basically a series of dot products. Each axis in the matrix is dot producted with the vector, to find out how far along each axis the vector is. The distance along the new x axis is used as the x coordinate of the new vector, and so on.
