现在是一个棘手的人;-) [英] Now a tricky one ;-)

查看:52
本文介绍了现在是一个棘手的人;-)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑这个3d向量:


const SIZE =''some_size'';

std :: vector< std :: vector< std ::矢量<炭> > > GRID(SIZE,

std :: vector< std :: vector< char>>(SIZE,

std :: vector< char>(SIZE)) );


它可以被视为三维空间中SIZE ^ 3不同点的坐标:

现在,而不是点考虑立方体。

他们每个人都有6个方面:

前面 - z +

返回 - z-

top - y +

底部 - y-

rigth - x +

左 - x -

(+/-是轴上的方向)


6个侧面中的每一个都可以打开/关闭,这样你就可以得到一个3d

的迷宫。


And现在是棘手的部分:

1.

没有点/立方体可以完全关闭,即定义它的6位

的总和必须< 6或者如果你和那些结果必须是0,那么
ect。

也只考虑使用3位来定义网格中的每个点/立方体。

2.

必须远离任何给定的点/立方体到另一个。

为了帮助这个立方体是无限/有限的,我的意思是最好的展示

举个例子:


网格的大小是16 ^ 3

很容易找到你的自我17,17,17(x,y,z)怎么没有

问题因为这个点也被定义为1,1,1(x,y,z)

现在只剩下一个问题......

如何做到这一点简单方法?

希望得到一些令人头脑清醒的想法......; - ) >

Consider this 3d vector:

const SIZE = ''some_size'';
std::vector<std::vector<std::vector<char> > >GRID(SIZE,
std::vector<std::vector<char> >(SIZE,
std::vector<char>(SIZE)));

It can be viewed as coords for SIZE^3 different points in a 3d space:
Now, instead of point consider Cubes.
They each have 6 sides:
front - z+
back - z-
top - y+
bottom - y-
rigth - x+
left - x-
(+/- being direction on the axis)

Each of the 6 sides can be turned on/off so you get like a 3d
labyrinth.

And now for the tricky part:
1.
No point/cube can be completely closed, i.e. the sum of the 6 bit
defining it must be < 6 or if you and the bits the result must be 0,
ect.
allso consider only using 3 bits to define each point/cube in the grid.
2.
There must be away from any given point/cube to another.
To help this the cube is infinite/finite, what i mean is best shown
with an example:

The Grid is the size of 16^3
Sudenly you find your self at point 17,17,17 (x,y,z) how ever it is no
problem bacause the point is allso defined as 1,1,1 (x,y,z)
Now only one question remains...
How to do it the easy way?
Hope to get some mindblowing ideas... ;-)

推荐答案

fe *** *******@hotmail.com 写道:
fe**********@hotmail.com wrote:
考虑这个3d矢量:

const SIZE =''some_size'' ;
std :: vector< std :: vector< std :: vector< char> > > GRID(SIZE,
std :: vector< std :: vector< char>>(SIZE,
std :: vector< char>(SIZE)));
现在,而不是点考虑立方体。
它们每个都有6个边:
前面 - z +
返回 - z-
顶部 - y +
底部 - y-
rigth - x +
left - x -
(+/-是轴上的方向)

6个侧面中的每一个都可以打开/关闭,所以你就像一个3d迷宫。

现在,这个棘手的部分:
1.
没有点/立方体可以完全闭合,即定义它的6位的总和必须是< 6或者如果你和结果必须为0,那么
等等也只考虑使用3位来定义网格中的每个点/立方体。
2.
那里必须远离任何给定的点/立方体到另一个。
为了帮助这个立方体是无限/有限的,我的意思是最好的显示
一个例子:

网格是16 ^ 3的大小
你发现你的自我在17,17,17(x,y,z)点如何没有
问题因为这个点被定义为1,1 ,1(x,y,z)

现在只剩一个问题......
如何轻松实现?


如果只是这个问题是适当的。什么是*它*?


选项:


a)定义一个数据结构来模拟情况。

b )测试给定的数据集是否满足条件(1)和(2)。

c)编写图形界面以在屏幕上显示模型。

d)写一个模拟穿过那个迷宫的老鼠。

e)...

请更具体一点。


希望得到一些令人兴奋的想法...; - )
Consider this 3d vector:

const SIZE = ''some_size'';
std::vector<std::vector<std::vector<char> > >GRID(SIZE,
std::vector<std::vector<char> >(SIZE,
std::vector<char>(SIZE)));

It can be viewed as coords for SIZE^3 different points in a 3d space:
Now, instead of point consider Cubes.
They each have 6 sides:
front - z+
back - z-
top - y+
bottom - y-
rigth - x+
left - x-
(+/- being direction on the axis)

Each of the 6 sides can be turned on/off so you get like a 3d
labyrinth.

And now for the tricky part:
1.
No point/cube can be completely closed, i.e. the sum of the 6 bit
defining it must be < 6 or if you and the bits the result must be 0,
ect.
allso consider only using 3 bits to define each point/cube in the grid.
2.
There must be away from any given point/cube to another.
To help this the cube is infinite/finite, what i mean is best shown
with an example:

The Grid is the size of 16^3
Sudenly you find your self at point 17,17,17 (x,y,z) how ever it is no
problem bacause the point is allso defined as 1,1,1 (x,y,z)
Now only one question remains...
How to do it the easy way?
If only that question was well-posed. What is *it*?

Options:

a) define a data structure to model the situation.
b) test whether a given set of data satisfies conditions (1) and (2).
c) write a graphics interface to display the model on screen.
d) write a simulation of mice running through that labyrinth.
e) ...

Please, be more specific.

Hope to get some mindblowing ideas... ;-)




祝你好运。

最好


Kai-Uwe Bux



Good luck.
Best

Kai-Uwe Bux


我认为我做了足够的解释,这是我前一段时间的想法,但

i真的不需要帮助它atm,虽然这将是一个讨论的有趣的子喷气机。

生病再尝试解释。


a)定义一个模拟3d迷宫的数据结构,rubrikscube

like,即一个包含多维数据集的多维数据集。

b)测试条件1和2是否为真,如果没有解决问题。

条件1.

立方体可以完全关闭

条件2.

必须远离任何给定的点/立方体到另一个。

为了帮助这个立方体是无限/有限的,我的意思是最好的显示

的例子:


网格的大小为16 ^ 3

很容易在17,17,17(x,y,z)点找到你的自己怎么回事


问题因为这个点也被定义为1,1,1(x,y,z)


c)一个三维图形界面在迷宫中四处走动会很好,但不是我对任何人的期待,而是我的自我。

(将来的某个时间)

d)来自想法/ oppinions。


我不能写任何比这更简单的东西,sry ;-)

I thought i did enough explaining, its an idea i got some time ago, but
i dont really need help with it atm, just though it would be an
interesting subjet to discuss.
Ill try to explain again.

a) Define a data structure to simulate a 3d labyrinth, rubrikscube
like, i.e. a cube containing cubes.
b) test whether condition 1 and 2 is true, if not solve the problem.
Condition 1.
cube can be completely closed
Condition 2.
There must be away from any given point/cube to another.
To help this the cube is infinite/finite, what i means is best shown
with an example:

The Grid is the size of 16^3
Sudenly you find your self at point 17,17,17 (x,y,z) how ever it is no

problem bacause the point is allso defined as 1,1,1 (x,y,z)

c) A 3d graphics interface to move around in the labyrinth would be
nice, it is however not something i expect from anyone but my self.
(sometime in the future)
d) Come with ideas/oppinions.

I dont thing i can write it any simpler than this, sry ;-)


*****************

条件1.

立方体不能完全关闭

*****************

*****************
Condition 1.
cube can''t be completely closed
*****************


这篇关于现在是一个棘手的人;-)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆