魔方吧·中文魔方俱乐部

 找回密码
 注册
搜索
热搜: 魔方
楼主: sliant
打印 上一主题 下一主题

[讨论]尝试写的一个魔方的模拟器程序,希望大家给点意见 [复制链接]

Rank: 10Rank: 10Rank: 10

积分
24819
帖子
4854
精华
33
UID
3
性别
兴趣爱好
结构
11#
发表于 2005-3-26 23:11:09 |只看该作者

五阶步法演示--国际通用表示法(MorrisENG)

MorrisENG
顺90
逆90
180
顺90
逆90
180
顺90
逆90
180
顺90
逆90
180
顺90
逆90
180
顺90
逆90
180
第一层旋转
U
U'
U2
D
D'
D2
L
L'
L2
R
R'
R2
F
F'
F2
B
B'
B2
一二层旋转
Uu
Uu'
Uu2
Dd
Dd'
Dd2
Ll
Ll
Ll2
Rr
Rr'
Rr2
Ff
Ff'
Ff2
Bb
Bb'
Bb2
第二层旋转
u
u'
u2
d
d'
d2
l
l'
l2
rr
r'
r2
ff
f'
f2
b
b'
b2
整体旋转
Y
Y'
Y2
Y'
Y
Y2
X'
X
X2
X
X'
X2
Z
Z'
Z2
Z'
Z
Z2

-,'''╭⌒╮⌒╮.',''',,',.'',,','',.,,'
.╱◥██◣''o┈ 魔方吧 ┄o.'',,',.
︱田︱田田︱ '',,',.o┈ 欢迎您光临 ┄o
╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬

使用道具 举报

Rank: 2

积分
268
帖子
7
精华
0
UID
168
性别
12#
发表于 2005-3-28 12:40:35 |只看该作者

回复:(sliant)[讨论]尝试写的一个魔方的模拟器程序...

已经支持脚本了。支持的记法还不全面,不过可以自己添加、定义,上面有讲怎么做。

花了不少时间,短期内可能再抽不出时间来完善这个程序了。

感谢cube_master和大烟头给的资料,感谢老猫给我的例程,感谢roundy给的3d原理。

祝大家顺心如意,我要睡觉去了!bye

使用道具 举报

Rank: 8Rank: 8

积分
824
帖子
59
精华
4
UID
6413
性别
13#
发表于 2006-8-16 19:47:14 |只看该作者

回复:(sliant)[讨论]尝试写的一个魔方的模拟器程序...

我与你兴趣相同。我已经用纯java写了一个虚拟魔方(可解2-8阶)和一个虚拟五魔方<br>(可自动解,两种解法),均采用三维模拟。可自动解的五魔方为首创。3阶魔方平均<br>可在68步之内解得,6阶魔方平均可在530步之内解得。五魔方平均可在206步之内解<br>得。可惜我无法将之汉化,因为我没有汉化环境。欢迎测试,欢迎指教,连接如下<br><br>http://www.geocities.com/hua_jz/index.html<br><br>测试版中有些功能被锁住了,但是2阶和3阶初级解法完全工作。正版须买执照。须<br>安装java虚拟环境J2SE JRE1.4或高级。可预览界面。

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

14#
发表于 2006-9-12 08:42:51 |只看该作者

 

    Megaminx 的 JAVA 软件的面世,使大家在网上直接浏览含 Megaminx 的网页成为可能。
本人谨在这里向 rubikmaster 先生表示感谢和支持!

    (可自动解的 JAVA 五魔方) 可能是您 首创。但是(可自动解的 其他语言 五魔方)
好象早已存在多年了。 如果我说错了,那或许说明 您 很早以前就开发了 五魔方 软件。

    如果 rubikmaster 先生感觉对于 汉化 Megaminx 的 JAVA 软件有困难,本人愿意帮助
您汉化,只是本人 English 水平很烂,需要您提供一份准确的 (English -> 中文) 对照
翻译好的文本,以便本人汉化。      附:文本格式如下:

File 文件
Edit 编辑
Help 帮助
save 保存
exit 退出
about 关于
English 英文
Chinese 中文
computer 计算机
These are sheep.  这是些羊。

等等。

    对于长句子,也要 对应 长句整体 翻译 (注:不要 逐词 翻译,必须 整句翻译)。
 

~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
4787
帖子
1876
精华
12
UID
93
性别

魔方理论探索者 十年元老

15#
发表于 2006-9-12 08:44:02 |只看该作者

 

    rubikmaster 先生可以通过以下两种途径进行汉化:

    1.直接发给我 minxseqviewer.jar ,本人直接汉化其内部 *.class 文件;(临时方案)
(此方案汉化工作烦琐,而且仅能汉化一个版本)

    2.压缩发给我 Megaminx 软件中所有 *.Java 及 相关文件,本人汉化源文件,然后发给
您进行修改编译 以及 升级维护;(终极方案)(此方案工作量小,软件可以终身升级维护)


    rubikmaster 先生可以通过  Email:   ggglgq@sina.com.cn  与本人联系。

~~ 宇宙在旋转运动 ~~ 魔方在循环变换 ~~

使用道具 举报

Rank: 8Rank: 8

积分
824
帖子
59
精华
4
UID
6413
性别
16#
发表于 2006-9-18 12:40:22 |只看该作者

回复:(ggglgq rubikmas...

先谢谢你乐意帮这个忙,但我不建议将我的软件直接汉化,我更倾向于将我的说明文件翻译成中文,以方便大家使用,有兴趣的魔友不妨试一试。现将英文说明粘贴如下:
<h3>Introduction</h3>
<p>
Most people would think that Megaminx is harder to solve than Rubik's Cube because it has more
faces and pieces? This software shows you that Megaminx is indeed easier to solve than Rubik's Cube. Why is it so?
Becuase Megaminx got more faces. When you are fixing the first few layers, you got plenty of free layers which give you lots
of freedom to adjust the position of your target pieces. You can fix much of the Megaminx without even learning a single
formula. But this is not the case for Rubik's Cube, once the first layer is fixed, the only free layer is the opposite layer.
The real difficulty of solving Megaminx is the last layer. Fortunately, there is a simple elegant method to solve the last
layer. This method can be used to solve Rubik's Cube as well. The two methods embedded in Megaminx Solver are designed for 12
colored Megaminx, but it can be easily modified to solve 6 colored Megaminx in which parity problem may arise. This is a
little challenge left for the readers.


<h3>Introduction</h3>
<p>
Most people would think that Megaminx is harder to solve than Rubik's Cube because it has more
faces and pieces? This software shows you that Megaminx is indeed easier to solve than Rubik's Cube. Why is it so?
Becuase Megaminx got more faces. When you are fixing the first few layers, you got plenty of free layers which give you lots
of freedom to adjust the position of your target pieces. You can fix much of the Megaminx without even learning a single
formula. But this is not the case for Rubik's Cube, once the first layer is fixed, the only free layer is the opposite layer.
The real difficulty of solving Megaminx is the last layer. Fortunately, there is a simple elegant method to solve the last
layer. This method can be used to solve Rubik's Cube as well. The two methods embedded in Megaminx Solver are designed for 12
colored Megaminx, but it can be easily modified to solve 6 colored Megaminx in which parity problem may arise. This is a
little challenge left for the readers.

<p>
To view the applet, your browser must support JRE1.4 (Java Runtime Environment) or higher. You can
<a href="http://java.sun.com/javase/downloads/index.jsp">download J2SE JRE</a> from Sun.
After the download, you need to install JRE on your system by following the installation instruction.

<p>
<B>Main features of Megaminx Solver </B>

<uL>
<LI>A twist can be triggered by a mouse click or a mouse drag. Clicking a center cube with the left mouse button will trigger
 an anti-clockwise turn of 72 degree, while clicking a center cube with the right mouse button will trigger a clockwise turn of 72 degree.
 Dragging a non-center cube to its adjacent non-center cubes will also trigger a turn of 72 degree along the dragging direction only
 if the mouse moves on the same face.
<LI>The virtual dodecahedron can be viewed from any angle by dragging the mouse on center cubes or on the background area even when a twist is in action.
 It is a true 3D simulation.
<LI>Each face has been labelled with a letter (N, A, B, C, D, E, S, F, G, H, I, J). Face labels can be turned on/off.
<LI>Standard definition of a move/twist using face labels is given and has been incorporated in the solver.
<LI>Two algorithms are embedded, one solves the puzzle in about 266 moves and the other solves the puzzle in about 206 moves.
 The solution sequence will be shown in the sequence executor. Both algorithms are human understandable.
<LI>7 navigation buttons are provided to allow a user to navigate the solution sequence back and forth. A track counter will display
 the number of the current move and the length of the solution sequence.
<LI>While a solution sequence is being navigated by "Forward" or "Back" buttons, the next move will be shown in a diagram which can
 be easily understood.
<LI>While a solution sequence is being navigated, cubes that are being targeted in current operation will be highlighted,
 which helps the user to understand how highlighted cubes are fixed.
<LI>While a solution sequence is being navigated, a user can hide all cubes that are irrelevant to the current step which
 will be fixed in later steps and therefore can be freely disturbed, only cubes that have been fixed or are being
 fixed in current step are shown in full colors.
<LI>While a solution sequence is being navigated, a step indicator will show what is the current step and the message window
 will explain how this is done.
<LI>Center colors are configurable. It allows a user to paint the virtual MEgaminx so that it matches the colors of a physical
 Megaminx (with 12 colors). The solver can instruct the user to solve his/her Megaminx puzzle step by step.
 It provides an opportunity for a user to solve his/her own Megaminx without even learning any algorithm or method.
<LI>The sequence executor allows a user to enter his/her sequence and get it executed. It provides an opportunity for a user
 to develop his/her own formula. It also provides an opportunity for users to exchange their formulae through the sequence executor.
<LI>The solver also provides functions such as scrambling the virtual MEgaminx using randomly generated sequence, restoring the Megaminx to
 solved position instantly, adjusting puzzle size and adjusting rotation speed.
</UL>


<p>
<h3>Terminology</h3>

A <i>single turn</i> means a face / layer being twisted by 72 degree around its center. Each face has been given a label
(N, S, A, B, C, D, E, F, G, H, I, where N means north and S menas south). Face labels are fixed, however face colors
can be changed through painting.
A <i>move</i> or <i>twist</i> can be represented using face characters and turn symbols (', 1, 2, -1, -2)
according to the following rules:

<ul type="disc">
 <li>A single face character represents a single turn clockwise of that face.
 <li>A single face character followed by 2 represents a double turn clockwise of that face.
 <li>A single face character followed by ' or -1 represents a single turn anti-clockwise of that face.
 <li>A single face character followed by '' or -2 represents a double turn anti-clockwise of that face.
</ul>

We adopt terminology suggested by Professor Kurt Endl. We think the dodecahedron as a globe and refer corners and edges according to their location relative to north pole and south pole. In Megaminx Solver, the center labelled with "N"
will be treated as North Pole, and the center labelled with "S" will be treated as "South Pole". Centers labelled with "A", "B",
"C", "D", "E" are located at northern hemisphere and centers lablled with "F", "G', "H", "I", "J" are located at southern hemisphere. The following diagrams illusitrate the classification of corners and edges.

<h3>How to play Megaminx Solver</h3>

A move or twist can be triggered by a mouse click or a mouse drag.
<ul>
 <li>Clicking a center cube with the LEFT mouse button will trigger an ANTI-CLOCKWISE turn.
 <li>Clicking a center cube with the RIGHT mouse button will trigger a CLOCKWISE turn.
 <li>Dragging a non-center cube to its adjacent non-center cubes will also trigger a turn long the dragging
  direction if the mouse moves on the same face.
</ul>

The megaminx can be viewed from different angles by rotating the whole megaminx. To rotate the whole megaminx,
just drag on any center cube or drag the mouse on the background area (the area that is
not covered by the megaminx).

<p>
Some useful buttons under Configure:

<ul>
 <li>Cube Size -- adjust the size of the megaminx
 <li>Rotating Speed -- adjust rotating speed
 <li>Face Label -- turn the face label on or off
 <li>Hide/Show -- hide or show cubes that are irrelavant to the current step. It is only effective when an animated solution
  is being reviewed. When "hide" is active, only cubes that are fixed or targeted will be shown, cubes that are
  irrelavant to the current step and hence will be dealt with in a later step are hidden (shown with gray color).
</ul>

<p>
Some useful buttons under Tools:
<ul>
 <li>lay -- play the megaminx by clicking or dragging the mouse
 <li>aint -- paint the megaminx with colors to match the colors on your megaminx.
 <li>Scramble -- scramble the megaminx using randomly generated sequences
 <li>Restore -- restore the megaminx to its solved positition (each face has a solid color).
 <li>Solve -- solve the megaminx using selected method, animated solution can then be viewed with the
  navigation buttons, targeted cubies will be hightlighted, the next move will be shown at the
  bottom left corner of the megaminx panel.
</ul>

To execute a sequence, first type in your sequence in the text field below the cube panel, then
press the "Enter" key. The sequence entered must conform the convention stated below.

<p>

<h3>How to paint Virtual Megaminx</h3>

Select 'Paint' under 'Tools' to enter painting model. It is a good practice to start painting on a solved megaminx.
The first thing you need to do is to adjust center colors.
Right click a color button below the tree panel to open the color chooser. Select a color that matches
the corresponding center color on your megaminx. Once you are happy with all center colors, then you can start to
paint edges and corners. Left click a color button to select the color as the active painting color, a small pentagon
filled with that color will be drawn on the bottom left corner of the megaminx panel. Click a face on any edge cube
or corner cube to paint that face with the active color. Note that you cannot paint a center face using this method.
The center color can only be changed by right clicking the corresponding color button. Once you finish painting all
cubes, you can select 'Solve' under 'Tools' to ask the simulator to solve it. If the color configuration is invalid,
it will return to painting model immediately. Double check each face, and make sure all colors match the corresponding
colors on your megaminx. To exit the painting model at any time, select "Play", "Scramble", "Restore" or "Solve" under "Tools".
<h3>Screen shots of Virtual Megaminx</h3>

<h3>Jeff's method</h3>

This is the simplest method as far as I know. It solves the megaminx in 266 moves on average.
The Megaminx is solved according to the following order:

<OL>
 <LI>Fix south pole edges
 <LI>Fix four south pole corners
 <LI>Fix four southern equatorial edges
 <LI>Fix the last south pole corner
 <LI>Fix the last southern equatorial edge
 <LI>Fix southern equatorial corners
 <LI>Fix middle equatorial edges
 <LI>Fix four pairs of northern equatorial corners and edges, leaving the fifth pair as key holes
 <LI>Fix north pole edges and the last northern equatorial edge
 <LI>lace north pole corners and the last northern equatorial corner (ignore orientations)
 <LI>Fix orientations of north pole corners and the last northern equatorial corner
</OL>

<h3>Hua's method</h3>
Hua's method improves Jeff's method by fixing south pole corners and southern equatorial edges in pairs and
fixing southern equatorial corners and middle equatorial edges in triples and also
fixing northern equatorial corners and edges in pairs. It solves the megaminx in 206 moves on average.
According to Hua's method, the Megaminx is solved in the following order:

<OL>
 <LI>Fix south pole edges
 <LI>Fix south pole corners and southern equatorial edges in pairs
 <LI>Fix southern equatorial corners and middle equatorial edges in triples
 <LI>Fix four pairs of northern equatorial corners and edges
 <LI>Fix north pole edges and the last northern equatorial edge
 <LI>lace north pole corners and the last northern equatorial corner (ignore orientations)
 <LI>Fix orientations of north pole corners and the last northern equatorial corner
</OL>

<h3>Contact </h3>

Megaminx Solver was developed by Jiuzhao Hua. All rights reserved. All queries should be directed to hua_jz@hotmail.com.

<p>
Last updated on 1 August 2006.

使用道具 举报

Rank: 2

积分
253
帖子
13
精华
0
UID
7439
性别
17#
发表于 2006-11-27 20:13:17 |只看该作者
支持

使用道具 举报

Rank: 2

积分
449
帖子
415
精华
0
UID
33798
性别
保密
18#
发表于 2008-7-2 23:00:39 |只看该作者
?????看不懂啊~~

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

Archiver|手机版|魔方吧·中文魔方俱乐部

GMT+8, 2024-5-13 20:33

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部