项目作者: fredhii

项目描述 :
It is an isometric projection of a grid that rotates using arrow keys or WASD keys.
高级语言: C
项目地址: git://github.com/fredhii/Raise_the_terrain.git
创建时间: 2020-05-10T17:04:13Z
项目社区:https://github.com/fredhii/Raise_the_terrain

开源协议:MIT License

下载


Contributors
Forks
Stargazers
Issues
LinkedIn



Raise The Terrain




Plot a 3D grid



Report Bug
·
Request Feature




About this project

It is an isometric projection of a grid that rotates using arrow keys or WASD keys,
This project was created using SDL2 and C programming Language).

How does it work?

  • It Reads a file “file_demo”.
  • It Generates a window
  • Gets the coordinates of each point from the file
  • Rotates the grid, when the user press the keys
  • Finish program when the user press ESC key or clocks on window Quit button

Requirements

  • SDL2 Lirary

Usage

1) Clone this repository

  1. $ git clone https://github.com/fredhii/Raise_the_terrain

1.1) Install SDL2 (Skip this step if you already have it)

  1. $ chmod 755 0_install_SDL2.sh
  2. $ sudo ./0_install_SDL2.sh

2) Compile the program

  1. $ gcc -Wall -Werror -Wextra -pedantic *.c -lm $(sdl2-config --cflags --libs) -o raise_the_terrain

3) Run the program

  1. $ ./raise_the_terrain <file>


Controls

Keyboard Description
ESC Close program
W or Up Arrow Rotates grid upward
A or Left Arrow Rotates grid clockwise
S or Down Arrow Rotates grid downward
D or Right Arrow Rotates grid counter-clockwise


Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.