Lighting Puzzle

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

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 ;)
User avatar
ajs15822
OGRE Expert User
OGRE Expert User
Posts: 570
Joined: Mon Jan 02, 2006 2:05 am
Location: Texas
x 2
Contact:

Post by ajs15822 »

Pfft, so easy, two words: x-ray vision.

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.
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

Another hint:
Light bulbs radiate more than light...
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Post by KungFooMasta »

Kojack wrote:Yep. I became a fan after reading:

Image

:)
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!
User avatar
Minthos
Kobold
Posts: 37
Joined: Fri Apr 28, 2006 11:59 pm
Location: Norway

Post by Minthos »

KungFooMasta wrote:
Kojack wrote:Yep. I became a fan after reading:

Image

:)
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.
I'm sure someone more into matrix algebra can explain it better than me, but what you see is a vector multiplied by a matrix, and I assume the matrix represents a rotation by 90 degrees, so the vector should probably be rotated around its origin.
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

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.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

Code: Select all

[ cos 90  sin 90
 -sin 90  cos 90 ]

=

[ 0 1
 -1 0 ]

=

X : [ 0, 1]
Y : [-1, 0]
Which is a basic 2D rotation matrix. Which, if you think of as the 2D axises, you get that the object's X axis is the world's positive Y axis, and the object's Y axis is the world's negative X axis. Which is a 90 degree rotation. 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 :D

EDIT: Wait, isn't the picture wrong :lol:? [ 0 1 -1 0 ] is a rotation to the left, not to the right ;)
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 538

Post by Kojack »

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.

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
Matrices never made sense to me until I realised that they contained axes of the transformed coordinate system.
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.
warmi
Gnoll
Posts: 674
Joined: Sun May 27, 2007 3:56 am
Location: USA

Post by warmi »

What a bunch of geeks you are !!!
CABAListic
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 2903
Joined: Thu Jan 18, 2007 2:48 pm
x 58
Contact:

Post by CABAListic »

Well, isn't that kind of a prerequisite to be hanging out in forums like this? ;)
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Post by nullsquared »

Kojack 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.
Oh, right :oops: :lol: I always get really confused between row major systems and column major systems. Especially since in raw memory both systems look exactly the same, they're just different in their interpretation - which makes things even more difficult to understand.
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
Matrices never made sense to me until I realised that they contained axes of the transformed coordinate system.
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'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.
Post Reply