Questions tagged [rubiks-cube]

Rubik's Cube is a 3-D combination puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik.

Rubik's Cube is a 3-D combination puzzle invented in 1974 by Hungarian sculptor and professor of architecture Ernő Rubik. Originally called the "Magic Cube", the puzzle was licensed by Rubik to be sold by Ideal Toy Corp. in 1980 via German businessman Tibor Laczi and Seven Towns founder Tom Kremer, and won the German Game of the Year special award for Best Puzzle that year.

Source: Wikipedia (Rubik's Cube)

128 questions
1
vote
0 answers

JavaFX Rubik Cube - cubie selection

I am trying to build a Rubiks Cube from scratch as my first real app using JavaFx. In the Moves class Im selecting Boxes from ObservableList based on position. The problem is that the Box.getTranslate dosent update so when I try to move the front…
1
vote
1 answer

How can I guarantee that my Rubik's cube scrambling algorithm doesn't select the same direction twice in a row?

I am working on a Rubik's Cube Timer Website, (JavaScript) and it requires a scrambling algorithm. It would be easy if it was just picking random letters from an array, but there are requirements that it needs to meet. Each Letter Represents a move…
Jakub Chaloupka
  • 177
  • 1
  • 3
  • 12
1
vote
1 answer

Any algorithm related to Rubik's Cube

I got an interesting idea yesterday. Imagine you have a Rubik's Cube with already same colours on each face. Now, if I twist it once and I know how I twist it, I could always recover the cube to its original by reversing this step. If I twist twice,…
1
vote
2 answers

rubiks cube rotation algorithm

I am currently working on an assignment to build a functioning Rubik's cube. The program does not need a GUI. But it must simulate a 3 X 3 cube with rotation behaviors and provide a graphical representation of the cube (I'm going with a flat…
India Johnson
  • 11
  • 1
  • 3
1
vote
2 answers

Is solving a 3x3x3 rubiks cube optimally classified as NP?

I'm writing something about the relation of 3x3x3 Rubiks cube and theory of computation. I've read some texts talking about the god's number and optimally solutions, but I still can't figure out if solving a rubiks cube optimally is P or NP, if it…
1
vote
1 answer

What is the best way to rotate cube in Opengl

I have a Rubik's cube displayed using OpenGl in a Java Eclipse application and I want to "rotate" this cube in response to mouse events. I started with a "naive" (isn't it ?) solution as described here: OpenGL - moving camera with mouse. With such…
Manuel Selva
  • 18,554
  • 22
  • 89
  • 134
1
vote
1 answer

Which SoC for making a Rubik's Cube Solver?

Is it wiser to use a Raspberry Pi over an Intel Galileo for making a Rubik's Cube Solver? Programming language isn't a major issue, Although Python would be slightly more preferred. The major constraint is that there is only one PWM pin on the…
Rohan Bojja
  • 655
  • 1
  • 16
  • 35
1
vote
3 answers

How to fix rotations in a Rubik's Cube?

I'm trying to create a Rubik's Cube in Flash & Papervision and i'm really stuck here. I'm up to the point where i can rotate any plane of cubes once, but after that...it's messed up because all local coordinate systems are messy. I dont really know…
Eindbaas
  • 945
  • 1
  • 8
  • 16
1
vote
1 answer

Infinite loop - Rubiks cube scrambler

I'm having a little problem with Rubiks Cube scrambler in python. There is my code: from random import randint moves = ["F", "F'", "R", "R'", "L", "L'", "U", "U'", "D", "D'", "B", "B'", "F2", "R2", "L2", "U2", "D2", "B2"] scramble = [] lenght =…
morsisko
  • 279
  • 2
  • 10
1
vote
1 answer

Making a Rubik's Cube in Matlab?

I am trying to make a 3d model of Rubik's cube. I initially tried it using the patch command vert = [0 0 0; 0 1 0; 1 1 0; 1 0 0 ; ... 0 0 1;0 1 1; 1 1 1;1 0 1]; fac = [1 2 3 4; ... 2 6 7 3; ... 4 3 7 8; ... 1 5 8 4; ... 1 2 6…
Kenneth Joseph Paul
  • 2,171
  • 2
  • 14
  • 27
1
vote
2 answers

cocoa touch: rand() returning the same string

Here's my code: -(void)randommoves { NSArray *possiblemoves =[NSArray arrayWithObjects:@"R ",@"R' ",@"L ",@"L' ",@"B ",@"B' ",@"F ",@"F' ",@"U ",@"U' ",@"D ",@"D' ", nil]; NSMutableString *finalmoves = [[NSMutableString alloc] init]; finalmoves =…
Matt S.
  • 13,305
  • 15
  • 73
  • 129
1
vote
1 answer

Creating a 3x3 Rubik's Cube in JavaFX

Im interested in working on JavaFX for the first time. I have a project i am working on, in which i dont have a lot of time to complete. I was wondering if javaFX would be a great platform to animate and make a 3x3 rubik's cube game? With all the…
user1992697
  • 315
  • 1
  • 5
  • 11
1
vote
3 answers

Rubik's cube scanning algorithm

I'm working on an augmented reality rubik's cube solving project. We want the user to be able to use an smartphone application for collecting hints on to solving a rubiks cube. For this we need to rebuild the cube in the smartphone memory. We were…
Wouter
  • 652
  • 2
  • 7
  • 27
1
vote
4 answers

Most efficient way of splitting strings like rubik's cube notations in python?

If a string like "RL2R'F2LD'" given,What is the most efficient way of splitting this into Strings "R" "L2" "R'" "F2" "L" "D'"? I'v tried few methods like first splitting them into individual chars and then trying to add them to a list and nothing…
Madushan
  • 894
  • 1
  • 10
  • 22
1
vote
3 answers

Rigging a Rubik's cube in Maya with MEL

I want to rig a Rubik's cube in Maya, so it can rotate in any direction and any number of times. Any rotation would be in 90 degree increments. These are the objects in my Outliner: 26 blocks (the center block of the cube is not necessary) 9…
1 2 3
8 9