Bit7eg / 3DPlot

Program to plot any set of points in 3 dimensional space according to given conditions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3DPlot

Description

This program was made for my friend. 3DPlot can plot any set of points in 3 dimensional space according to given conditions. As well it let see figure from different angles.

Build

3DPlot sources can be built using cmake

Usage

Controls

  • W - moves camera forward
  • A - moves camera left
  • S - moves camera backward
  • D - moves camera right
  • SHIFT - moves camera up
  • CTRL - moves camera down
  • MOUSE WHEEL - zooming
  • ESC - close program

Configuration

Scene configuration is in config.txt file. 3DPlot supports the folowing options:

  • WIDTH - sets window width (default: 800)
  • HEIGHT - sets window height (default: 600)
  • FIGURE - sets figure file name (no defaults, required)
  • FIGURE_COLOR - sets figure color using RGB format (default: 0.5 0.5 0.5)
  • FIGURE_TRANSPARENCY - sets figure transparency, where 0.0 - opaque and 1.0 - transparent (default: 0.5)
  • CAMERA_POSITION - sets start position for camera (default: 0.0 0.0 0.0)
  • HORIZONTAL_CAMERA_ROTATION - sets the angle of horizontal camera rotation (default: -π/2)
  • VERTICAL_CAMERA_ROTATION - sets the angle of vertical camera rotation (default: 0.0)
  • CAMERA_MOVING_SPEED - sets camera moving speed (default: 5.0)
  • MOUSE_SENSITIVITY - sets camera rotation speed (default: 2.0)
  • VIEWING_ANGLE - sets field of view angle (default: π/4)
  • ZOOM_SPEED - sets speed of zooming (default: 0.1)
  • STEP_SIZE - sets size of one step in ray modeling. It affects performance and lines thickness (defaults: 0.01)
  • VIEW_DISTANCE - sets maximum rays length. It affects performance and view distance (defaults: 10.0)

Figures

Figures files are stored in figures directory. This files are part of fragment shader. To describe your own figure you should write a code fragment using GLSL. This code fragment should return boolean using return command. You can use vec3 variable point to access the current point. If you want check equality of two float values, you should use isEquals() function instead of == operator.

About

Program to plot any set of points in 3 dimensional space according to given conditions

License:GNU General Public License v3.0


Languages

Language:C++ 53.5%Language:C 45.8%Language:Objective-C 0.5%Language:CMake 0.1%Language:GLSL 0.1%