GithubHelp home page GithubHelp logo

rubiks-cube's Introduction

Rubiks cube simulation in OpenGL

This project is the simulation of 3D Rubiks cube which is done using C and OpenGl Library.

Installation in Ubuntu

  • Install glut.h library sudo apt-get install freeglut3-dev
  • Install make sudo apt-get install make
  • Run make
  • Run ./rubiks

Controls

This Rubiks Cube simulation is controlled using Keyboard. The different controls are -

Quitting the simulation

  • Esc : Quits the simulation window

Rotation of Whole cube

  • a : Rotates Left
  • d : Rotates Right
  • w : Rotates Up
  • s : Rotates Down

Rotation of sides of the cube by 90 degree

  • t : Rotates Top clockwise

  • T : Rotates Top anti-clockwise

  • c : Rotates Middle from top clockwise

  • C : Rotates Middle from top anti-clockwise

  • v : Rotates Bottom clockwise

  • V : Rotates Bottom anti-clockwise


  • f : Rotates Front clockwise

  • F : Rotates Front anti-clockwise

  • m : Rotates Middle from Front clockwise

  • M : Rotates Middle from Front anti-clockwise

  • b : Rotates Back clockwise

  • B : Rotates Back anti-clockwise


  • l : Rotates Left clockwise

  • L : Rotates Left anti-clockwise

  • x : Rotates Middle from Left clockwise

  • X : Rotates Middle from Left anti-clockwise

  • r : Rotates Right clockwise

  • R : Rotates Right anti-clockwise

Demo

Demo

rubiks-cube's People

Watchers

 avatar

Forkers

whynot2018

rubiks-cube's Issues

build-essential need it.

$ make
gcc rubiks.c  -o rubiks -lglut -lGLU -lGL -lm 
make: gcc: No such file or directory
make: *** [Makefile:7: target] Error 127

I have to say It's a great code.
Additionally need to install.

sudo apt install build-essential

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.