Track generator
Project description
# Track Generator
Simple generator to create tracks (ground textures for vehicle simulations) from parametric descriptions.
For example, the following parametric description of a track in XML will lead to the corresponding result:
Track definition (XML):
![track definition example](doc/img/png/track_definition_example_0.png)
Output (SVG, optional PNG):
![track output example](doc/img/png/track_output_example_0.png)
## Usage
Create a virtual environment
python -m venv venv # Windows: venvScriptsactivate # Linux (bash): source venv/bin/activate
Install via pip:
pip install track_generator
Run:
track_generator generate_track <TRACK_DEFINITION_FILE>
## Setup dev environment
### Clone project, setup venv and install requirements:
git clone git@github.com:twyleg/track_generator.git cd track_generator/ python -m venv venv source venv/bin/acitvate.bash pip install -r requirements.txt
### Run with example track definition:
python track_generator/generator.py examples/simple_track_example
### Build software and binary distribution:
python setup.py sdist bdist_wheel
### Deploy
TestPyPI:
python -m twine upload –repository-url https://test.pypi.org/legacy/ dist/*
PyPi:
python -m twine upload dist/*
## Coordinate systems
Track generator uses a right hand side cartesian coorindate system internally. drawSvg on the other hand uses a left hand side cartesian coordinate system. This is important for internal operations but shouldn’t bother the user.
![coordiante systems](doc/img/svg/coordinate_systems.svg)
## Examples
Example track definitions can be found under [examples/](examples/)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for track_generator-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 240784248175e386bc402b2c4783c0a7cca95cb2f57e811dd52c8d11bd95626f |
|
MD5 | 6c1e83317be161d928254719eb9b28ee |
|
BLAKE2b-256 | 8fc4ec1eea34b1c6bab43ab4f75c35804ec70fd8f36cc65e3ff4e2e65bdd2a17 |