Code Monkey home page Code Monkey logo

3d-graphics-engine's Introduction

3D Graphics Engine

Opis | Description

🇵🇱

3D Graphics Engine to aplikacja konsolowa symulująca przebywanie w przestrzeni 3D poprzez zastosowanie rzutu perspektywicznego. Po uruchomieniu aplikacji pojawia się czarna scena z kamerą umieszczoną w punkcie (0,0,0). Kamerą można się ruszać w czterech kierunkach (wschód, zachód, północ, południe), obracać oraz przybliżać i oddalać. Ruch kamery ma imitować przemieszczanie się użytkownika w przestrzeni. Na scenie rozmieszczone są trójwymiarowe bryły (dla aplikacji testowej jest to sześcian, stożek oraz dwudziestościan foremny). Bryły zostały utworzone w programie Blender oraz zaimportowane jako plik .obj. Aplikacje rozpoznaje zapis w postaci pozycji krawędzi oraz wierzchołków i za pomocą metod DrawVertex oraz DrawContours rysuje bryły. Dodatkowo, bryły pokryte są algorytmem malarskim oraz zaimplementowane zostało cieniowanie płaskie z wykorzystanie pojedynczego, punktowego źródła światła.

🇺🇸

3D Graphics Engine is a console application which goal is to simulate 3D space by using perspective projection. After launching the app, black scene and camera located at point (0,0,0) appears. Camera can be moved in all four directions (east, west, north, south), rotated and zoomed in/out. Camera movement is supposed to imitate player's movement in the space. There are different 3D objects in the scene (for testing purposes it is a cube, a cone and an icosahedron). Objects were created in Blender program and imported as .obj files. App can read this format with edges and vertexes positions and with a help of DrawVertex and DrawContours methods can draw those objects. Additionally, objects are covered with painter's algorithm and there is flat shading implementation with single, punctual light source.

Zrzuty ekranu | Screenshots

Pozycja startowa | Starting position

w1

Ruch w lewo | Left side movement

w2

Ruch do góry | Upside movement

w3

Ruch w prawo | Right side movement

w4

Sterowanie | Controls

  • WSAD - ruch kamery | camera movement
  • Z/X - przybliżanie/oddalanie | zooming in/out
  • M - rotacja osi X | X axis rotation
  • N - rotacja osi Y | Y axis rotation
  • B - rotacja osi Z | Z axis rotation

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.