Skip to content

Graphical toolbox for plotting and interpreting 2-dimensional vector fields in physics and engineering

License

Notifications You must be signed in to change notification settings

papadeiv/PlotiPhy2D

Repository files navigation

PlotiPhy2D - Plotter and Intepreter for 2-dimensional Physics

A light and fast 2D plotter to visualise and interpret stationary vector fields with run-time adjustments. Vector fields are vector-valued functions that map any point of a subset of a d-dimensional Euclidean space to a unique D-dimensional vector. In physics, vector fields of interest s.a. the velocity field of a fluid, the electric field of a certain charge distribution or the (classical) gravitational field of a three-body problem, are defined over the d=D=3 Euclidean space with dimensions (x,y,z). PlotiPhy2D restricts both the input d and output D space dimensions to 2 by plotting those physical vector fields defined over a discretised grid of a infinite continuous plane of Cartesian coordinates (x,y). Here's an example produced by the tool library of a 2D electric field E(x,y) generated by a discrete distribution of point-like charges.

The graphics and rendering has been implemented using SFML while the rest of the code is original.

Dependencies

Aside from the aforementioned SFML, to use this program without any alteration to its source code the user must download and compile the following third-party software:

$ sudo apt update
$ sudo apt install build-essential

which automatically installs both dependencies.

Build and execution

The easiest and most straightforward option for building PlotiPhy2D from source is to use Make with GCC. Invoking make from the top-level directory of this repository will compile PlotiPhy2D source files and link with SFML's necessary modules. In such rule it is included the automatic execution of the resulting executable file PlotiPhy however the user can easily disable that by commenting out line 3 of the makefile. Also the rule make clean will remove all the .o object files generated by the compiler alongside the executable file itself.

Usage

At the current state, PlotiPhy2D only impelements 2D static electric field with an arbitrary large amount of point-like charges distributed on the screen with no GUI. Users can interact with the window by either pressing the right or left button to create on the window cursors' spot a positive or negative charge respectively.

About

Graphical toolbox for plotting and interpreting 2-dimensional vector fields in physics and engineering

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published