Because solving a Rubik's cube with your hands wasn't hard enough...
Welcome to Cuber_3D - the world's most over-engineered way to get frustrated at a colorful cube! This project lets you control a 3D Rubik's cube using hand gestures, because apparently clicking and dragging is for peasants.
Cuber_3D is a hand-controlled 3D Rubik's cube simulator that uses computer vision to track your hands and let you manipulate the cube with gestures. It's like having superpowers, except the only thing you can do is scramble a cube and then stare at it in defeat.
- Two-Hand Control System: Because one hand is for quitters
- ๐ค Left hand: Pinch to grab the entire cube (like you're holding your last hope)
- ๐ Right hand: Point at layers to select them, then pinch and twist your wrist like you're opening a very stubborn jar
- Real-time Hand Tracking: Watch as the program perfectly tracks your hands... 60% of the time, every time
- Layer Rotation: Twist wrist to rotate layers (warning: may cause actual wrist cramps)
- Visual Feedback: Pretty colors that make you feel smart even when you're not
- Webcam Display: So you can see yourself looking confused in real-time
First, make sure you have Python installed. Then install the dependencies:
pip install ursina opencv-python pillow mediapipe numpyNote: Installing these packages may take longer than actually solving a real Rubik's cube
-
Run the script:
python cuber_3d.py
-
Position yourself in front of your camera like you're about to take the world's most intense selfie
-
Left Hand Controls (The Gentle Giant):
- Make a pinch gesture (thumb + index finger) to grab the cube
- Move your hand around to position the cube
- Rotate your hand to rotate the entire cube
-
Right Hand Controls (The Precision Instrument):
- Point your index finger at any layer to select it (yellow wireframes will appear)
- Pinch with your right hand
- Rotate your wrist clockwise or counter-clockwise to rotate the selected layer
- Try not to look like you're casting a spell
-
Visual Feedback Decoder Ring:
- White cube = "I'm free as a bird!"
- Light gray cube = "Someone's holding me!"
- Yellow cube = "Both hands are active, things are getting serious!"
- Yellow wireframes = "This layer is selected for rotation"
Because sometimes technology fails us:
- WASD - Move the cube around like it's 1999
- Q/E/R/F/Z/C - Rotate the cube (for when you miss the good old days)
- Space/Shift - Move up/down
- Enter - Reset everything and start your existential crisis over
- B - Toggle webcam (for when you can't bear to watch yourself struggle)
- Escape - Quit (no shame in this)
For testing layer rotations without flailing your arms:
- 1-6 - Test different layer rotations
- Perfect for when you want to pretend you're good at this
- Python 3.7+
- A webcam that actually works
- Patience (lots of it)
- A sense of humor about your hand-eye coordination
- Optional: A real Rubik's cube to throw when this gets frustrating
Q: The hand tracking isn't working! A: Make sure you have good lighting and try not to blend into your background. The AI needs to see you to judge you.
Q: The cube isn't responding to my gestures! A: Try making more dramatic gestures. Think "conducting an orchestra" rather than "gently waving hello."
Q: I can't solve the cube! A: That's not a bug, that's a feature. Welcome to the club! ๐
Found a bug? Want to add features? Think you can make this even more chaotic? Pull requests welcome!
Just remember: with great power comes great responsibility to make this even more unnecessarily complicated.
This project is licensed under the "Do Whatever You Want But Don't Blame Me When Your Wrists Hurt" license.
Created by @Omdeepb69 - A person who clearly has too much time and too many ideas.
Special thanks to:
- The Rubik's cube, for being unsolvable since 1974
- My webcam, for witnessing my failures
- Coffee, for making this possible
- My neighbors, for tolerating the strange arm movements
Remember: It's not about solving the cube, it's about the friends we confused along the way. ๐ฒ
Warning: May cause uncontrollable urge to buy an actual Rubik's cube and immediately regret it.