This week's book giveaway is in the Performance forum.We're giving away four copies of The Java Performance Companion and have Charlie Hunt, Monica Beckwith, Poonam Parhar, & Bengt Rutisson on-line!See this thread for details.
Win a copy of The Java Performance Companion this week in the Performance forum!

# A flatland puzzle

Bert Bates
author
Sheriff
Posts: 8898
5
Flatland is 2 dimensional space. You are a photgrapher in flatland (so you need a darkroom in your house), and you need to create a closed space with the following characteristics:
1 - no sharp corners (so for instance circles and ovals are ok, but squares and octagons are not.)
2 - no lines can touch or cross over each other.
3 - A 2 dimensional, geometric 'point' of light will be placed, whereever you want it, inside the shape.
4 - The inner 'surface' of the shape will reflect the light perfectly (i.e straight reflections, and infinite)
5 - Create a shape such that when the light is turned on, some part of the shape will NEVER be illuminated. (your dark room)
Here's a sample shape just for example (p.s. this one doesn't work)

[ September 27, 2003: Message edited by: Bert Bates ]

HS Thomas
Ranch Hand
Posts: 3404
The light bounces back and forth within the first alley. It is dark by the time you get to the passage to the other alley.

[ September 27, 2003: Message edited by: HS Thomas ]

Bert Bates
author
Sheriff
Posts: 8898
5
HS -
No, a few of those beams will be at the right angle to slowly work their way up the first alley, even if they have to bounce back and forth many times...
When you solve this, your solution should be very definite and clear.

HS Thomas
Ranch Hand
Posts: 3404
My solution does look rather colonic so I imagine light should have no problem travelling through.

regards
[ September 28, 2003: Message edited by: HS Thomas ]

Bert Bates
author
Sheriff
Posts: 8898
5
Man oh man,
I thought sure I'd hook Jim with this one...

Joe King
Ranch Hand
Posts: 820

Hmmm doesn't seem to be coming out very well. The idea is one circle inside another. The light is in the outer area and the inner area is dark. Not sure how the photo guy will get into the darkroom though.... must be a problem in flatland....
[ October 03, 2003: Message edited by: Joe King ]
[ October 03, 2003: Message edited by: Joe King ]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Sorry, I was distracted when this first came out. I'll think about it some more now.

Bert Bates
author
Sheriff
Posts: 8898
5
Hint:
A picture is OK, but you could describe the solution without a picture in nice, clean, mathematical terms...

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Yeah, I've been thinking along those lines; no luck yet. But gimme some more time. Meanwhile, I feel I should point out that light as we know it couldn't even propagate without three spatial dimensions. In EM waves, the E and M components are perpendicular to each other, as well as to the direction or propagation. Though modern superstring theories propose that we actually have, what, 10 or more dimensions in our universe, but most are collapsed so they're very very tiny. I suppose we could invoke something like that here.
[ October 03, 2003: Message edited by: Jim Yingst ]

Bert Bates
author
Sheriff
Posts: 8898
5
Wait'll you see the 1-dimensional puzzles! No way light'll get through those babies!

David O'Meara
Rancher
Posts: 13459
A variation is to re-arrange Joe King's so that the darkroom is inside the outer 'donut' and the light source in the inner 'donut hole'.
I have two problems with this. Firstly, topographically the light is not 'inside' the room. Secondly, do we have the restriction that the wall must be a single unbroken path?
The solution I'm thimnking of has a semi-infinite hall with two 'bulbs' at either end. Light is allowed in the hallway and bulbs. A single path comes off the hall midway (creating a 'T') to an area that is in darkness. I think.

My aim here is that light should only be able to enter the hall if it is nearly horizontal, ensuring it can't enter the side section.
It doesn't work, since the ligh will still get the the side section if it enters the hall with a sharp enough angle. I think the walls can be rearranged at either end to ensure the angle is less than a specific value (say, 45 degrees), but I'm not prepared to prove that with ascii art...

David O'Meara
Rancher
Posts: 13459
Originally posted by Jim Yingst:
Meanwhile, I feel I should point out that light as we know it couldn't even propagate without three spatial dimensions. In EM waves, the E and M components are perpendicular to each other, as well as to the direction or propagation. Though modern superstring theories propose that we actually have, what, 10 or more dimensions in our universe, but most are collapsed so they're very very tiny.

Your reading preferences are showing
'Light' could still propogate in N-dimensional space with only 2 uncollapsed dimensions. If the need to use a third dimension was smaller than the dimension itself, the energy component could leak into that dimension and still render it useful. That said, the string that represents the energy component would have to be smaller than the string that is tying up the third dimension, so you're probably right. It certainly wouldn't be from the visible light spectrum in any case
That's right, geek it up

David O'Meara
Rancher
Posts: 13459
On reflection, I think Joe meant D=='Dark' and not 'Darkroom' on his picture, but it doesn't alter the fact that the darkness is not topographically 'inside' the area containing the light.
Jim's hijack gave me an idea for an alternate solution that fits the problem - although loosely. If the width of the hallway section is reduced enough, you can theoretically create the situation where as far as the light is concerned, the opening is one dimensional. ThHis is similar to polarising the entry.
There are no sharp angles since there is an opening, but the light can't get down there. Anything at the other end is in darkness. The hallway is not very useful for accessing this dark area though.

Bert Bates
author
Sheriff
Posts: 8898
5
And here I tried to do such a good job of bounding the problem up front
Ok, I guess a few more restrictions:
- The shape can only be a single loop (no donuts).
- Let's say, for the sake of argument, that no opening or passageway can be less than an inch wide.
Proceed... :roll:

HS Thomas
Ranch Hand
Posts: 3404
Your room will be a perfect globe with one cones stuck within it ,with an inch passageway in between.

If you consider the behaviour of light travelling in straight lines this works perfectly.

No mathematical proof ( and I wouldn't hold your breath waiting for one from me )!
Howzzat!
Or is flatland significant as being 1-dimesional where as my solution is 3-dimensional ?

If I were to draw the light rays only that may give an idea.

There's light in the cone and a needle of light into the other room but the rest of the other room is in darkness
Turning it into flatland - I don't know what that means!
regards
[ October 05, 2003: Message edited by: HS Thomas ]

Jim Yingst
Wanderer
Sheriff
Posts: 18671
[composed just before I saw Bert's comment]
Yeah, I considered what would happen if you brought two walls close enough together - depending on width, and the frequency of light you're interested in, you could either make a waveguide (like fiber optics) or a channel which was actually impassable to light. However
• At that scale, we'd be violating Bert's statement #4, "The inner 'surface' of the shape will reflect the light perfectly (i.e straight reflections, and infinite)". Even if there's no light in the narrowest part of the hallway, the rules on no sharp angles mean that there has to be a wider section as the light approaches the hallway; in this region, where the width is comparable to the wavelength of the light, "straight reflections" breaks down quite a bit.
• If the entire closed space is a house for a photographer, and the photographer needs a darkroom area, he probably needs to be able to travel down the hallway connecting the rest of the house to the darkroom. Which will be kind of hard to do if the hallway width is measured in a few thousand Ångstroms or less.
• My thoughts keep returning to parabolas, circles, ellipses, and straight lines, just because if you make a mirror out of them they have nice well-defined characteristics - if you put a light at the focus of an ellipse or parabola, you know exactly where the light will go. Unfortunately I can't think of any way to connect different shapes up have the desired properties. Still mulling, off and on...

Jim Yingst
Wanderer
Sheriff
Posts: 18671
[HST]: Your room will be a perfect globe with two cones stuck together with an inch passageway in between.

No mathematical proof ( and I wouldn't hold your breath)!
OK, that's fine. But could we get an ascii diagram or something? How are the "globe" and "cones" related? Where's the light source?
Or is flatland significant as being 1-dimesional where as my solution is 3-dimensional ?
Um, I think most of us are taking flatland to be 2-dimensional. Not sure about your solution yet, though "globe" and "cones" sound suspiciusly 3-D.

HS Thomas
Ranch Hand
Posts: 3404
II:Um. I think most of us take flat land to be 2-dimensional.
Ok! The room is a half-globe placed on flatland with one end a cone as in a paper-cup cone to make use of the property of light rays travel in straight lines.

Light can't bend round corners, so Bert was being really helpful when he demanded no corners.
BTW, if possible can we have a space-filled space to work our diagrams on if you think that helps
I think this is the shape of most observatories and now I know why.

regards
[ October 05, 2003: Message edited by: HS Thomas ]

HS Thomas
Ranch Hand
Posts: 3404

I think this will work.
Howzatt?
[BTW, if possible can we have a space-filled space to work our diagrams on if you think that helps]
Don't worry about it! I think I am uptoaddingthespacesmyself.

regards
[ October 05, 2003: Message edited by: HS Thomas ]

HS Thomas
Ranch Hand
Posts: 3404
The floor of the cone (teepee) would have to be made of glass with properties that trap the light so that there would be no refactored light rays ,methinks. Glass that absorbs and traps light within it.
Glass made of :
Photo something crystals may give some clue to Physics psychics amongst ya!
And it wasn't refactorings but light refractions.
Or the floor could be made of good solid black earth. If I hold a mirror an inch above that I don't think you'd see light reflected on the ground.
My 0.00002p worth.
The passageway would lead into an igloo-like tunnel (I have abandoned the tee-pee like doorway) preferably a half-cone and the photograper crawls out into his dark-room.
A silvered cone and blackened passageway and darkroom will work really well.
Apologies, if this wasn't in the remit but I enjoyed myself.
I'll dig up some school math to see if I can proof it.
Besides , I'm not sure about the 2-dimensional light source unless I make it the floor (flatland) of my tee-pee.
That's an idea - get the light to converge to a point, so I'll put the light in the floor right in the middle and I won't silver the tee=pee walls but blacken them.
My revised room.

So one half a globe, one cone and a small half-cone should do the trick with a 2-dimensional light source placed in the middle of the floor(2-dimensional flatland) of the teepee!
Making the globe and cones 2-dimensional would be more appropriate for stick-figure photographers and Jessica Rabbits.

regards
[ October 05, 2003: Message edited by: HS Thomas ]

HS Thomas
Ranch Hand
Posts: 3404
Here's a closed loop that works on the same principle :

A huge 2-dimensional circle with a 2-dimensional light in the centre.
To be dark the 2-dimensional photgrapher moves to the extremes of any part of the extremely HUGE circle.I think it has to be the size of a football field.

4 - The inner 'surface' of the shape will reflect the light perfectly (i.e straight reflections, and infinite)

In a 2-dimensional flatland space what inner-surface is this, Bert ?

Each light source depending on it's strength or weakness will form it's own cone of light beyond which will be darkness as the ray weakens and dies. If the inner surface is outside this range you don't need to worry about reflections. So the strength of light decides the radius of the circle.
This is my final answer and I'm sticking with it.
regards
[ October 05, 2003: Message edited by: HS Thomas ]

Bert Bates
author
Sheriff
Posts: 8898
5
Jim's on the right track...
A few more clarifications... ( I really should be working ),
1 - light is light, it goes forever, and it goes in all directions from the source in the question
2 - this puzzle has practical applications i.e. the solution doesn't require some infinitely huge room...
3 - you could simulate this in Java, it would be fun to slow the light down, maybe limit the rays coming from the source to every 10 degrees, and maybe let each ray bounce only 20 times. Or I guess all of those could be arguments!
then you could 'construct' your shape out of mathematically describable line segments and arc segments and stuff, and let 'er rip...
[ October 05, 2003: Message edited by: Bert Bates ]

Jignesh Malavia
Author
Ranch Hand
Posts: 81
Originally posted by Bert Bates:

3 - A 2 dimensional, geometric 'point' of light will be placed, whereever you want it, inside the shape.

Has it anything to do with wave interference? Like if there is a wall with very thin slits in it within the closed space, then the light rays originating from a single 'point' source produce bright and dark areas on the other side of the wall?

HS Thomas
Ranch Hand
Posts: 3404
A 2-dimensional geometric 'point' of light in the floor is akin to a light passing through a slit in a wall, IMO. So in my flatland space the floor is a wall.
I've just found that 'beings' in flatland take on the properties of hexagons, squares, ovals, etc. This will make a very interesting Java program. Mindblowing!
To the Victorian English , there were 150 different genders of Flatlanders in Flatland:
"A Male of the lowest type of the Isosceles may look forward to some improvement of his angle, and to the ultimate elevation of his whole degraded caste; but no Woman can entertain such hopes for her sex. "Once a Woman, always a Woman" is a Decree of Nature; and the very laws of Evolution seem suspended in her Disfavour. Yet the least we can admire the wise prearrangement which has ordained that, as they have no hopes, so shall they have no memory to recall, and no forethought to anticipate, the miseries and humiliations whiuch are at once a necessity of their existence and the basis of the constitution of Flatland."
Er, back to geometry!

regards
[ October 06, 2003: Message edited by: HS Thomas ]

David O'Meara
Rancher
Posts: 13459
Ever heard of the darklight experiment? (I think that's what it's called.)
Heat the room till it is the same temperature as the light emitting source. Then the whole room will be black.
Not the solution you're looking for, but it works and has practical applications
Thinking about the applications of parabolas too. At the moment I'm comparing to telescopes. Just because.

Jeremy Thornton
Ranch Hand
Posts: 91

Jeremy Thornton
Ranch Hand
Posts: 91
Failed my ASCII art degree but if you use your imagination (considerably) to the diagram below and replace the equals signs with a parabola that has a focal point back up in the "corridor" that the source is in, all light passing down from the corridor would be reflected back up. a "room" sheltered from direct light would also be protected from reflected light as the parabola would reflect it all back into the original corridor.
| * |
| |
| |
| |
/ \
/ (_ _
/ \/ /
( /
\ )
=========
Maybe.

Jeremy Thornton
Ranch Hand
Posts: 91
Oops.

Eddie Roache
Greenhorn
Posts: 1
At first I thought that the perfectly reflecting walls was a problem, but you can use it to your advantage. Place the light source at the focus of a parabola---all light ray will form a perfect beam of light away from the parabola. Now place a flat wall opposite the parabola to reflect back the light. Hopefully, this picture is understandable. I think this works.

Bert Bates
author
Sheriff
Posts: 8898
5
Jeremy -
You might be on to something... what are the parabola's special properties, and how/where does the parabola meet with the rest of the room?

Jeremy Thornton
Ranch Hand
Posts: 91
I recon that if the parabola has a focal point of the light source, the following should work.

The idea is that the walls are at 45 degrees (ie 90 degrees between them).
the light from the source will hit the parabola directly from the light source and be reflected directly back up. On hitting the horizontal walls, the light will reflect back toward the parabola where it will be directed back at the light source. The light that is reflected back at the 45 degree walls will reflect towards the opposite 45 degree wall and will reflect back along the same path. It will then reflect directly down towards the parabola where it will be directed towards the light source.
Hopefully.

Jeremy Thornton
Ranch Hand
Posts: 91
Ah, no sharp corners.
oops.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Ah, no sharp corners.
Yeah, that's the killer. Excellent idea though.

David O'Meara
Rancher
Posts: 13459
Hmm. Useful properties:
Circle - a light source placed at the focal point (ie the center) has all light rays reflected back to the focal point.
Parabola - a light source placed at the focal point has all light rays reflected to infinity ie rays are parallel.
Elipse - two focal points. light rays emitted fromone focal point will be reflected towards the second focal point.
I have two solution, but they both have hard corners
Get an elipse, cut it vertically at the mid point, where the two sides are parallel. Call them sides A and B, to make it easy to understand, assume there is a light source at focal point A and B - it works out the same. On the 'A' side, start a circle segment with the center as point B. Do the same on the B side. That is where the hard edge is
Now light from A is either reflected to B via the elipse or back to A via the circle. There is an area between the circle segments for A and B where no light enters.
----
It may be possible to merge the elipse and cirlce edges but I'm not sure this possible without allowing light that should be reflected from the elipse hitting the circle - if it is possible, this would solve the problem.
Dave

stara szkapa
Ranch Hand
Posts: 321
A - circle
!A - complement of circle
Put the light (*) and the dark room (D) in !A on line passing through the center of A, on the opposite poles of A. Just like this:
!A
* (A) D
PS: !A is closed since it has closed border.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
DOM: I'm not sure I follow your description. Since (a) this is Programming Diversions, and (b) I've really never had occasion to use the Java 2D graphics classes, I've put together a couple diagrams which may be similar to what you're talking about - or not.

So, is figure 1 closer, or figure 2? Which arc segments does the mirrored surface follow? Does anything need to be added?

David O'Meara
Rancher
Posts: 13459
I was thinking of something like #1, although #2 is interesting.
If you take the variables in the picture as the height and width of the elipse and the radius of the circles (the distance between the foci is a function of the height and width) The circles can have different radii, but they don't have to.
(why is the plural of 'us' 'i' )
Is there a point at which the position where the join between the circle and elipse have the same angle (ie point 'P'), or is that only when 'A' == 'T' at the extremes. That would get rid of the hard corner, but I think it gets rid of the black spot at the same time.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
I was thinking of something like #1, although #2 is interesting.
OK, I've generalized the code below. #1 is obtained by setting S = 15-; #2 by setting S = 250. You can see the effect of a range of values, shown in cyan. (S or s represent the sum of the distances to the two foci, for any point on a given ellipse.)
If you take the variables in the picture as the height and width of the elipse and the radius of the circles (the distance between the foci is a function of the height and width) The circles can have different radii, but they don't have to.
For simplicity, let's stick to both being the same radius. Should that radius be larger or smaller than the distance between A and B? I initially thought it was equal, but now I'm not sure what you're envisioning.
I'm also not sure which parts of these curves you're talking about. Are you interested in RAP - PQ - QUS - SR? Or RTP - PC - CQ - QUS - SD - DR? Or something else? And where in all this (approximately) would there be darkness, if we put a light source at A?
(why is the plural of 'us' 'i' )
The legacy of Rome.
Is there a point at which the position where the join between the circle and elipse have the same angle (ie point 'P'), or is that only when 'A' == 'T' at the extremes. That would get rid of the hard corner, but I think it gets rid of the black spot at the same time.
I don't think so, but I included a set of alternate ellpses so you can see. You can also experiment by changing the value of R. (Though some of the points will no longer be labeled correctly if you do this).

[ October 07, 2003: Message edited by: Jim Yingst ]

Bert Bates
author
Sheriff
Posts: 8898
5
You guys might be on to a second solution.
My solution is close to what you're up to.

Jim Yingst
Wanderer
Sheriff
Posts: 18671
Well, there's something like this:

The remaining parts can of course be connected however you like.
[ October 07, 2003: Message edited by: Jim Yingst ]