This repository has been archived on 2024-05-19. You can view files and clone it, but cannot push or open issues or pull requests.
l-systems/README.md
2024-05-06 15:11:14 +02:00

71 lines
1.8 KiB
Markdown

# L-Systèmes
> Pré-requis : [Python 3](https://www.python.org/) et [Saxon](https://github.com/Saxonica/Saxon-HE)
## Usage
Le convertisseur est [converter.py](./converter.py).
```sh
$ python converter.py l-systems.csv
```
<!--
Pour générer : python converter.py l-systems.csv -o l-systems.xml
Pour valider : xmllint --schema l-systems.xsd l-systems.xml 1>/dev/null
Pour tortue : java -jar saxon-he-10.3.jar -s:l-systems.xml -xsl:tortue.xsl -o:tortue.xml nom=qqch n=10
Pour valider : xmllint --schema tortue.xsd tortue.xml 1>/dev/null
Pour traceur : java -jar saxon-he-10.3.jar -s:tortue.xml -xsl:traceur.xsl -o:traceur.xml
Pour valider : xmllint --schema traceur.xsd traceur.xml 1>/dev/null
Pour SVG : java -jar saxon-he-10.3.jar -s:traceur.xml -xsl:svg.xsl -o:image.svg
Max avant crash :
- snow 5
- koch 2
- koch1 2
- koch2 3
- koch3 3
- koch4 3 <-- bug centre svg
- koch5 4
- dragon 12 <-- bug centre svg
- sierp 7
- gosp6 4
- gosp4 2
- br1 3 (max 5)
- br2 3 (max 5)
- br3 3 (max 6)
- htree 11 <-- moche ?
-->
Autrement, pour aider à l'utilisation, il est possible d'utiliser le Makefile.
```sh
$ make nom=snow n=3 # génère une image.svg de "snow" avec 3 itérations
```
Il est également possible de le faire étape par étape
```sh
$ make generation # génère le fichier XML des L-systèmes
$ make tortue nom=snow n=3 # génère tortue.xml de "snow" avec 3 itérations
$ make traceur # génère traceur.xml
$ make svg # génère image.svg
```
Les fichiers XML des L-systèmes, de la tortue et du traceur sont vérifié
avec le fichier XSD lors de la génération.
## Rapport
<!-- TODO: Push le PDF uniquement quand il est finalisé. -->
Le rapport se trouve dans le dossier [report](./report/).