Meaningless Drivel is fun!*
The moose likes Programming Diversions and the fly likes A flatland puzzle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Other » Programming Diversions
Bookmark "A flatland puzzle" Watch "A flatland puzzle" New topic
Author

A flatland puzzle

HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Cool diagrams.
But I imagine there'd be lots of gravity in flatland, don't you ?

regards
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Not necessarily. As noted previously, I'm skeptical there would be light in Flatland; I'm similarly skeptical about gravity. Or put it another way - maybe there's gravity, but do flatlanders have any mass?


"I'm not back." - Bill Harding, Twister
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
Looks like a possible solution to me. Does diffraction only occur at hard edges though?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Mmmm... the harder the edge, the greater the effect of diffraction. I'd think it should be pretty negligible here, as long as the radius of curvature of the wall is much larger than the wavelength of the light used. (Which is surely the case.) In any event we're allowed to assume light travels in straight lines, period. Having no hard angles is a separate requirement, not necessarily imposed by diffraction considerations.
A greater concern, IMO, is that if the light source is not a dimensionless point, and is not positioned exactly flush with the wall, then we get a tiny bit of light bleeding around the wall that way. We can try various things to direct this light back into the main room, but at this point the djinn is out of the bottle. We can't get this light to go straight back the way it came, and we've got the possibility of light bouncing around in all sorts of other crazy unplanned paths. Eventually it's apt to go somewhere we don't want it.
[ October 08, 2003: Message edited by: Jim Yingst ]
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
If we can't assume that the source is a dimensionless point then we effectively have multiple sources.
Therefore can't use focal properties etc.
Pretty sure the damn stuff will get everywhere.
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
Man you guys are so close I can taste it.
Tell you what, my solution doesn't require a dimensionless point of light for the light source, but I'll give 80% credit for a solution that has that stipulation. (What can I say, I'm in a generous mood )


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
So what's the deal? You guys want the solution? Does apathy reign?
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Hey, we have a solution. And as per Jeremy's last post, I'd be pretty surprised if your solution doesn't rely on the point-source assumption to some extent. Though it may well be a bit more robust in the fact of deviation from this assumption than my own solution is.
Mmmmm... I'm not really motivated to put more thought into this, unless perhaps you want to give some more enticing hint about the nature of your solution. Most likely though, it's best to just go ahead and reveal your solution now. Unless someone else feels otherwise...
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
Originally posted by Bert Bates:
my solution doesn't require a dimensionless point of light for the light source, but I'll give 80% credit for a solution that has that stipulation

With the assumption of dimensionless point of light the solution is quite obvious. It is enough to put light at the center of a circle and have some other object inside the circle. Area behind the object would be the dark room.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Originally posted by Bert Bates:
Man you guys are so close I can taste it.

which solution? I think I lost the plot somewhere.
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
With the assumption of dimensionless point of light the solution is quite obvious. It is enough to put light at the center of a circle and have some other object inside the circle. Area behind the object would be the dark room.
Only if the other object doesn't reflect anything. That one seems a bit too obvious; I assumed that additional nonreflecting objects were not allowed. Else we could just put shades over all the mirrored walls, and then what was the point of the problem?
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
Originally posted by Jim Yingst:
Only if the other object doesn't reflect anything

This would not be a problem if the other object was a circle with smaller diameter whose circumference is passing through the center of the enclosing circle. Just like this:
(x)� + (y)� = 5�
(x - 1)� + (y)� = 1�
One dimensional light source at (0,0)
Dark room at (2,0)
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
This would not be a problem if the other object was a circle with smaller diameter whose circumference is passing through the center of the enclosing circle. Just like this:

Why a circle? This solution seems to be the same as Jim's earlier suggestion (illustrated using the 2D library) which used a point source against a flat edge to ensure that all emitted light was reflected directly back at the point source.
Oh, and the single loop rule is broken.
[ October 15, 2003: Message edited by: Jeremy Thornton ]
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
What rule this solution brakes?
(x)� + (y)� = 1�
Light source at (-1.1; 0)
Dark room at (1.1; 0)
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
What rule this solution brakes?
3 - A 2 dimensional, geometric 'point' of light will be placed, whereever you want it, inside the shape.
5 - Create a shape such that when the light is turned on, some part of the shape will NEVER be illuminated. (your dark room)

Both the light and the darkroom need to be inside the closed shape.
[ October 15, 2003: Message edited by: Jim Yingst ]
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
If the universe is closed then both sides of (x)� + (y)� = 1� circumference represent closed shapes.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
"This is a two dimensional parabola The purpose is to get familiar with ray tracing and 2D rendering of the optical bench."

2D Parabola ray tracing
Does this help ?
regards
[ October 15, 2003: Message edited by: HS Thomas ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
If the universe is closed then both sides of (x)� + (y)� = 1� circumference represent closed shapes.
What sort of closure did you have in mind? Is Flatland actually part of a closed 3-dimensional sphere? Or toroid? If so, (a) it's not really 2-dimensional as originally stipulated, and (b) we'd have to consider what happens to light which heads out to "infinity" - it eventually travels around, coming back to our 2-D enclosure from the opposite side. Or is Flatland closed off by some sort of border? If so, does the border reflect?
In any event, the problem still says that the light source must be inside the closed curve. If both sides of the curve are equally "inside" then the term has lost its meaning.
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Sorry ... didn't read all of this ... forgive if already suggested ...
If you put your point of light in the center of the flat side of a half-circle, all light radiated will go out to the curved wall and reflect back to the same point. You can put a door anywhere in the flat wall to a room behind the wall and no light will enter.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
stara szkapa
Ranch Hand

Joined: Mar 27, 2003
Posts: 321
Originally posted by Jim Yingst:
(b) we'd have to consider what happens to light which heads out to "infinity" - it eventually travels around, coming back to our 2-D enclosure from the opposite side.

That is true, but by the time it gets there we wouldn�t need our dark room anymore. Most likely analog cameras would be obsolete; we would have only digital cameras.
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
If you put your point of light in the center of the flat side of a half-circle, all light radiated will go out to the curved wall and reflect back to the same point. You can put a door anywhere in the flat wall to a room behind the wall and no light will enter.

Yup, already suggested by Jim. Problem is that without a point source of light, we can never have light eminating from exactly the centre.
[ October 16, 2003: Message edited by: Jeremy Thornton ]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Right, I took this "geometric 'point' of light" literally. Physically imposserous of course, but so's flatland. And I'm from Nebraska and know a bit about flat land.
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
Sorry to duck out at the crucial moment... :roll:
For whatever it's worth, at this point I'd say that the puzzle is solved, given a dimensionless geometric point of light.
Further, I'd say if the light source was an inch wide, the puzzle remains open...
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Welcome back, Bert! I think we're all ready to hear an alternate solution. I'll be scrutinizing it carefully for accuracy, of course.
[ October 24, 2003: Message edited by: Jim Yingst ]
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
Excuse the ASCII art
The following picture is supposed to be of an ellipse, cut in half along its long axis, with three curvy shapes attached...

The points A, f1, f2, and B are all on the same line. A and B are points on the ellipse, and f1 and f2 are the foci of the ellipse.
1, 2, and 3 are the three 'rooms' attached to the half ellipse.
An ellipse has several special properties:
The well known property is that a line intersecting a focus point will 'bounce' off the ellipse and intersect the other focus.
A less known property is that a line intersecting the line segment between the two foci (f1-f2), will 'bounce' off the ellipse and re-intersect the f1-f2 line segment.
A corollary is that a line intersecting the A-f1 line segment will 'bounce' off the ellipse and intersect the f2-B line segment.
So a light source (with or without dimension), placed anywhere around 1 or 3 will leave the area around 2 in darkness, and a light source placed anywhere around 2 will leave the areas around 1 and 3 in darkness.
p.s. This has actual practical applications... ellipitically shaped rooms are used when doing acoustics research.
[ October 26, 2003: Message edited by: Bert Bates ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Ummmm... aren't there some rather sharp corners at f1 and f2?
We could imagine rounding those corners off in various ways, but everything I've come up with so far will leave some extra mirrored surface protruding out somwhere light may hit it, and then the light will follow a rather different path than was originally planned. What sort of curves are you envisioning at f1 and f2? Does any part of the surface extend above the A-f1-f2-B line? Or above the 1-f1 line, or above 3-f2? Of 2-f1 and 2-f2? It seems that if none of those lines are crossed, you either (a) can't get the wall to actually touch f1 or f2, in which case there's a gap that light can go around, or (b) there are sharp angles at f1 and f2, prohibited by the problem. What am I missing?
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
Wow - a new level of weirdness, 'zoomed in ASCII art'
Assume that 'f1' (and f2) are points at the 'top' of segments of a circle...

Then anything, even ever so slightly to the left of f1 is still 'as if', crossing the A-f1 line segment, and so on
[ October 26, 2003: Message edited by: Bert Bates ]
[ October 26, 2003: Message edited by: Bert Bates ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Ah, I see. So really the three curves around 1, 2, and 3 can have just about any (smooth) shape, as long as they never cross above the A-f1-f2-B line, and connect smoothly at A and B, and are instantaneously horizontal at f1 and f2. All right, that does seem to work. Very
Sad thing is, I was stuck on ellipses for a long time, and was looking at something very nearly the same as this (possibly identical) when I suddenly thought hey, this doesn't have to be an ellipse at all, does it? And came up with the simpler semicircle solution. I didn't quite appreciate the off-focus properties of the ellipse, and then never returned to that solution later. Ah well...
Good puzzle, Bert!
[ October 26, 2003: Message edited by: Jim Yingst ]
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8815
    
    5
Phewww !
It's always a good feeling to pass the Yingst gaunlet!
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Come to think of it, you could also use this technique to create an enclosure with as many separate darkrooms and separate lit rooms as you might want.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Originally posted by Jim Yingst:
Come to think of it, you could also use this technique to create an enclosure with as many separate darkrooms and separate lit rooms as you might want.

Ummmm! Wouldn't you be restricted to having light reflected off a semi-circle ? Or were you talking three dimensionally this time !
Cool puzzle Bert!
[ October 27, 2003: Message edited by: HS Thomas ]
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
I don't think so. What semi-circle are you talking about? The top half of the curve is an ellipse, not a circle. The bottom part splits into three sections which are really very free-form. Nothing in Bert's explanation requires them to be semicircles, even though what he drew does look lke three semicircles. You can replace this with three passages leading to different parts of the house. You can then connect these tunnels to other ellipses and other tunnels in various configurations.
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Substitute ellipse for semi-circle in my previous post.
So it doesn't matter what shape the surface is where the light bounces back ?
regards
[ October 27, 2003: Message edited by: HS Thomas ]
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
An ellipse has several special properties:
The well known property is that a line intersecting a focus point will 'bounce' off the ellipse and intersect the other focus.
A less known property is that a line intersecting the line segment between the two foci (f1-f2), will 'bounce' off the ellipse and re-intersect the f1-f2 line segment.
A corollary is that a line intersecting the A-f1 line segment will 'bounce' off the ellipse and intersect the f2-B line segment.

I think you are stuck with an elliptical top half at least and different shaped ellipses (elongated vs very squat) may throw in different properties.
regards
HS Thomas
Ranch Hand

Joined: May 15, 2002
Posts: 3404
Jim Yingst: You can then connect these tunnels to other ellipses and other tunnels in various configurations.
Sorry I missed that.
I am with you now. - conjoint ellipses.
regards
[ October 27, 2003: Message edited by: HS Thomas ]
Gustavo Torreti
Ranch Hand

Joined: May 20, 2003
Posts: 84
Good puzzle, Bert!


You were trained to handle mission impossible; 'difficult' should be a walk in the park for you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A flatland puzzle