📖 Update README and licenses
This commit is contained in:
parent
6d6af1092d
commit
62fa08aafb
|
@ -0,0 +1,56 @@
|
|||
# Contribuer
|
||||
|
||||
[Looking for the english version?](CONTRIBUTING.md)
|
||||
|
||||
Merci de votre intérêt à contribuer à ce code !
|
||||
Toutes les contributions (même les plus petites) sont les bienvenues.
|
||||
Pour garder une certaine cohérence dans le code, merci de suivre
|
||||
ces quelques règles.
|
||||
|
||||
## 1. Commit tags
|
||||
|
||||
Tous les commits doivent être précédés d'emojis dans la mesure
|
||||
du possible pour que la liste des commits soit plus lisible.
|
||||
|
||||
| Emoji | Type de commit |
|
||||
|:----------:|:---------------------------------|
|
||||
| :book: | Changement dans la documentation |
|
||||
| :bug: | Correction de bug |
|
||||
| :ledger: | Déplacement de fichiers |
|
||||
| :bulb: | Nouvelles fonctionnalités |
|
||||
| :lipstick: | Correction du style de code |
|
||||
|
||||
## 2. Branches
|
||||
|
||||
Merci d'utiliser un nom de branche différent de
|
||||
`master` pour vos pull requests, pour que l'historique
|
||||
soit plus lisible.
|
||||
|
||||
Par exemple, pour améliorer la documentation, vous
|
||||
pourriez choisir le nom `improve-docs`.
|
||||
|
||||
## 3. Conventions de style
|
||||
|
||||
Le code Javascript peut être écrit suivant
|
||||
[beaucoup](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
|
||||
[de](https://github.com/airbnb/javascript)
|
||||
[styles](https://github.com/felixge/node-style-guide)
|
||||
[différents](https://contribute.jquery.org/style-guide/js/)
|
||||
mais nous ne sommes pas aussi durs que ceux-ci.
|
||||
|
||||
La règle principale est d'utiliser [ESLint](http://eslint.org/) pour
|
||||
vérifier si votre code s'accorde avec nos conventions de style.
|
||||
Voici quelques unes des règles :
|
||||
|
||||
* utiliser le paramètre de base dans `parseInt()`;
|
||||
* utiliser le *one true brace style;*
|
||||
* mettre un espace après les virgules, pas d'espace avant;
|
||||
* mettre les virgules à la fin des lignes de préférence;
|
||||
* utiliser des guillemets simples;
|
||||
* écrire en camelcase;
|
||||
* utiliser 4 espaces pour l'indentation.
|
||||
|
||||
## 4. Langue
|
||||
|
||||
De préférence, les noms de variables, fonctions, le texte des commentaires,
|
||||
les descriptions de commits doivent être écrits en *anglais.*
|
|
@ -0,0 +1,52 @@
|
|||
# Contributing
|
||||
|
||||
[Voir ceci en français](CONTRIBUTING.fr.md)
|
||||
|
||||
Thank you for your interest in contributing to this repo!
|
||||
All contributions (even small ones) are welcome.
|
||||
In order to keep this repo consistent, please
|
||||
try to follow these rules.
|
||||
|
||||
## 1. Commit tags
|
||||
|
||||
All commits should be tagged with emojis whenever possible
|
||||
to make the commit list more readable.
|
||||
|
||||
| Emoji | Commit content |
|
||||
|:----------:|:--------------------- |
|
||||
| :book: | Documentation updates |
|
||||
| :bug: | Bug fixes |
|
||||
| :ledger: | Moving files |
|
||||
| :bulb: | New features |
|
||||
| :lipstick: | Fixing coding style |
|
||||
|
||||
## 2. Branches
|
||||
|
||||
Please use a branch name that differs from `master`
|
||||
when making pull requests, so that the network
|
||||
history is more readable.
|
||||
|
||||
For example, if you wanted to fix the issue
|
||||
"improve documentation", you could have
|
||||
chosen the following branch name: `improve-docs`.
|
||||
|
||||
## 3. Coding style
|
||||
|
||||
Javascript can be authored by following
|
||||
[a](https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml)
|
||||
[lot](https://github.com/airbnb/javascript)
|
||||
[of](https://github.com/felixge/node-style-guide)
|
||||
[different](https://contribute.jquery.org/style-guide/js/)
|
||||
[style guides](https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style)
|
||||
but we decided to be a bit soft on that.
|
||||
|
||||
As a rule of thumb, use [ESLint](http://eslint.org/) to check if your code complies
|
||||
with our style conventions. Here are some of the rules:
|
||||
|
||||
* use the radix parameter in `parseInt()` calls;
|
||||
* use the *one true brace style;*
|
||||
* put one space after commas, and no space before;
|
||||
* put your comma at the end of the lines;
|
||||
* use simple quotes;
|
||||
* use camelcase;
|
||||
* use 4 spaces for indentation.
|
|
@ -0,0 +1,19 @@
|
|||
# Chaos
|
||||
|
||||
[Looking for the english version?](README.md)
|
||||
|
||||
Créer des fractales avec le jeu du chaos.
|
||||
|
||||
== À FAIRE ==
|
||||
|
||||
## Contribuer
|
||||
|
||||
Toutes les informations sont dans le
|
||||
[guide du contributeur.](https://github.com/matteodelabre/the-dom/blob/master/CONTRIBUTING.fr.md)
|
||||
|
||||
## Licence
|
||||
|
||||
Chaos ― Créer des fractales avec le jeu du chaos.
|
||||
Écrit en 2015 par Mattéo Delabre ([bonjour@matteodelabre.me](mailto:bonjour@matteodelabre.me)).
|
||||
Dans la mesure permise par la loi, l'auteur dédie mondialement tous ses droits d'auteur et droits voisins sur ce logiciel au **domaine public.** Ce logiciel est distribué sans aucune garantie.
|
||||
Vous devriez avoir reçu une copie du *CC0 Domain Dedication* avec de logiciel. Sinon, voir http://creativecommons.org/publicdomain/zero/1.0/.
|
27
README.md
27
README.md
|
@ -1,23 +1,18 @@
|
|||
# Chaos game app
|
||||
# Chaos
|
||||
|
||||
A Javascript web app that allows you to test the "Chaos game" algorithm that consists in a few steps:
|
||||
[Voir ceci en français](README.fr.md)
|
||||
|
||||
1. take a n-vertices polygon (in the app, there is only regular polygons, but it is possible to use scalenous ones);
|
||||
2. choose a random point (out or inside the polygon);
|
||||
3. choose a random vertex;
|
||||
4. take the middle of the segment vertex-point (other factors can also be used);
|
||||
5. go to step 2. using the middle point.
|
||||
Creating fractals with the chaos game.
|
||||
|
||||
This game was created by Michael Barnsley and was described in his book _Fractals everywhere_ in 1993. When using a triangle and a factor 1/2, you get the Sierpinski's triangle. Other fractal forms can also be plotted using other settings. Most common settings are present in the "Presets" section in the app.
|
||||
== TODO ==
|
||||
|
||||
## Technical details
|
||||
## Contributing
|
||||
|
||||
This experiment made me try several ways of drawing a lot of points on a canvas element. Actually, the coordinates of the points are calculated in a separate thread using Workers (js/lib/chaos.js), and then plotted using putDataImage. I wrote some [performance tests here](http://jsperf.com/filling-a-bunch-of-points-in-canvas) and the result is that this method is about 100x faster.
|
||||
Check out the [contribution guide.](https://github.com/matteodelabre/the-dom/blob/master/CONTRIBUTING.md)
|
||||
|
||||
Points of a regular polygon are calculated using a circle and a loop that iterates along it (angle per angle). Using trigonometric functions, we can then retrieve the actual coordinates of these points (more in the js/lib/script.js file).
|
||||
## License
|
||||
|
||||
## Links
|
||||
|
||||
[More on Michael Barnsley](http://en.wikipedia.org/wiki/Michael_Barnsley)
|
||||
[More on Chaos game](http://en.wikipedia.org/wiki/Chaos_game)
|
||||
[See the app](http://matteo78.github.io/chaos-game)
|
||||
Chaos ― Creating fractals with the chaos game.
|
||||
Written in 2015 by Mattéo Delabre ([bonjour@matteodelabre.me](mailto:bonjour@matteodelabre.me)).
|
||||
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the **public domain** worldwide. This software is distributed without any warranty.
|
||||
You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see http://creativecommons.org/publicdomain/zero/1.0/.
|
||||
|
|
Loading…
Reference in New Issue