Commit 18da9a0891a1503d58e7a3fb4bf924a913e25f9c

Authored by Georg Hopp
1 parent b2f9d492

Add a readme file

Showing 1 changed file with 70 additions and 0 deletions
  1 +# Rust playground
  2 +
  3 +Things I have recently done while learning the Rust programming language.
  4 +
  5 +## Synopsis
  6 +
  7 +Change in one of the toplevel subdirectories and try `cargo build` or
  8 +`cargo run`. Maybe not everything is working oob. Feel free to fix whatever
  9 +you want.
  10 +
  11 +## Description
  12 +
  13 +Various small examples I have tried while learning rust. The biggest and
  14 +currently most active project is **fractional** which started as an
  15 +implamentation of a rational number data type and then switched to a 3D
  16 +math playground visualizing using **XCB** (in future it might also use
  17 +a **HTML5 Canvas** for drawing as WebAssembly application.
  18 +Using fractions with 3D math has several drawbacks:
  19 +
  20 +1. A huge part of 3D math is non rational, like sin, cos, tan and sqrt.
  21 +2. The numerator and denominator tend to become very huge while nearing to non
  22 + rational numbers and reduction is difficult and time consuming.
  23 +3. Because of 2 it is way slower than the floating point calculation (at least
  24 + with a decent coprocessor).
  25 +
  26 +Anyway, implementing the vector math stuff for both fractions and floating
  27 +point was a nice playground for generics and traits. In future I might add
  28 +another data type which implements the math as done by David Braben for the
  29 +elite computer game.
  30 +
  31 +## Requirements
  32 +
  33 +### Always
  34 +
  35 +- A recent version of the Rust programming language as well as tooling.
  36 + Currently I use Rust 1.39.0.
  37 +
  38 +### For fractional
  39 +
  40 +- A running X Server with **XCB** and **X11-SHM** extentions
  41 +
  42 +## Dependencies
  43 +
  44 +...
  45 +
  46 +## Contributing
  47 +
  48 +Feel free to make pull requests as you like, no guarantee that the will be
  49 +added.
  50 +
  51 +## License
  52 +
  53 +Copyright © 2020 Georg Hopp
  54 +
  55 +This program is free software: you can redistribute it and/or modify
  56 +it under the terms of the GNU General Public License as published by
  57 +the Free Software Foundation, either version 3 of the License, or
  58 +(at your option) any later version.
  59 +
  60 +This program is distributed in the hope that it will be useful,
  61 +but WITHOUT ANY WARRANTY; without even the implied warranty of
  62 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  63 +GNU General Public License for more details.
  64 +
  65 +You should have received a copy of the GNU General Public License
  66 +along with this program. If not, see <http://www.gnu.org/licenses/>.
  67 +
  68 +## Author
  69 +
  70 +Georg Hopp <georg@steffers.org>
Please register or login to post a comment