i hope it's ok with you that i expand the recipient list to include
the mc4d
mailing list. this is definitely the place for these discussions so
don't be
afraid to use it.
regarding graphics programming, my strongest advice is to use java
instead of
c++. i found myself literally 4 times as productive using java due to
it's
simplicity, robustness, and excellent class libraries. as a complete
coincidence i happen to be doing some scientific programming using
the java3d
library which though it has a huge and often confusing api, takes
care of most
of the really nasty details of driving the native 3d graphics
libraries, video
cards, etc.
regarding toggling visibility of the invisible face, we briefly tried
that but
found the resulting display was totally unusable. you
mention "transparency"
though which would be slightly different but i suspect won't be
helpful. my
dream would be to model the precise 4d analog of a 3d mirror and
place it in
the 4d scene such that the invisible face becomes visible from a
different
direction. i guess that the 4d "reflection" would appear as a 3d
object
embedded within a 3d mirror appearing like a solid block of glass. i
have no
idea how to do this though. perhaps you'll figure it out!
regardless, i wish you good luck with the 5^4.
go for it!
-daniel
Jonathan Vaughan wrote:
> Hi Daniel,
>
> Have just finished 4^4 (without macros), and wanted to email
you to say
> a massive thankyou for the Linux version of MC4D. It is fantastic,
a really
> superb implementation and a joy to play with.
> Seeing as I now have Linux :) I would like to start doing some
C++ and
> graphics with it, and I figured that poking around in the source
code for
> MC4D should give me somewhere to start. I was wondering whether I
could try
> adding a feature that toggled the transparency of the outer layer of
> hyperstickers - this would make 4^4 a bit easier in the early
stages and
> give me a chance of doing 5^4 :)
> Any advice about development environment for C++ under Linux?
Is there
> an equivalent of Visual C++ or does everyone just use GCC and Emacs?
>
> Thanks once again, Jonathan
--- End forwarded message ---
> i hope it's ok with you that i expand the recipient list to
include
> the mc4d mailing list. this is definitely the place for these
> discussions so don't be afraid to use it.
I'll second that -- many of us are interested to learn of new
accomplishments. If memory serves, this makes Jonathan the third
person to solve the 4^4 version of the puzzle. I worked on it in
dribs and drabs over several months back in 1999 thinking I didn't
really have any competition, and then Roice jumped in and knocked it
out in one weekend, helping me to secure my place as number two! (I
was also the second person to solve the 3^4.) I don't believe anyone
has conquered the 5^4. I haven't even attempted it. There are no
elements of the 5^4 that aren't present in the 3^4 or the 4^4, both of
which have elements not found in the other. None the less, although
solving the 5^4 would not involve substantial breaking of new ground,
it would be an amazing feat of concentration and persistence, and
would probably be more difficult than the 4^4 just because of the
shear number of pieces.
Jonathan -- I'm curious... have you taken a look at the 3^4 since you
finished the 4^4? I'd be interested to get your reaction. I think
Roice and I were both struck by how small and simple the 3^4 looks
after finishing the 4^4, but then I shouldn't be putting words in
anyone else's mouth. :-)
> regarding graphics programming, my strongest advice is to use java
> instead of c++. i found myself literally 4 times as productive
> using java due to it's simplicity, robustness, and excellent class
> libraries. as a complete coincidence i happen to be doing some
> scientific programming using the java3d library which though it
has
> a huge and often confusing api, takes care of most of the really
> nasty details of driving the native 3d graphics libraries, video
> cards, etc.
I had intended to work on a java port of mc4d, but I never got around
to it. It turns out that, at least as of January, it's pretty hard to
get java3d to run on Linux without crashing the X server. However,
XFree86 4.2.0 has recently come out, and I now have it on my laptop.
Perhaps I should try again. I've been sitting on a 2.2 release of
mc4d for some time now. I've made a few minor enhancements or fixes
to the Linux version but, for some reason, I am no longer able to
build a working version. There are some major redisplay problems with
positioning of buttons. It looks like there's either a recently
created bug in the Athena widget set or else the code is accidentally
relying on some undocumented behavior. I spent a few hours trying to
track this down but haven't looked at it since early February. I
should try that again with the new X release. It's unfortunate that
this system uses Athena widgets. Athena widgets were developed by MIT
Project Athena in the late 80's. (I was there at the time.) X11 had
just come out (replacing X10 in 1987 or so) and the only programming
interface was raw Xlib, which is very low-level and prohibitively
difficult to write anything complex in. There was work on Xt, the X
toolkit, which provided some framework for the creation of widgets. A
few people at Athena implemented a widget set called Athena widgets
which was intended more as a proof of concept than anything else. At
the time that Don wrote the original UNIX version of the puzzle, this
was the only practical and freely available widget set for X. This is
certainly no longer the case. Between various open versions of Motif,
Gtk, and quite a handful of other options, there is really no reason
to be using Athena widgets anymore. The way the code is structured,
it wouldn't be too hard to write a new front-end. The button stuff is
quite simplistic in comparison to the drawing logic, but, in the Linux
code, that's just polygons with all the 4d -> 3d and 3d -> 2d mapping
being done in the code itself. (The windows version uses a 3d
library, eliminating the need for the code to do the 3d -> 2d mapping.
I'd think a java port would do the same, especially with java3d.) I'm
sure Don or Daniel can correct me if I've misrepresented anything
here.
In any case, if you want to start messing with the source code, the
version I have in version control is newer than what's on the web
site. Maybe we should put this project on sourceforge. (See
sourceforge.net if you're not familiar with this.)
> regarding toggling visibility of the invisible face, we briefly
> tried that but found the resulting display was totally
> unusable. you mention "transparency" though which would be
slightly
> different but i suspect won't be helpful. my dream would be to
> model the precise 4d analog of a 3d mirror and place it in the 4d
> scene such that the invisible face becomes visible from a
different
> direction. i guess that the 4d "reflection" would appear as a 3d
> object embedded within a 3d mirror appearing like a solid block of
> glass. i have no idea how to do this though. perhaps you'll figure
> it out!
We tossed a number of interesting user interface ideas around a few
years ago. My particular favorites are having multiple simultaneous
views active so that you could, for example, look at the "front" and
the "back" of the puzzle at the same time thus being able to see all
the cubies at the same time. Another feature I had thought about was
the ability to do something or have the puzzle in some mode where you
can select one polygon and have some highlighting appear on all the
other polygons that are part of the same piece as the selected one.
This could happen automatically as you move the mouse around or could
require some action. This feature should be switchable. I think it
would be especially useful for a novice, but I suspect you'll agree
that once you've solved the puzzle, you have to have a pretty good
ability to do that matching on your own. It would be useful to
combine these two features so that if you select a piece on one view,
it highlight's on the other view as well.
Supporting these features would be pretty hard with the current
implementation because of the way the view is connected with the
state, but not impossible. They are separated somewhat in the code,
but the code knows that there is only one of each.
> Jonathan Vaughan wrote:
>
> > Seeing as I now have Linux :) I would like to start doing
> > some C++ and graphics with it, and I figured that poking around
> > in the source code for MC4D should give me somewhere to start. I
> > was wondering whether I could try adding a feature that toggled
> > the transparency of the outer layer of hyperstickers - this
> > would make 4^4 a bit easier in the early stages and give me a
> > chance of doing 5^4 :)
It's great to find out that some people are using the Linux
version. :-)
> > Any advice about development environment for C++ under
> > Linux? Is there an equivalent of Visual C++ or does everyone
> > just use GCC and Emacs?
There are some more visual environments for Linux. Borland has one.
There's also something called Kylix or something like that. They
advertise in Dr. Dobbs journal or Linux journal. I may not have the
name right. However, I believe that emacs and gcc are the best way to
go. When you start getting more proficient, you'll probably feel that
your hands are too tied by the graphical front-ends. Also, I'm not
aware of any free graphical integrated environments for Linux. Then
again, I wouldn't be the right one to advice about that though since
I've been living and breathing emacs, gcc, and make for 15 years...
Jay
--- End forwarded message ---
Hi!
I'm not sure of what you want here. Did you want the "visible" faces
of the 4D-cube to look like they do now, and just have the "hidden"
face "mirrored"? Or did you want to make a completely accurate
projection of the cube+mirror down into 3D? An accurate projection
would probably look very strange; imagine being a 2D person studying
the drawing in your message. It would be very difficult figuring out
what it was...
If you project the rubik's cube down to 2D "MC4D-style" you would
have the picture on the MC4D-icon. If you "mirrored" the "hidden"
face it would probably be best to make it look like the center face,
that is: a square (and place it to the side). The analog with the
MC4D would of course be a cube that looked like the center cube,
placed off to the side. As I understand it, this has been tried
before...?
With the 3D -> 2D analog, if you rotate (whithout twisting) the cube,
the "mirrored" face would rotate in the same manner. How would
the "mirrored" "face" in the MC4D rotate when the whole 4D-cube is
rotated? I'm not sure here... My guess is that it would rotate
exactly like the center cube of the MC4D. In the 3D->2D analogy, you
can think of it like you have suspended your projection on a plane in
3D. Below this plane, you have another plane with the
projected "hidden" face on it. You can draw parallel rigid lines
between the stickers of the middle square and the hidden square
(perpendicular to the planes). When you rotate the center square, the
rigid lines will cause the hidden square to rotate in exactly the
same manner as the center square.
With the MC4D, you can suspend your projection on a hyperplane in 4D
and draw the rigid lines connecting the stickers of the center and
hidden cubes. The lines are perpendicular to the hyperplanes.
Now, if we assume that the coordinates of one of the cube-stickers in
the projection is ( x,y,z,w ) it must be the case that the coordinate
of the analogous cube-sticker on the "mirrored" "face" is (
x,y,z,w' ) because the vector between these points must be
perpendicular to the hyperplanes. Therefore, it would rotate exactly
like the center cube. (Guess my guess was correct.... :-) )
Was I right in assuming that you had experimented with this kind
of "mirroring" before, that is: placing a smaller cube off to the
side?
Just some musings in the night...
Cubically yours,
Christian
----- Original Message -----
From: dgreen@s...
To: MC4D@yahoogroups.com
Sent: Monday, April 08, 2002 5:46 AM
Subject: Re: [MC4D] Re: phew, at last... [4^4 solution]
Don Hatch wrote:
> my
> dream would be to model the precise 4d analog of a 3d mirror
and place it in
> the 4d scene such that the invisible face becomes visible from
a different
> direction. i guess that the 4d "reflection" would appear as a
3d object
> embedded within a 3d mirror appearing like a solid block of
glass. i have no
> idea how to do this though. perhaps you'll figure it out!
Can you draw a lower-dimensional analogue (Rubik's cube)?
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--- End forwarded message ---
i assume you're asking me rather than don.
yes, i wanted a completely accurate projection of a 4d cube+mirror
scene
using 4d viewpoint and direction that "sees" both objects such that
the
mirror mostly includes a 4d "reflected" view of the missing face. The
view you described may not be complete. i think it also wouldn't be
correct since the current display is of a 4d viewpoint in a direct
line
from the center of the object through both the closest and furthest
faces. a single mirror somewhat off to that line would not display an
axis-oriented view.
that said, i just realized i may not be making the correct 3d
analogy. i
keep forgetting that our 4d projection is really analogous to taking
the
lid off a box and looking in so that the bottom of the box is a small
square in the center, and the sides appear foreshortened arrayed
around
that furthest face. i suppose it would make some sense to think of
putting a mirror inside the box so that you can look back at the
inside
of the lid, but that suggests that the mirror would necessarily
obscure
part of the normal view of the puzzle.
it occurs to me that i don't really know what the "correct" view of
the
puzzle from the outside would look like. the only thing that seems
obvious is that you could never see more than half of the faces just
like in 3d which, while perhaps more accurate, would be harder to
operate on. though perhaps the addition of a true 4d mirror would
ameliorate that problem, especially if we allowed users to click on
hidden faces "through the mirror".
i'm not sure what you're getting at with "lines between stickers" but
i
can say that we never experimented with 4d mirrors but we did
experiment
with faithful projections of the invisible face both normally and in
wireframe, but the results were clearly unhelpful.
don, you want to jump in here and tell us what this all means and what
would be possible or helpful?
-daniel
Christian Lundkvist wrote:
> Hi!I'm not sure of what you want here. Did you want the "visible"
> faces of the 4D-cube to look like they do now, and just have the
> "hidden" face "mirrored"? Or did you want to make a completely
> accurate projection of the cube+mirror down into 3D? An accurate
> projection would probably look very strange; imagine being a 2D
person
> studying the drawing in your message. It would be very difficult
> figuring out what it was...If you project the rubik's cube down to
2D
> "MC4D-style" you would have the picture on the MC4D-icon. If you
> "mirrored" the "hidden" face it would probably be best to make it
look
> like the center face, that is: a square (and place it to the side).
> The analog with the MC4D would of course be a cube that looked like
> the center cube, placed off to the side. As I understand it, this
has
> been tried before...?With the 3D -> 2D analog, if you rotate
(whithout
> twisting) the cube, the "mirrored" face would rotate in the same
> manner. How would the "mirrored" "face" in the MC4D rotate when the
> whole 4D-cube is rotated? I'm not sure here... My guess is that it
> would rotate exactly like the center cube of the MC4D. In the 3D->2D
> analogy, you can think of it like you have suspended your projection
> on a plane in 3D. Below this plane, you have another plane with the
> projected "hidden" face on it. You can draw parallel rigid lines
> between the stickers of the middle square and the hidden square
> (perpendicular to the planes). When you rotate the center square,
the
> rigid lines will cause the hidden square to rotate in exactly the
same
> manner as the center square.With the MC4D, you can suspend your
> projection on a hyperplane in 4D and draw the rigid lines connecting
> the stickers of the center and hidden cubes. The lines are
> perpendicular to the hyperplanes.Now, if we assume that the
> coordinates of one of the cube-stickers in the projection is (
x,y,z,w
> ) it must be the case that the coordinate of the analogous
> cube-sticker on the "mirrored" "face" is ( x,y,z,w' ) because the
> vector between these points must be perpendicular to the
hyperplanes.
> Therefore, it would rotate exactly like the center cube. (Guess my
> guess was correct.... :-) ) Was I right in assuming that you had
> experimented with this kind of "mirroring" before, that is: placing
a
> smaller cube off to the side? Just some musings in the
> night...Cubically yours, Christian
>
>
>
> ----- Original Message -----
> From:dgreen@s...
> To: MC4D@yahoogroups.com
> Sent: Monday, April 08, 2002 5:46 AM
> Subject: Re: [MC4D] Re: phew, at last... [4^4 solution]
> Don Hatch wrote:
>
> > > my
> > > dream would be to model the precise 4d analog of a 3d
> > mirror and place it in
> > > the 4d scene such that the invisible face becomes
> > visible from a different
> > > direction. i guess that the 4d "reflection" would appear
> > as a 3d object
> > > embedded within a 3d mirror appearing like a solid block
> > of glass. i have no
> > > idea how to do this though. perhaps you'll figure it
> > out!
> >
> > Can you draw a lower-dimensional analogue (Rubik's cube)?
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>
> Yahoo! Groups Sponsor
[Image]
>
> To unsubscribe from this group, send an email to:
> MC4D-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
--- End forwarded message ---
Jay Berkenbilt wrote:
> [...] (The windows version uses a 3d
> library, eliminating the need for the code to do the 3d -> 2d
mapping.
> I'd think a java port would do the same, especially with java3d.)
I'm
> sure Don or Daniel can correct me if I've misrepresented anything
> here.
well, while i did use the Direct3D library from microsoft, i don't
think i'd
use java3d in a java port. that's rather sad because this would be the
natural thing to do except for the fact that it wouldn't be able to
run in a
browser without the users installing plugins, which is too much to
ask.
happily, the other way of using don's 3d->2d code would map very
nicely to
the polygon capabilities of the java.awt.Graphics class and is plenty
fast on
most machines.
> [...] Another feature I had thought about was
> the ability to do something or have the puzzle in some mode where
you
> can select one polygon and have some highlighting appear on all the
> other polygons that are part of the same piece as the selected one.
> This could happen automatically as you move the mouse around or
could
> require some action. This feature should be switchable. I think it
> would be especially useful for a novice, [...]
i completely agree. these should be relatively easy features to add.
i'd also
like to draw an "axis of rotation" line through whatever legal
sticker the
mouse pointer hovers over.
-daniel
--- End forwarded message ---
> > [...] (The windows version uses a 3d
> > library, eliminating the need for the code to do the 3d -> 2d
mapping.
> > I'd think a java port would do the same, especially with
java3d.) I'm
> > sure Don or Daniel can correct me if I've misrepresented
anything
> > here.
>
> well, while i did use the Direct3D library from microsoft, i don't
> think i'd use java3d in a java port. that's rather sad because
> this would be the natural thing to do except for the fact that it
> wouldn't be able to run in a browser without the users installing
> plugins, which is too much to ask.
>
> happily, the other way of using don's 3d->2d code would map very
> nicely to the polygon capabilities of the java.awt.Graphics class
> and is plenty fast on most machines.
Now I'm probably really venturing into territory I'm not that familiar
with since it's been a while, but if I recall from when I originally
started looking at the code, the polygon code has some issues
involving the order in which things are drawn. Although it appears to
always work correctly under ordinary circumstances, is it possible
that it may not in some cases, such as if the shape were not a
hypercube? Put differently, I have a vague memory of looking through
the code and thinking that it wasn't implementing a general projection
of 4D into 2D but something that took advantage of some additional
information. I could be way of base here. There are also some issues
with odd effects with some of the rotations on the versions of the
puzzle that have more pieces per side, but I believe this is just a
case of the stickers bumping into the "glass". Moving the w-axis eye
further "back" seems to alleviate the problem. Regardless, that
polygon code and the other aspects of the internals of mapping the
puzzle into the graphical manifestation (okay, and Don's perl script
that solves the puzzle) is probably the most brilliant code I've ever
seen. When I started playing with this puzzle in 1998, I was pretty
amazed at how well it performed on my hardware at the time (a 133 MHz
pre-MMX Pentium) and was astonished to learn that the code was as old
as it was. Of course, Java code can perform very well too -- you just
have to be a little more careful with it. :-)
I would concur with the decision to avoid Java3D for now. The plugin
reason is one, and the relatively sparse support for Java3D on
multiple platforms is another. No doubt these problems will both go
away before too long.
Jay
--- End forwarded message ---
Hi again Daniel!
It was pretty late when I wrote the letter, so maybe I didn't make
myself clear. We seem to agree that a completely accurate 4d
projection would be very surreal and probably unusable for puzzling.
The way to go is with the "unfolding box" projection that the MC4D
uses. Think about the 3D -> 2D analogy again. What I meant was a lot
like your suggestion of putting a mirror "inside" the box. The image
that you would have seen if there had been a mirror inside the box
would be placed off to the side, so it wouldn't be completely
correct. You would still see the bottom of the box, but off to the
side is the image that would have been in the center had there been a
mirror there. I'm not sure if this would be much help making it
easier to solve the cube, but it was nice thinking about how the
mirrored image would move when you move the cube.
About how the correct representation would look like: You would
probably need to separate the stickers as is done with the "box"-
projection. Then you would have to make the stickers on the
other "side" invisible too so as to not obscure the image. It would
be quite fun to play around with it since it would be distorted when
you rotate it without twisting, like the 3D image in your posting
would be distorted in 2D when you rotate the cube... Maybe it could
be implemented as a choice in some future version of MC4D, for
the "hardcore" cubers! :-)
/Christian
----- Original Message -----
From: dgreen@s...
To: MC4D@yahoogroups.com
Sent: Tuesday, April 09, 2002 3:18 AM
Subject: Re: [MC4D] Re: phew, at last... [4^4 solution]
hello christian,
i assume you're asking me rather than don.
yes, i wanted a completely accurate projection of a 4d cube+mirror
scene
using 4d viewpoint and direction that "sees" both objects such that
the
mirror mostly includes a 4d "reflected" view of the missing face.
The
view you described may not be complete. i think it also wouldn't be
correct since the current display is of a 4d viewpoint in a direct
line
from the center of the object through both the closest and furthest
faces. a single mirror somewhat off to that line would not display
an
axis-oriented view
that said, i just realized i may not be making the correct 3d
analogy. i
keep forgetting that our 4d projection is really analogous to
taking the
lid off a box and looking in so that the bottom of the box is a
small
square in the center, and the sides appear foreshortened arrayed
around
that furthest face. i suppose it would make some sense to think of
putting a mirror inside the box so that you can look back at the
inside
of the lid, but that suggests that the mirror would necessarily
obscure
part of the normal view of the puzzle.
it occurs to me that i don't really know what the "correct" view of
the
puzzle from the outside would look like. the only thing that seems
obvious is that you could never see more than half of the faces just
like in 3d which, while perhaps more accurate, would be harder to
operate on. though perhaps the addition of a true 4d mirror would
ameliorate that problem, especially if we allowed users to click on
hidden faces "through the mirror".
i'm not sure what you're getting at with "lines between stickers"
but i
can say that we never experimented with 4d mirrors but we did
experiment
with faithful projections of the invisible face both normally and in
wireframe, but the results were clearly unhelpful.
don, you want to jump in here and tell us what this all means and
what
would be possible or helpful?
-daniel
--- End forwarded message ---