├── 0 ├── 0_hello_world.html └── 1_hello_world.html ├── 1 ├── 0_point_rectangle.html ├── 2_polygones.html └── 1_ligne.html ├── 2 ├── 0_cercles.html ├── 2_angle_distance.html └── 1_trigo.html ├── 3 ├── 0_lerp.html └── 1_norm.html ├── 4 ├── 1_variable_N_dimensions.html └── 0_variable.html ├── 5 └── 0_quadratic.html ├── 6 └── 1_transform_operations.html ├── 7 └── image.jpg ├── 8 ├── stations.csv ├── light-map │ └── proxy.php ├── plotters │ ├── plotSimpleGraph.js │ ├── plotCompareHistogram.js │ ├── plotArcs.js │ ├── plotHull.js │ ├── plotTime.js │ ├── plotKmeans.js │ ├── plotPolar.js │ └── plotQuadraticCompare.js ├── utils │ ├── paletteGenerator.js │ ├── convexhull.js │ ├── catmullrom.js │ ├── metrics.js │ ├── cardinal.js │ ├── quadratic.js │ ├── simplify.js │ ├── circle.js │ └── kmeans.js ├── TXTLoader.js ├── CSVLoader.js ├── lorem_ipsum.txt ├── 1_exercice.html └── 0_sample.html ├── .gitignore ├── appendix ├── shapefile.pdf ├── data-chart-type.png ├── normalize_interpolate.png ├── doc_parametres_synop_168.pdf ├── flash_transform_matrix_files │ ├── pin.gif │ ├── feed.png │ ├── m_row.gif │ ├── e_rotate.gif │ ├── e_scale.gif │ ├── e_tile.jpg │ ├── m_rotate.gif │ ├── m_scale.gif │ ├── m_skew.gif │ ├── t_affine.jpg │ ├── t_x_skew.jpg │ ├── t_y_skew.jpg │ ├── m_elements.gif │ ├── m_examples.gif │ ├── m_identity.gif │ ├── m_multiply.gif │ ├── m_row_calc.gif │ ├── skew_shift.swf │ ├── t_x_scale.jpg │ ├── t_x_y_skew.jpg │ ├── t_y_scale.jpg │ ├── m_rotate_30.gif │ ├── m_row_reduced.gif │ ├── m_scale_skew.gif │ ├── m_skew_scale.gif │ ├── skew_center.swf │ ├── t_info_panel.jpg │ ├── t_single_skew.jpg │ ├── t_x_translate.jpg │ ├── t_y_translate.jpg │ ├── m_elements_base.gif │ ├── m_inverse_calc.gif │ ├── m_multiply_calc.gif │ ├── m_row_multiply.gif │ ├── t_double_width.jpg │ ├── t_mc_transforms.jpg │ ├── t_rotate_point.gif │ ├── t_x_skew_scale.jpg │ ├── e_translatetorot.gif │ ├── m_column_elements.gif │ ├── m_column_multiply.gif │ ├── m_element_meanings.gif │ ├── m_multiply_outline.gif │ ├── m_multiply_reduced.gif │ ├── m_scale_skew_calc.gif │ ├── m_skew_scale_calc.gif │ ├── m_skew_translate.gif │ ├── t_rotate45_scale.jpg │ ├── t_transform_center.jpg │ ├── transform_grabber.swf │ ├── transform_methods.swf │ ├── transform_steppers.swf │ ├── e_translatetocenter.gif │ ├── m_scale_skew_result.gif │ ├── m_skew_scale_result.gif │ ├── m_row_multiply_outline.gif │ ├── tutorial.css │ └── standard.css └── _color_ - CSS _ MDN_files │ ├── ae5b9bd466dae65a6be4e9ff223d2b2a │ ├── d0d90148e08e3b64ccf75c46f31442c5 │ ├── f383cd79ac30207f746361c2b124db98 │ └── f71f6ff4b1cb760a924097f5f7e7d423 ├── intro ├── assets │ ├── vents.png │ ├── beerviz.png │ ├── data_100k.png │ ├── exploration.png │ ├── exploration_0.png │ ├── exploration_1.png │ ├── exploration_2.png │ ├── women_bike_phl_friendships.jpg │ ├── e5cd980c5ca58922824524be583eaa57.jpg │ └── how-quitting-smoking-changes-your-body_545aab0346ef3.jpg ├── lib │ ├── font │ │ ├── league-gothic │ │ │ ├── LICENSE │ │ │ ├── league-gothic.eot │ │ │ ├── league-gothic.ttf │ │ │ ├── league-gothic.woff │ │ │ └── league-gothic.css │ │ └── source-sans-pro │ │ │ ├── source-sans-pro-italic.eot │ │ │ ├── source-sans-pro-italic.ttf │ │ │ ├── source-sans-pro-italic.woff │ │ │ ├── source-sans-pro-regular.eot │ │ │ ├── source-sans-pro-regular.ttf │ │ │ ├── source-sans-pro-regular.woff │ │ │ ├── source-sans-pro-semibold.eot │ │ │ ├── source-sans-pro-semibold.ttf │ │ │ ├── source-sans-pro-semibold.woff │ │ │ ├── source-sans-pro-semibolditalic.eot │ │ │ ├── source-sans-pro-semibolditalic.ttf │ │ │ ├── source-sans-pro-semibolditalic.woff │ │ │ ├── source-sans-pro.css │ │ │ └── LICENSE │ ├── js │ │ ├── html5shiv.js │ │ ├── classList.js │ │ └── head.min.js │ └── css │ │ └── zenburn.css └── css │ ├── theme │ ├── source │ │ ├── night.scss │ │ ├── serif.scss │ │ ├── league.scss │ │ ├── simple.scss │ │ ├── sky.scss │ │ ├── beige.scss │ │ ├── black.scss │ │ ├── white.scss │ │ ├── moon.scss │ │ ├── solarized.scss │ │ └── blood.scss │ ├── template │ │ ├── settings.scss │ │ └── mixins.scss │ ├── README.md │ └── night.css │ └── print │ ├── pdf.css │ └── paper.css ├── README.md ├── base.js ├── geom.js └── graphics.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .idea/** 3 | idea/** 4 | /appendix/pandora 5 | idea/* -------------------------------------------------------------------------------- /7/image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/7/image.jpg -------------------------------------------------------------------------------- /8/stations.csv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/8/stations.csv -------------------------------------------------------------------------------- /appendix/shapefile.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/shapefile.pdf -------------------------------------------------------------------------------- /intro/assets/vents.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/vents.png -------------------------------------------------------------------------------- /intro/assets/beerviz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/beerviz.png -------------------------------------------------------------------------------- /intro/assets/data_100k.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/data_100k.png -------------------------------------------------------------------------------- /appendix/data-chart-type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/data-chart-type.png -------------------------------------------------------------------------------- /intro/assets/exploration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/exploration.png -------------------------------------------------------------------------------- /intro/assets/exploration_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/exploration_0.png -------------------------------------------------------------------------------- /intro/assets/exploration_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/exploration_1.png -------------------------------------------------------------------------------- /intro/assets/exploration_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/exploration_2.png -------------------------------------------------------------------------------- /appendix/normalize_interpolate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/normalize_interpolate.png -------------------------------------------------------------------------------- /appendix/doc_parametres_synop_168.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/doc_parametres_synop_168.pdf -------------------------------------------------------------------------------- /intro/lib/font/league-gothic/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License (OFL) 2 | http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL 3 | -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/pin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/pin.gif -------------------------------------------------------------------------------- /intro/assets/women_bike_phl_friendships.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/women_bike_phl_friendships.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/feed.png -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_row.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_row.gif -------------------------------------------------------------------------------- /intro/lib/font/league-gothic/league-gothic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/league-gothic/league-gothic.eot -------------------------------------------------------------------------------- /intro/lib/font/league-gothic/league-gothic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/league-gothic/league-gothic.ttf -------------------------------------------------------------------------------- /intro/lib/font/league-gothic/league-gothic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/league-gothic/league-gothic.woff -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/e_rotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/e_rotate.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/e_scale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/e_scale.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/e_tile.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/e_tile.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_rotate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_rotate.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_scale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_scale.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_skew.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_skew.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_affine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_affine.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_x_skew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_x_skew.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_y_skew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_y_skew.jpg -------------------------------------------------------------------------------- /intro/assets/e5cd980c5ca58922824524be583eaa57.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/e5cd980c5ca58922824524be583eaa57.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_elements.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_elements.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_examples.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_examples.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_identity.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_identity.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_multiply.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_multiply.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_row_calc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_row_calc.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/skew_shift.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/skew_shift.swf -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_x_scale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_x_scale.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_x_y_skew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_x_y_skew.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_y_scale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_y_scale.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_rotate_30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_rotate_30.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_row_reduced.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_row_reduced.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_scale_skew.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_scale_skew.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_skew_scale.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_skew_scale.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/skew_center.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/skew_center.swf -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_info_panel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_info_panel.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_single_skew.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_single_skew.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_x_translate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_x_translate.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_y_translate.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_y_translate.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_elements_base.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_elements_base.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_inverse_calc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_inverse_calc.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_multiply_calc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_multiply_calc.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_row_multiply.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_row_multiply.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_double_width.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_double_width.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_mc_transforms.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_mc_transforms.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_rotate_point.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_rotate_point.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_x_skew_scale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_x_skew_scale.jpg -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-italic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-italic.eot -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-italic.ttf -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/e_translatetorot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/e_translatetorot.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_column_elements.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_column_elements.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_column_multiply.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_column_multiply.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_element_meanings.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_element_meanings.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_multiply_outline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_multiply_outline.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_multiply_reduced.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_multiply_reduced.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_scale_skew_calc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_scale_skew_calc.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_skew_scale_calc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_skew_scale_calc.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_skew_translate.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_skew_translate.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_rotate45_scale.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_rotate45_scale.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/t_transform_center.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/t_transform_center.jpg -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/transform_grabber.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/transform_grabber.swf -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/transform_methods.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/transform_methods.swf -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/transform_steppers.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/transform_steppers.swf -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-italic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-italic.woff -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-regular.eot -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-regular.ttf -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-regular.woff -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibold.eot -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibold.ttf -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibold.woff -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/e_translatetocenter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/e_translatetocenter.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_scale_skew_result.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_scale_skew_result.gif -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_skew_scale_result.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_skew_scale_result.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # atelier 2 | alleez à cette adresse ou téléchargez le tout, je ne sais pas lequel est le plus simple. 3 | 4 | https://cdn.rawgit.com/nicoptere/atelier/master/index.html -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/m_row_multiply_outline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/flash_transform_matrix_files/m_row_multiply_outline.gif -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf -------------------------------------------------------------------------------- /appendix/_color_ - CSS _ MDN_files/ae5b9bd466dae65a6be4e9ff223d2b2a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/_color_ - CSS _ MDN_files/ae5b9bd466dae65a6be4e9ff223d2b2a -------------------------------------------------------------------------------- /appendix/_color_ - CSS _ MDN_files/d0d90148e08e3b64ccf75c46f31442c5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/_color_ - CSS _ MDN_files/d0d90148e08e3b64ccf75c46f31442c5 -------------------------------------------------------------------------------- /appendix/_color_ - CSS _ MDN_files/f383cd79ac30207f746361c2b124db98: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/_color_ - CSS _ MDN_files/f383cd79ac30207f746361c2b124db98 -------------------------------------------------------------------------------- /appendix/_color_ - CSS _ MDN_files/f71f6ff4b1cb760a924097f5f7e7d423: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/appendix/_color_ - CSS _ MDN_files/f71f6ff4b1cb760a924097f5f7e7d423 -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff -------------------------------------------------------------------------------- /intro/assets/how-quitting-smoking-changes-your-body_545aab0346ef3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoptere/atelier/HEAD/intro/assets/how-quitting-smoking-changes-your-body_545aab0346ef3.jpg -------------------------------------------------------------------------------- /intro/lib/js/html5shiv.js: -------------------------------------------------------------------------------- 1 | document.createElement('header'); 2 | document.createElement('nav'); 3 | document.createElement('section'); 4 | document.createElement('article'); 5 | document.createElement('aside'); 6 | document.createElement('footer'); 7 | document.createElement('hgroup'); -------------------------------------------------------------------------------- /8/light-map/proxy.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /intro/lib/font/league-gothic/league-gothic.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'League Gothic'; 3 | src: url('league-gothic.eot'); 4 | src: url('league-gothic.eot?#iefix') format('embedded-opentype'), 5 | url('league-gothic.woff') format('woff'), 6 | url('league-gothic.ttf') format('truetype'); 7 | 8 | font-weight: normal; 9 | font-style: normal; 10 | } -------------------------------------------------------------------------------- /8/plotters/plotSimpleGraph.js: -------------------------------------------------------------------------------- 1 | //dessine les séries de valeurs sous forme de lignes 2 | function simpleGraph( ctx, values0, values1 ) 3 | { 4 | //assigne le contexte à l'utilistaire de dessin 5 | G.ctx = ctx; 6 | 7 | //trace le graphe des températures en rouge 8 | ctx.strokeStyle = "#F00"; 9 | G.polyline( values0 ); 10 | 11 | //scatterplot des vitesse du vent en bleu 12 | ctx.fillStyle = "#09C"; 13 | values1.forEach( function( p ){G.disc(p, 2);} ); 14 | } 15 | -------------------------------------------------------------------------------- /8/plotters/plotCompareHistogram.js: -------------------------------------------------------------------------------- 1 | //trace la différence entre vent et température 2 | function compareHistogram( ctx, values0, values1 ){ 3 | 4 | //assigne le contexte à l'utilistaire de dessin 5 | G.ctx = ctx; 6 | 7 | values0.forEach(function( v0,i ){ 8 | 9 | //récupère la valeur de values1 à cet index 10 | var v1 = values1[ i ]; 11 | 12 | //si la valeur 0 est plus grande que la valeur 1 13 | var h = v1.y - v0.y; 14 | if( h < 0 ) { 15 | //dessine un bloc jaune 16 | ctx.fillStyle = "#FC0"; 17 | }else{ 18 | //sinon dessine un bloc bleu 19 | ctx.fillStyle = "#09C"; 20 | } 21 | ctx.fillRect( v0.x, v0.y, width / data.length, h ); 22 | 23 | } ); 24 | } -------------------------------------------------------------------------------- /8/utils/paletteGenerator.js: -------------------------------------------------------------------------------- 1 | var paletteGenerator = (function(exports){ 2 | 3 | var RAD = ( Math.PI / 180 ); 4 | var DEG = ( 180 / Math.PI ); 5 | var GOLDEN_ANGLE = Math.PI * ( 3 - Math.sqrt( 5 ) ); 6 | 7 | exports.generate = function( count, steps ){ 8 | 9 | count = count || 10; 10 | 11 | var colors = []; 12 | var angle = ( Math.random() * Math.PI * 2 ); 13 | var delta = ( GOLDEN_ANGLE / ( Math.max( 1, steps || 25 ) ) ); 14 | var sat = "50%"; 15 | var lum = "50%"; 16 | 17 | while( count-- ) 18 | { 19 | angle += delta; 20 | var color = 'hsl( ' + angle * DEG +', '+ sat +', '+ lum +")"; 21 | colors.push( color ); 22 | } 23 | return colors; 24 | }; 25 | 26 | return exports; 27 | })({}); -------------------------------------------------------------------------------- /8/plotters/plotArcs.js: -------------------------------------------------------------------------------- 1 | //dessine un graphe polaire des valeurs 2 | function plotArcs(ctx, data ) 3 | { 4 | //assigne le contexte à l'utilitaire de dessin 5 | G.ctx = ctx; 6 | ctx.lineWidth = .25; 7 | 8 | var Y = height / 3 * 2; 9 | data.forEach( function( obj, i ) 10 | { 11 | var r = map( obj.t, t_min, t_max, 0, width / 2 ); 12 | ctx.strokeStyle = "#09C"; 13 | G.arc( width / 2 - r / 2, Y, r / 2, -PI, 0 ); 14 | 15 | r = map( obj.ff, ff_min, ff_max, 0, width / 2 ); 16 | ctx.strokeStyle = "#F00"; 17 | G.arc( width / 2 + r / 2, Y, r / 2, -PI, 0 ); 18 | }); 19 | 20 | ctx.strokeStyle = "#999"; 21 | G.graduation( 1, Y, width-1, Y, 100, 5 ); 22 | G.graduation( 1, Y, width-1, Y, 50, 10 ); 23 | G.graduation( 1, Y, width-1, Y, 10, 15 ); 24 | 25 | } -------------------------------------------------------------------------------- /8/plotters/plotHull.js: -------------------------------------------------------------------------------- 1 | //dessine le "polygone convexe englobant" d'un set de points 2 | //(convex hull) 3 | function plotHull( ctx, data ) 4 | { 5 | 6 | //assigne le contexte à l'utilitaire de dessin 7 | G.ctx = ctx; 8 | 9 | //dessine un graphe des valeurs polarisées 10 | var polar = []; 11 | ctx.strokeStyle = "#CCC"; 12 | G.graduation( 0,height/2, width, height/2, 40, 5 ); 13 | G.graduation( width/2,0, width/2, height, 30, 5 ); 14 | 15 | data.forEach( function( obj, i ) 16 | { 17 | var a = i / data.length * PI2;//angle 18 | 19 | var r = map( obj.t, t_min, t_max, height/8, height / 2 );//rayon 20 | var p = new Point( width / 2 + Math.cos( a ) * r, 21 | height / 2 + Math.sin( a ) * r ); 22 | polar.push( p ); 23 | 24 | G.disc( p, 2 ); 25 | 26 | } ); 27 | G.polyline( polar, true ); 28 | polar.forEach( function(p){ G.disc( p, true ); } ); 29 | 30 | //dessine le convex hull en rouge 31 | ctx.strokeStyle = "#f00"; 32 | G.polyline( convexhull.compute( polar ), true ); 33 | 34 | } -------------------------------------------------------------------------------- /intro/css/theme/source/night.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 16 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 17 | 18 | 19 | // Override theme settings (see ../template/settings.scss) 20 | $backgroundColor: #111; 21 | 22 | $mainFont: 'Open Sans', sans-serif; 23 | $linkColor: #e7ad52; 24 | $linkColorHover: lighten( $linkColor, 20% ); 25 | $headingFont: 'Montserrat', Impact, sans-serif; 26 | $headingTextShadow: none; 27 | $headingLetterSpacing: -0.03em; 28 | $headingTextTransform: none; 29 | $selectionBackgroundColor: #e7ad52; 30 | $mainFontSize: 30px; 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- -------------------------------------------------------------------------------- /intro/css/theme/source/serif.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is brown. 4 | * 5 | * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. 6 | */ 7 | 8 | 9 | // Default mixins and settings ----------------- 10 | @import "../template/mixins"; 11 | @import "../template/settings"; 12 | // --------------------------------------------- 13 | 14 | 15 | 16 | // Override theme settings (see ../template/settings.scss) 17 | $mainFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 18 | $mainColor: #000; 19 | $headingFont: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; 20 | $headingColor: #383D3D; 21 | $headingTextShadow: none; 22 | $headingTextTransform: none; 23 | $backgroundColor: #F0F1EB; 24 | $linkColor: #51483D; 25 | $linkColorHover: lighten( $linkColor, 20% ); 26 | $selectionBackgroundColor: #26351C; 27 | 28 | .reveal a { 29 | line-height: 1.3em; 30 | } 31 | 32 | 33 | // Theme template ------------------------------ 34 | @import "../template/theme"; 35 | // --------------------------------------------- 36 | -------------------------------------------------------------------------------- /8/plotters/plotTime.js: -------------------------------------------------------------------------------- 1 | //dessine une valeur normalisée T le long d'une série de segments 2 | function plotTime(ctx, values, t ) 3 | { 4 | //assigne le contexte à l'utilistaire de dessin 5 | G.ctx = ctx; 6 | 7 | //dessine une ligne graduée 8 | ctx.fillStyle = ctx.strokeStyle = "#EEE"; 9 | G.graduation( 0,height, width-1, height, data.length, -20 ); 10 | 11 | var id = ( Math.floor( ( values.length - 1 ) * t ) ); 12 | if( id < 0 ) id = 0; 13 | 14 | //dessine le rectangle où se trouve le point en gris 15 | ctx.fillRect( values[ id ].x, 0, width / data.length, height ); 16 | 17 | //trace la courbe des températures en noir 18 | ctx.strokeStyle = "#666"; 19 | G.polyline( values ); 20 | 21 | //dessine le point au temps T sur la courbe 22 | ctx.fillStyle = "#F00"; 23 | var p = getPositionAt( values, t ); 24 | G.disc( p, 2 ); 25 | 26 | //dessine en bleu les points de la courbe 27 | //entre lesquels se trouve le point p 28 | ctx.fillStyle = "#09C"; 29 | 30 | p = values[ id ]; 31 | G.disc(p, 2 ); 32 | 33 | p = values[ Math.min( id + 1, values.length - 1 ) ]; 34 | G.disc(p, 2 ); 35 | 36 | } 37 | -------------------------------------------------------------------------------- /intro/css/theme/template/settings.scss: -------------------------------------------------------------------------------- 1 | // Base settings for all themes that can optionally be 2 | // overridden by the super-theme 3 | 4 | // Background of the presentation 5 | $backgroundColor: #2b2b2b; 6 | 7 | // Primary/body text 8 | $mainFont: 'Lato', sans-serif; 9 | $mainFontSize: 36px; 10 | $mainColor: #eee; 11 | 12 | // Vertical spacing between blocks of text 13 | $blockMargin: 20px; 14 | 15 | // Headings 16 | $headingMargin: 0 0 $blockMargin 0; 17 | $headingFont: 'League Gothic', Impact, sans-serif; 18 | $headingColor: #eee; 19 | $headingLineHeight: 1.2; 20 | $headingLetterSpacing: normal; 21 | $headingTextTransform: uppercase; 22 | $headingTextShadow: none; 23 | $headingFontWeight: normal; 24 | $heading1TextShadow: $headingTextShadow; 25 | 26 | $heading1Size: 3.77em; 27 | $heading2Size: 2.11em; 28 | $heading3Size: 1.55em; 29 | $heading4Size: 1.00em; 30 | 31 | // Links and actions 32 | $linkColor: #13DAEC; 33 | $linkColorHover: lighten( $linkColor, 20% ); 34 | 35 | // Text selection 36 | $selectionBackgroundColor: #FF5E99; 37 | $selectionColor: #fff; 38 | 39 | // Generates the presentation background, can be overridden 40 | // to return a background image or gradient 41 | @mixin bodyBackground() { 42 | background: $backgroundColor; 43 | } -------------------------------------------------------------------------------- /intro/css/theme/source/league.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * League theme for reveal.js. 3 | * 4 | * This was the default theme pre-3.0.0. 5 | * 6 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(../../lib/font/league-gothic/league-gothic.css); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | // Override theme settings (see ../template/settings.scss) 22 | $headingTextShadow: 0px 0px 6px rgba(0,0,0,0.2); 23 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 24 | 25 | // Background generator 26 | @mixin bodyBackground() { 27 | @include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); 28 | } 29 | 30 | 31 | 32 | // Theme template ------------------------------ 33 | @import "../template/theme"; 34 | // --------------------------------------------- -------------------------------------------------------------------------------- /intro/css/theme/source/simple.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * A simple theme for reveal.js presentations, similar 3 | * to the default theme. The accent color is darkblue. 4 | * 5 | * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. 6 | * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 7 | */ 8 | 9 | 10 | // Default mixins and settings ----------------- 11 | @import "../template/mixins"; 12 | @import "../template/settings"; 13 | // --------------------------------------------- 14 | 15 | 16 | 17 | // Include theme-specific fonts 18 | @import url(https://fonts.googleapis.com/css?family=News+Cycle:400,700); 19 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 20 | 21 | 22 | // Override theme settings (see ../template/settings.scss) 23 | $mainFont: 'Lato', sans-serif; 24 | $mainColor: #000; 25 | $headingFont: 'News Cycle', Impact, sans-serif; 26 | $headingColor: #000; 27 | $headingTextShadow: none; 28 | $headingTextTransform: none; 29 | $backgroundColor: #fff; 30 | $linkColor: #00008B; 31 | $linkColorHover: lighten( $linkColor, 20% ); 32 | $selectionBackgroundColor: rgba(0, 0, 0, 0.99); 33 | 34 | 35 | 36 | // Theme template ------------------------------ 37 | @import "../template/theme"; 38 | // --------------------------------------------- -------------------------------------------------------------------------------- /8/plotters/plotKmeans.js: -------------------------------------------------------------------------------- 1 | //stocke les K-moyens de l'ensemble de points 2 | var Kmeans; 3 | //dessine les K-moyens 4 | function plotKmeans( ctx, values0, values1 ){ 5 | 6 | //assigne le contexte à l'utilitaire de dessin 7 | G.ctx = ctx; 8 | 9 | //arrière plan en violet foncé 10 | ctx.fillStyle = "#260A30"; 11 | ctx.fillRect( 0,0,width, height); 12 | 13 | //crée une palette de couleurs 14 | var colors = [ "#583354", "#EF8166", "#FEC091", "#FDEFBE" ]; 15 | 16 | //concatène les valeurs des 2 tablkeaux 17 | var values = values0.concat( values1 ); 18 | 19 | //calcule et stocke les K-moyens une fois pour toutes 20 | //(un peu lourd à calculer) 21 | if( Kmeans == null ) 22 | { 23 | Kmeans = kmeans.compute( values, colors.length, 100 ); 24 | } 25 | 26 | var centroids = Kmeans.centroids; 27 | var points = Kmeans.points; 28 | //dessine les clusters reliés à leur centroids 29 | points.forEach(function( p ){ 30 | ctx.fillStyle = ctx.strokeStyle = colors[ p.centroid ]; 31 | G.disc(p.x, p.y,2 ); 32 | G.line( p, centroids[ p.centroid ] ) 33 | } ); 34 | 35 | //dessine les centroids 36 | centroids.forEach(function( p, i ) 37 | { 38 | ctx.fillStyle = ctx.strokeStyle = colors[i]; 39 | G.disc(p.x, p.y, p.items / 2 ); 40 | } ); 41 | } -------------------------------------------------------------------------------- /intro/css/theme/source/sky.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Sky theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(https://fonts.googleapis.com/css?family=Quicksand:400,700,400italic,700italic); 17 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainFont: 'Open Sans', sans-serif; 22 | $mainColor: #333; 23 | $headingFont: 'Quicksand', sans-serif; 24 | $headingColor: #333; 25 | $headingLetterSpacing: -0.08em; 26 | $headingTextShadow: none; 27 | $backgroundColor: #f7fbfc; 28 | $linkColor: #3b759e; 29 | $linkColorHover: lighten( $linkColor, 20% ); 30 | $selectionBackgroundColor: #134674; 31 | 32 | // Fix links so they are not cut off 33 | .reveal a { 34 | line-height: 1.3em; 35 | } 36 | 37 | // Background generator 38 | @mixin bodyBackground() { 39 | @include radial-gradient( #add9e4, #f7fbfc ); 40 | } 41 | 42 | 43 | 44 | // Theme template ------------------------------ 45 | @import "../template/theme"; 46 | // --------------------------------------------- 47 | -------------------------------------------------------------------------------- /intro/css/theme/source/beige.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Beige theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | 15 | // Include theme-specific fonts 16 | @import url(../../lib/font/league-gothic/league-gothic.css); 17 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 18 | 19 | 20 | // Override theme settings (see ../template/settings.scss) 21 | $mainColor: #333; 22 | $headingColor: #333; 23 | $headingTextShadow: none; 24 | $backgroundColor: #f7f3de; 25 | $linkColor: #8b743d; 26 | $linkColorHover: lighten( $linkColor, 20% ); 27 | $selectionBackgroundColor: rgba(79, 64, 28, 0.99); 28 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 29 | 30 | // Background generator 31 | @mixin bodyBackground() { 32 | @include radial-gradient( rgba(247,242,211,1), rgba(255,255,255,1) ); 33 | } 34 | 35 | 36 | 37 | // Theme template ------------------------------ 38 | @import "../template/theme"; 39 | // --------------------------------------------- -------------------------------------------------------------------------------- /8/plotters/plotPolar.js: -------------------------------------------------------------------------------- 1 | //dessine un graphe polaire des valeurs 2 | function plotPolar(ctx, inRadius, outRadius, data ) 3 | { 4 | 5 | //assigne le contexte à l'utilitaire de dessin 6 | G.ctx = ctx; 7 | 8 | //dessine des portions d'anneau en gris 9 | ctx.strokeStyle = "#ddd"; 10 | data.forEach( function( obj, i ) { 11 | var a = i / data.length * PI2; 12 | var span = a + PI2 / data.length; 13 | G.strokeRing(width / 2, height / 2, inRadius, outRadius, a, span); 14 | }); 15 | 16 | //dessine des portions d'anneau en bleu 17 | ctx.strokeStyle = ctx.fillStyle = "#09C"; 18 | data.forEach( function( obj, i ){ 19 | var a = i / data.length * PI2; 20 | var span = a + PI2 / data.length; 21 | var r = map( obj.t, t_min, t_max, inRadius, outRadius ); 22 | G.fillRing( width/2, height/2, inRadius,r, a, span ); 23 | G.strokeRing( width/2, height/2, inRadius,r, a, span ); 24 | }); 25 | 26 | //dessine des portions d'anneau en jaune 27 | ctx.strokeStyle = ctx.fillStyle = "#FC0"; 28 | data.forEach( function( obj, i ) { 29 | var a = i / data.length * PI2; 30 | var span = a + PI2 / data.length; 31 | var r = map(obj.ff, ff_min, ff_max, inRadius, outRadius); 32 | G.fillRing(width / 2, height / 2, inRadius, r, a, span); 33 | G.strokeRing(width / 2, height / 2, inRadius, r, a, span); 34 | }); 35 | } -------------------------------------------------------------------------------- /intro/css/theme/source/black.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. This is the opposite of the 'white' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #222; 20 | 21 | $mainColor: #fff; 22 | $headingColor: #fff; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #42affa; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-light-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #222; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /intro/css/theme/source/white.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * White theme for reveal.js. This is the opposite of the 'black' theme. 3 | * 4 | * Copyright (C) 2015 Hakim El Hattab, http://hakim.se 5 | */ 6 | 7 | 8 | // Default mixins and settings ----------------- 9 | @import "../template/mixins"; 10 | @import "../template/settings"; 11 | // --------------------------------------------- 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/source-sans-pro/source-sans-pro.css); 16 | 17 | 18 | // Override theme settings (see ../template/settings.scss) 19 | $backgroundColor: #fff; 20 | 21 | $mainColor: #222; 22 | $headingColor: #222; 23 | 24 | $mainFontSize: 38px; 25 | $mainFont: 'Source Sans Pro', Helvetica, sans-serif; 26 | $headingFont: 'Source Sans Pro', Helvetica, sans-serif; 27 | $headingTextShadow: none; 28 | $headingLetterSpacing: normal; 29 | $headingTextTransform: uppercase; 30 | $headingFontWeight: 600; 31 | $linkColor: #2a76dd; 32 | $linkColorHover: lighten( $linkColor, 15% ); 33 | $selectionBackgroundColor: lighten( $linkColor, 25% ); 34 | 35 | $heading1Size: 2.5em; 36 | $heading2Size: 1.6em; 37 | $heading3Size: 1.3em; 38 | $heading4Size: 1.0em; 39 | 40 | section.has-dark-background { 41 | &, h1, h2, h3, h4, h5, h6 { 42 | color: #fff; 43 | } 44 | } 45 | 46 | 47 | // Theme template ------------------------------ 48 | @import "../template/theme"; 49 | // --------------------------------------------- -------------------------------------------------------------------------------- /8/utils/convexhull.js: -------------------------------------------------------------------------------- 1 | var convexhull = function(exports) 2 | { 3 | exports.compute = function( points ) 4 | { 5 | 6 | if( points.length <= 3 ) return points; 7 | points.sort( function( a,b ){return a.x - b.x;} ); 8 | var angle = Math.PI / 2; 9 | var point = points[ 0 ]; 10 | var hull = []; 11 | var max = points.length * 2; 12 | while ( point != hull[ 0 ] && max > 0 ) 13 | { 14 | hull.push( point ); 15 | var bestAngle = Math.pow( 2, 53 ); 16 | var bestIndex = 0; 17 | for ( var i = 0; i < points.length; i++ ){ 18 | 19 | var testPoint = points[i]; 20 | if (testPoint == point)continue; 21 | 22 | var dx = testPoint.x - point.x; 23 | var dy = testPoint.y - point.y; 24 | var testAngle = Math.atan2(dy,dx) - angle; 25 | 26 | while (testAngle < 0) { 27 | testAngle += Math.PI * 2; 28 | } 29 | if ( testAngle < bestAngle ){ 30 | bestAngle = testAngle;bestIndex = i; 31 | } 32 | } 33 | point = points[bestIndex]; 34 | angle += bestAngle; 35 | max--; 36 | } 37 | return hull; 38 | 39 | }; 40 | 41 | return exports; 42 | 43 | }({}); -------------------------------------------------------------------------------- /intro/css/theme/source/moon.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Dark theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | /** 19 | * Solarized colors by Ethan Schoonover 20 | */ 21 | html * { 22 | color-profile: sRGB; 23 | rendering-intent: auto; 24 | } 25 | 26 | // Solarized colors 27 | $base03: #002b36; 28 | $base02: #073642; 29 | $base01: #586e75; 30 | $base00: #657b83; 31 | $base0: #839496; 32 | $base1: #93a1a1; 33 | $base2: #eee8d5; 34 | $base3: #fdf6e3; 35 | $yellow: #b58900; 36 | $orange: #cb4b16; 37 | $red: #dc322f; 38 | $magenta: #d33682; 39 | $violet: #6c71c4; 40 | $blue: #268bd2; 41 | $cyan: #2aa198; 42 | $green: #859900; 43 | 44 | // Override theme settings (see ../template/settings.scss) 45 | $mainColor: $base1; 46 | $headingColor: $base2; 47 | $headingTextShadow: none; 48 | $backgroundColor: $base03; 49 | $linkColor: $blue; 50 | $linkColorHover: lighten( $linkColor, 20% ); 51 | $selectionBackgroundColor: $magenta; 52 | 53 | 54 | 55 | // Theme template ------------------------------ 56 | @import "../template/theme"; 57 | // --------------------------------------------- 58 | -------------------------------------------------------------------------------- /intro/lib/js/classList.js: -------------------------------------------------------------------------------- 1 | /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js*/ 2 | if(typeof document!=="undefined"&&!("classList" in document.createElement("a"))){(function(j){var a="classList",f="prototype",m=(j.HTMLElement||j.Element)[f],b=Object,k=String[f].trim||function(){return this.replace(/^\s+|\s+$/g,"")},c=Array[f].indexOf||function(q){var p=0,o=this.length;for(;p 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 56 | 57 | -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/source-sans-pro.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Source Sans Pro'; 3 | src: url('source-sans-pro-regular.eot'); 4 | src: url('source-sans-pro-regular.eot?#iefix') format('embedded-opentype'), 5 | url('source-sans-pro-regular.woff') format('woff'), 6 | url('source-sans-pro-regular.ttf') format('truetype'); 7 | font-weight: normal; 8 | font-style: normal; 9 | } 10 | 11 | @font-face { 12 | font-family: 'Source Sans Pro'; 13 | src: url('source-sans-pro-italic.eot'); 14 | src: url('source-sans-pro-italic.eot?#iefix') format('embedded-opentype'), 15 | url('source-sans-pro-italic.woff') format('woff'), 16 | url('source-sans-pro-italic.ttf') format('truetype'); 17 | font-weight: normal; 18 | font-style: italic; 19 | } 20 | 21 | @font-face { 22 | font-family: 'Source Sans Pro'; 23 | src: url('source-sans-pro-semibold.eot'); 24 | src: url('source-sans-pro-semibold.eot?#iefix') format('embedded-opentype'), 25 | url('source-sans-pro-semibold.woff') format('woff'), 26 | url('source-sans-pro-semibold.ttf') format('truetype'); 27 | font-weight: 600; 28 | font-style: normal; 29 | } 30 | 31 | @font-face { 32 | font-family: 'Source Sans Pro'; 33 | src: url('source-sans-pro-semibolditalic.eot'); 34 | src: url('source-sans-pro-semibolditalic.eot?#iefix') format('embedded-opentype'), 35 | url('source-sans-pro-semibolditalic.woff') format('woff'), 36 | url('source-sans-pro-semibolditalic.ttf') format('truetype'); 37 | font-weight: 600; 38 | font-style: italic; 39 | } -------------------------------------------------------------------------------- /intro/css/theme/source/solarized.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Solarized Light theme for reveal.js. 3 | * Author: Achim Staebler 4 | */ 5 | 6 | 7 | // Default mixins and settings ----------------- 8 | @import "../template/mixins"; 9 | @import "../template/settings"; 10 | // --------------------------------------------- 11 | 12 | 13 | 14 | // Include theme-specific fonts 15 | @import url(../../lib/font/league-gothic/league-gothic.css); 16 | @import url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic); 17 | 18 | 19 | /** 20 | * Solarized colors by Ethan Schoonover 21 | */ 22 | html * { 23 | color-profile: sRGB; 24 | rendering-intent: auto; 25 | } 26 | 27 | // Solarized colors 28 | $base03: #002b36; 29 | $base02: #073642; 30 | $base01: #586e75; 31 | $base00: #657b83; 32 | $base0: #839496; 33 | $base1: #93a1a1; 34 | $base2: #eee8d5; 35 | $base3: #fdf6e3; 36 | $yellow: #b58900; 37 | $orange: #cb4b16; 38 | $red: #dc322f; 39 | $magenta: #d33682; 40 | $violet: #6c71c4; 41 | $blue: #268bd2; 42 | $cyan: #2aa198; 43 | $green: #859900; 44 | 45 | // Override theme settings (see ../template/settings.scss) 46 | $mainColor: $base00; 47 | $headingColor: $base01; 48 | $headingTextShadow: none; 49 | $backgroundColor: $base3; 50 | $linkColor: $blue; 51 | $linkColorHover: lighten( $linkColor, 20% ); 52 | $selectionBackgroundColor: $magenta; 53 | 54 | // Background generator 55 | // @mixin bodyBackground() { 56 | // @include radial-gradient( rgba($base3,1), rgba(lighten($base3, 20%),1) ); 57 | // } 58 | 59 | 60 | 61 | // Theme template ------------------------------ 62 | @import "../template/theme"; 63 | // --------------------------------------------- 64 | -------------------------------------------------------------------------------- /8/utils/catmullrom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by nico on 23/11/13. 3 | */ 4 | var CatmullRom = function(exports) 5 | { 6 | 7 | exports.compute = function( points, precision, loop ) 8 | { 9 | 10 | precision = Math.max( .01, Math.min( 1, precision ||.1 ) ); 11 | loop = loop || false; 12 | 13 | var i = 0, 14 | t = 0, 15 | p0, 16 | p1, 17 | p2, 18 | p3; 19 | 20 | var tmp = []; 21 | 22 | for (i = 0; i < points.length - ( loop ? 0 : 1 ); i++) 23 | { 24 | p0 = points [(i -1 + points.length) % points.length]; 25 | p1 = points [i]; 26 | p2 = points [(i +1 + points.length) % points.length]; 27 | p3 = points [(i +2 + points.length) % points.length]; 28 | tmp.push( p1 ); 29 | 30 | for ( t = 0; t < 1; t+= precision ) 31 | { 32 | tmp.push( new Point( 0.5 * (( 2*p1.x) + 33 | t * (( -p0.x +p2.x) + 34 | t * ((2*p0.x -5*p1.x +4*p2.x -p3.x) + 35 | t * ( -p0.x +3 * p1.x -3 * p2.x +p3.x)))), 36 | 37 | 0.5 * (( 2*p1.y) + 38 | t * (( -p0.y +p2.y) + 39 | t * ((2*p0.y -5*p1.y +4*p2.y -p3.y) + 40 | t * ( -p0.y +3 * p1.y -3 * p2.y +p3.y)))) ) ); 41 | } 42 | } 43 | if( loop && points.length > 0 )tmp.push( points[ 0 ]); 44 | return tmp; 45 | 46 | }; 47 | 48 | return exports; 49 | 50 | }({}); -------------------------------------------------------------------------------- /intro/css/theme/template/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin vertical-gradient( $top, $bottom ) { 2 | background: $top; 3 | background: -moz-linear-gradient( top, $top 0%, $bottom 100% ); 4 | background: -webkit-gradient( linear, left top, left bottom, color-stop(0%,$top), color-stop(100%,$bottom) ); 5 | background: -webkit-linear-gradient( top, $top 0%, $bottom 100% ); 6 | background: -o-linear-gradient( top, $top 0%, $bottom 100% ); 7 | background: -ms-linear-gradient( top, $top 0%, $bottom 100% ); 8 | background: linear-gradient( top, $top 0%, $bottom 100% ); 9 | } 10 | 11 | @mixin horizontal-gradient( $top, $bottom ) { 12 | background: $top; 13 | background: -moz-linear-gradient( left, $top 0%, $bottom 100% ); 14 | background: -webkit-gradient( linear, left top, right top, color-stop(0%,$top), color-stop(100%,$bottom) ); 15 | background: -webkit-linear-gradient( left, $top 0%, $bottom 100% ); 16 | background: -o-linear-gradient( left, $top 0%, $bottom 100% ); 17 | background: -ms-linear-gradient( left, $top 0%, $bottom 100% ); 18 | background: linear-gradient( left, $top 0%, $bottom 100% ); 19 | } 20 | 21 | @mixin radial-gradient( $outer, $inner, $type: circle ) { 22 | background: $outer; 23 | background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 24 | background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); 25 | background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 26 | background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 27 | background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 28 | background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); 29 | } -------------------------------------------------------------------------------- /intro/css/theme/README.md: -------------------------------------------------------------------------------- 1 | ## Dependencies 2 | 3 | Themes are written using Sass to keep things modular and reduce the need for repeated selectors across files. Make sure that you have the reveal.js development environment including the Grunt dependencies installed before proceding: https://github.com/hakimel/reveal.js#full-setup 4 | 5 | ## Creating a Theme 6 | 7 | To create your own theme, start by duplicating any ```.scss``` file in [/css/theme/source](https://github.com/hakimel/reveal.js/blob/master/css/theme/source) and adding it to the compilation list in the [Gruntfile](https://github.com/hakimel/reveal.js/blob/master/Gruntfile.js). 8 | 9 | Each theme file does four things in the following order: 10 | 11 | 1. **Include [/css/theme/template/mixins.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/mixins.scss)** 12 | Shared utility functions. 13 | 14 | 2. **Include [/css/theme/template/settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss)** 15 | Declares a set of custom variables that the template file (step 4) expects. Can be overridden in step 3. 16 | 17 | 3. **Override** 18 | This is where you override the default theme. Either by specifying variables (see [settings.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/settings.scss) for reference) or by adding any selectors and styles you please. 19 | 20 | 4. **Include [/css/theme/template/theme.scss](https://github.com/hakimel/reveal.js/blob/master/css/theme/template/theme.scss)** 21 | The template theme file which will generate final CSS output based on the currently defined variables. 22 | 23 | When you are done, run `grunt css-themes` to compile the Sass file to CSS and you are ready to use your new theme. 24 | -------------------------------------------------------------------------------- /8/TXTLoader.js: -------------------------------------------------------------------------------- 1 | var TXTLoader = function(){ 2 | 3 | function TXTLoader() 4 | { 5 | 6 | this.req = new XMLHttpRequest(); 7 | var scope = this; 8 | this.req.onload = function( e ) 9 | { 10 | //un tableau d'objets 11 | var data = []; 12 | 13 | //on isole chaque ligne du fichier reçu 14 | 15 | data = e.target.responseText.split( "\n") 16 | 17 | //on enlève les entrées vides 18 | 19 | .filter( function( str ) 20 | { 21 | return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length != 0; 22 | }) 23 | 24 | //convertit chaque entrée en tableau de valeurs 25 | 26 | .map( function( str ) 27 | { 28 | //enlève la ponctuation 29 | 30 | var value = str.replace(/[^\w\s]/gi, ''); 31 | 32 | return value.split( scope.separator ) 33 | 34 | //enlève les blocs vides 35 | 36 | .filter( function( str ) 37 | { 38 | return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length != 0; 39 | }); 40 | }); 41 | 42 | //appelle la méthode de rappel en lui passant le tableau de mots 43 | scope.callback( data ); 44 | 45 | }; 46 | } 47 | 48 | 49 | function load( url, callback, separator ) 50 | { 51 | this.callback = callback; 52 | this.separator = separator || " "; 53 | 54 | this.req.open( "GET", url ); 55 | this.req.send(); 56 | 57 | } 58 | 59 | var _p = TXTLoader.prototype; 60 | _p.constructor = TXTLoader; 61 | _p.load = load; 62 | return TXTLoader; 63 | 64 | }(); -------------------------------------------------------------------------------- /8/plotters/plotQuadraticCompare.js: -------------------------------------------------------------------------------- 1 | //dessine les connexions entre deux séries réorganisées 2 | function plotQuadraticCompare( ctx, data, values0, values1 ) 3 | { 4 | //assigne le contexte à l'utilistaire de dessin 5 | G.ctx = ctx; 6 | 7 | //positionne et écrit les titres des colonnes 8 | var left = 50, right = width - 50; 9 | G.text( 'T', 16, left + 10, 20 ); 10 | G.text( 'FF', 16, right - 16, 20 ); 11 | 12 | //tableaux temporaires pour stocker les valeurs sous forme d'objets 13 | var ts = [], ffs = []; 14 | data.forEach( function(item, i ){ 15 | ts.push( { id : i, val : item.t, x: left + 10 } ); 16 | ffs.push( { id : i, val : item.ff, x:right - 10 } ); 17 | }); 18 | 19 | //classe et dessine les temperatures par ordre croissant 20 | ts.sort( function(a,b){ return a.val - b.val }); 21 | ts.forEach(function(o, i) { G.text(o.val, 5, o.x, 40 + i * 7 ); }); 22 | 23 | //classe et dessine les vitesses du vent par ordre croissant 24 | ffs.sort( function(a,b){ return a.val - b.val }); 25 | ffs.forEach(function(o, i){ G.text(o.val, 5, o.x, 40 + i * 7 ); }); 26 | 27 | //crée 4 variables pour dessiner les courbes (points de controle) 28 | var a = new Point(), b = new Point(), c = new Point(), d = new Point(); 29 | ts.forEach( function( o, i ){ 30 | 31 | a.x = o.x + 25; 32 | b.x = o.x + 25 + width / 2; 33 | a.y = b.y = 40 + i * 7; 34 | 35 | var ff = ffs[o.id ]; 36 | c.x = ff.x - 3 - width / 2; 37 | d.x = ff.x - 3; 38 | c.y = d.y = 40 + o.id * 7; 39 | 40 | //dessine en rouge ou en bleu si la température arrive avant ou 41 | //après le vent dans la liste réorganisée (on compare les Y, pas VAL ) 42 | if( a.y < c.y )ctx.strokeStyle = "rgba(255,0,0,.5)"; 43 | else ctx.strokeStyle = "rgba(0,153,204,.5)"; 44 | 45 | G.bezierCurve(a,b,c,d ); 46 | 47 | }); 48 | } 49 | -------------------------------------------------------------------------------- /8/utils/metrics.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by nico on 22/10/2015. 3 | */ 4 | var metrics = function(exports) 5 | { 6 | /******************* 7 | * 8 | * stats 9 | * 10 | *******************/ 11 | 12 | exports.mean = function( values ) 13 | { 14 | var mean = 0; 15 | values.forEach( function( e, i, a ) 16 | { 17 | mean += e.value; 18 | } ); 19 | mean /= values.length; 20 | return mean; 21 | }; 22 | 23 | exports.variance = function( values ) 24 | { 25 | var result = 0; 26 | 27 | var mean_value = this.mean( values ); 28 | var count = values.length; 29 | 30 | values.forEach( function( e, i, a ) 31 | { 32 | result += Math.pow( ( e.value - mean_value ), 2 ); 33 | } ); 34 | return result / count; 35 | }; 36 | 37 | /** 38 | * méthode qui renvoie les bornes d'une clé sur l'objet data 39 | * @param data le set de données 40 | * @param key la clé dont on veut récupérer les minimums/maximum 41 | * @returns {*[]} un tableau contenant les bornes minimums/maximum de la clé 42 | */ 43 | exports.getBounds = function( data, key ) 44 | { 45 | var min = Math.pow( 2, 53 ); 46 | var max = -Math.pow( 2, 53 ); 47 | 48 | data.forEach(function(obj) { 49 | 50 | min = Math.min( min, obj[key] ); 51 | max = Math.max( max, obj[key] ); 52 | 53 | }); 54 | return [min, max]; 55 | }; 56 | 57 | /** 58 | * enlève les espaces de début et de fin de la chaîne de caractère 59 | */ 60 | exports.trim = function( string ) 61 | { 62 | return string.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); 63 | }; 64 | 65 | /** 66 | * enlève les signes de ponctuation de la chaîne de caractère 67 | */ 68 | exports.removePunctuation = function( string ) 69 | { 70 | return string.replace(/[^\w\s]/gi, ''); 71 | }; 72 | 73 | return exports; 74 | 75 | }({}); -------------------------------------------------------------------------------- /base.js: -------------------------------------------------------------------------------- 1 | 2 | //déclaration de 2 variables w et h pour stocker la taille de l'écran 3 | var w = window.innerWidth; 4 | var h = window.innerHeight; 5 | 6 | //méthode de création d'un contexte graphique 7 | function getContext(w,h) { 8 | 9 | var canvas = document.createElement( "canvas" ); 10 | canvas.width = w; 11 | canvas.height = h; 12 | return canvas.getContext( "2d" ); 13 | } 14 | 15 | //creation du contexte 2D 16 | var ctx = getContext( w, h ); 17 | var canvas = ctx.canvas; 18 | document.body.appendChild( canvas ); 19 | 20 | 21 | //étend le contexte sur toute la surface de la fenêtre et assigne les valeurs de w et h 22 | function onResize(){ 23 | 24 | w = window.innerWidth; 25 | h = window.innerHeight; 26 | ctx.canvas.width = w; 27 | ctx.canvas.height = h; 28 | } 29 | window.addEventListener( "resize", onResize, false ); 30 | 31 | 32 | 33 | //méthodes utiles 34 | function lerp ( t, a, b ){ return a + t * ( b - a ); } 35 | function norm( t, a, b ){return ( t - a ) / ( b - a );} 36 | function map( t, a0, b0, a1, b1 ){ return lerp( norm( t, a0, b0 ), a1, b1 );} 37 | 38 | //constantes 39 | var PI = Math.PI; 40 | var PI2 = PI * 2; 41 | var RAD = PI / 180; 42 | 43 | //polyfill pour le requestAnimationFrame (mieux qu'un setInterval): 44 | //https://github.com/cagosta/requestAnimationFrame/blob/master/app/requestAnimationFrame.js 45 | (function(global) {(function() {if (global.requestAnimationFrame) {return;} if (global.webkitRequestAnimationFrame) {global.requestAnimationFrame = global[ 'webkitRequestAnimationFrame' ]; global.cancelAnimationFrame = global[ 'webkitCancelAnimationFrame' ] || global[ 'webkitCancelRequestAnimationFrame' ];} var lastTime = 0; global.requestAnimationFrame = function(callback) {var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = global.setTimeout(function() {callback(currTime + timeToCall);}, timeToCall); lastTime = currTime + timeToCall; return id;}; global.cancelAnimationFrame = function(id) {clearTimeout(id);};})(); if (typeof define === 'function') {define(function() {return global.requestAnimationFrame;});}})(window); 46 | -------------------------------------------------------------------------------- /intro/css/theme/source/blood.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Blood theme for reveal.js 3 | * Author: Walther http://github.com/Walther 4 | * 5 | * Designed to be used with highlight.js theme 6 | * "monokai_sublime.css" available from 7 | * https://github.com/isagalaev/highlight.js/ 8 | * 9 | * For other themes, change $codeBackground accordingly. 10 | * 11 | */ 12 | 13 | // Default mixins and settings ----------------- 14 | @import "../template/mixins"; 15 | @import "../template/settings"; 16 | // --------------------------------------------- 17 | 18 | // Include theme-specific fonts 19 | 20 | @import url(https://fonts.googleapis.com/css?family=Ubuntu:300,700,300italic,700italic); 21 | 22 | // Colors used in the theme 23 | $blood: #a23; 24 | $coal: #222; 25 | $codeBackground: #23241f; 26 | 27 | $backgroundColor: $coal; 28 | 29 | // Main text 30 | $mainFont: Ubuntu, 'sans-serif'; 31 | $mainFontSize: 36px; 32 | $mainColor: #eee; 33 | 34 | // Headings 35 | $headingFont: Ubuntu, 'sans-serif'; 36 | $headingTextShadow: 2px 2px 2px $coal; 37 | 38 | // h1 shadow, borrowed humbly from 39 | // (c) Default theme by Hakim El Hattab 40 | $heading1TextShadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 20px 20px rgba(0,0,0,.15); 41 | 42 | // Links 43 | $linkColor: $blood; 44 | $linkColorHover: lighten( $linkColor, 20% ); 45 | 46 | // Text selection 47 | $selectionBackgroundColor: $blood; 48 | $selectionColor: #fff; 49 | 50 | 51 | // Theme template ------------------------------ 52 | @import "../template/theme"; 53 | // --------------------------------------------- 54 | 55 | // some overrides after theme template import 56 | 57 | .reveal p { 58 | font-weight: 300; 59 | text-shadow: 1px 1px $coal; 60 | } 61 | 62 | .reveal h1, 63 | .reveal h2, 64 | .reveal h3, 65 | .reveal h4, 66 | .reveal h5, 67 | .reveal h6 { 68 | font-weight: 700; 69 | } 70 | 71 | .reveal p code { 72 | background-color: $codeBackground; 73 | display: inline-block; 74 | border-radius: 7px; 75 | } 76 | 77 | .reveal small code { 78 | vertical-align: baseline; 79 | } -------------------------------------------------------------------------------- /8/utils/cardinal.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by nico on 23/11/13. 3 | */ 4 | 5 | var Cardinal = function( exports ) 6 | { 7 | 8 | 9 | exports.compute = function( points, precision, tension, loop ) 10 | { 11 | 12 | precision = Math.max( .01, Math.min( 1, precision ||.1 ) ); 13 | tension = Math.max( -5, Math.min( 5, tension || 1 ) ); 14 | loop = Boolean( loop ); 15 | 16 | 17 | 18 | var tmp = [], 19 | p0, 20 | p1, 21 | p2, 22 | p3, 23 | i = 0, 24 | t = 0; 25 | 26 | for (i = 0; i < points.length - ( loop ? 0 : 1 ); i++) 27 | { 28 | 29 | p0 = (i < 1) ? points [points.length - 1] : points [i - 1]; 30 | p1 = points [i]; 31 | p2 = points [(i +1 + points.length) % points.length]; 32 | p3 = points [(i +2 + points.length) % points.length]; 33 | 34 | for ( t= 0; t < 1; t += precision ) 35 | { 36 | 37 | tmp.push( new Point( 38 | // x 39 | tension * ( -t * t * t + 2 * t * t - t) * p0.x + 40 | tension * ( -t * t * t + t * t) * p1.x + 41 | (2 * t * t * t - 3 * t * t + 1) * p1.x + 42 | tension * (t * t * t - 2 * t * t + t) * p2.x + 43 | ( -2 * t * t * t + 3 * t * t) * p2.x + 44 | tension * (t * t * t - t * t) * p3.x, 45 | 46 | // y 47 | tension * ( -t * t * t + 2 * t * t - t) * p0.y + 48 | tension * ( -t * t * t + t * t) * p1.y + 49 | (2 * t * t * t - 3 * t * t + 1) * p1.y + 50 | tension * (t * t * t - 2 * t * t + t) * p2.y + 51 | ( -2 * t * t * t + 3 * t * t) * p2.y + 52 | tension * (t * t * t - t * t) * p3.y 53 | 54 | ) ); 55 | } 56 | } 57 | if( loop && points.length > 0 )tmp.push( points[ 0 ]); 58 | return tmp; 59 | }; 60 | return exports; 61 | }({}); -------------------------------------------------------------------------------- /intro/lib/css/zenburn.css: -------------------------------------------------------------------------------- 1 | /* 2 | Zenburn style from voldmar.ru (c) Vladimir Epifanov 3 | based on dark.css by Ivan Sagalaev 4 | */ 5 | 6 | .hljs { 7 | display: block; 8 | overflow-x: auto; 9 | padding: 0.5em; 10 | background: #3f3f3f; 11 | color: #dcdcdc; 12 | -webkit-text-size-adjust: none; 13 | } 14 | 15 | .hljs-keyword, 16 | .hljs-tag, 17 | .css .hljs-class, 18 | .css .hljs-id, 19 | .lisp .hljs-title, 20 | .nginx .hljs-title, 21 | .hljs-request, 22 | .hljs-status, 23 | .clojure .hljs-attribute { 24 | color: #e3ceab; 25 | } 26 | 27 | .django .hljs-template_tag, 28 | .django .hljs-variable, 29 | .django .hljs-filter .hljs-argument { 30 | color: #dcdcdc; 31 | } 32 | 33 | .hljs-number, 34 | .hljs-date { 35 | color: #8cd0d3; 36 | } 37 | 38 | .dos .hljs-envvar, 39 | .dos .hljs-stream, 40 | .hljs-variable, 41 | .apache .hljs-sqbracket, 42 | .hljs-name { 43 | color: #efdcbc; 44 | } 45 | 46 | .dos .hljs-flow, 47 | .diff .hljs-change, 48 | .python .exception, 49 | .python .hljs-built_in, 50 | .hljs-literal, 51 | .tex .hljs-special { 52 | color: #efefaf; 53 | } 54 | 55 | .diff .hljs-chunk, 56 | .hljs-subst { 57 | color: #8f8f8f; 58 | } 59 | 60 | .dos .hljs-keyword, 61 | .hljs-decorator, 62 | .hljs-title, 63 | .hljs-type, 64 | .diff .hljs-header, 65 | .ruby .hljs-class .hljs-parent, 66 | .apache .hljs-tag, 67 | .nginx .hljs-built_in, 68 | .tex .hljs-command, 69 | .hljs-prompt { 70 | color: #efef8f; 71 | } 72 | 73 | .dos .hljs-winutils, 74 | .ruby .hljs-symbol, 75 | .ruby .hljs-symbol .hljs-string, 76 | .ruby .hljs-string { 77 | color: #dca3a3; 78 | } 79 | 80 | .diff .hljs-deletion, 81 | .hljs-string, 82 | .hljs-tag .hljs-value, 83 | .hljs-preprocessor, 84 | .hljs-pragma, 85 | .hljs-built_in, 86 | .smalltalk .hljs-class, 87 | .smalltalk .hljs-localvars, 88 | .smalltalk .hljs-array, 89 | .css .hljs-rule .hljs-value, 90 | .hljs-attr_selector, 91 | .hljs-pseudo, 92 | .apache .hljs-cbracket, 93 | .tex .hljs-formula, 94 | .coffeescript .hljs-attribute { 95 | color: #cc9393; 96 | } 97 | 98 | .hljs-shebang, 99 | .diff .hljs-addition, 100 | .hljs-comment, 101 | .hljs-annotation, 102 | .hljs-pi, 103 | .hljs-doctype { 104 | color: #7f9f7f; 105 | } 106 | 107 | .coffeescript .javascript, 108 | .javascript .xml, 109 | .tex .hljs-formula, 110 | .xml .javascript, 111 | .xml .vbscript, 112 | .xml .css, 113 | .xml .hljs-cdata { 114 | opacity: 0.5; 115 | } -------------------------------------------------------------------------------- /4/1_variable_N_dimensions.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /8/CSVLoader.js: -------------------------------------------------------------------------------- 1 | var CSVLoader = function(){ 2 | 3 | function CSVLoader() 4 | { 5 | 6 | this.req = new XMLHttpRequest(); 7 | var scope = this; 8 | this.req.onload = function( e ) 9 | { 10 | //un tableau d'objets 11 | var data = []; 12 | 13 | //on isole chaque ligne du fichier reçu 14 | 15 | data = e.target.responseText.split( "\n") 16 | 17 | //on enlève les entrées vides 18 | 19 | .filter( function( str ) 20 | { 21 | return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '').length != 0; 22 | }) 23 | 24 | //convertit chaque entrée en tableau de valeurs 25 | 26 | .map( function( str ) 27 | { 28 | return str.split( scope.separator ) 29 | //caste les valeurs numériques en chiffres 30 | .map( function( s ) 31 | { 32 | if( !isNaN( parseFloat( s ) ) )return parseFloat( s ); 33 | return s; 34 | }); 35 | }) 36 | 37 | //convertit chaque entrée en objet pour pouvoir accéder plus facilement aux informations 38 | 39 | .map( function( input, i, arr ) 40 | { 41 | //on crée un objet pour stocker les infos 42 | 43 | var obj = {}; 44 | 45 | //on se sert des clés de la première entrée 46 | 47 | var keys = arr[ 0 ]; 48 | keys.forEach( function( key, id ) 49 | { 50 | obj[ key ] = input[ id ]; 51 | }); 52 | 53 | return obj; 54 | }); 55 | 56 | 57 | //on supprime la première entrée (le descriptif des champs ) 58 | data.shift(); 59 | 60 | //appelle la méthode de rappel en lui passant le tableau d'objets 61 | scope.callback( data ); 62 | 63 | }; 64 | } 65 | 66 | 67 | function load( url, callback, separator ) 68 | { 69 | this.callback = callback; 70 | this.separator = separator || ";"; 71 | 72 | this.req.open( "GET", url ); 73 | this.req.send(); 74 | 75 | } 76 | 77 | var _p = CSVLoader.prototype; 78 | _p.constructor = CSVLoader; 79 | _p.load = load; 80 | return CSVLoader; 81 | 82 | }(); -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/tutorial.css: -------------------------------------------------------------------------------- 1 | .tutorial { 2 | margin-right:50px; 3 | } 4 | object, embed { 5 | margin:0; 6 | padding:0; 7 | border-width:0; 8 | } 9 | .tutorial .flash { 10 | border:1px solid #822; 11 | padding:1em; 12 | } 13 | 14 | .tutorial h3 { 15 | color:#015; 16 | font-size:12pt; 17 | margin-top:2em; 18 | border-bottom:1px solid #DDD; 19 | } 20 | 21 | .tutorial .index { 22 | margin:.5em; 23 | padding:1em; 24 | border:1px solid #666; 25 | } 26 | .tutorial .index h4 { 27 | margin:0; 28 | border-bottom:1px solid #AAA; 29 | } 30 | .tutorial .term { 31 | font-style: italic; 32 | color: #CC3300; 33 | } 34 | .tutorial p.pagenumbers { 35 | font-size:.8em; 36 | } 37 | 38 | .tutorial p.image { 39 | width:675px; 40 | text-align:center; 41 | font-size:.8em; 42 | color:#333; 43 | margin-top:2em; 44 | margin-bottom:2em; 45 | } 46 | .tutorial p.image img { 47 | margin:1em; 48 | } 49 | .tutorial img.inline-left { 50 | float:left; 51 | margin: 0 1em .5em 0; 52 | } 53 | 54 | .tutorial div.note { 55 | width:650px; 56 | margin:2em 13px; 57 | border:1px solid #999; 58 | } 59 | .tutorial div.note h4, .tutorial div.note p { 60 | margin:0; 61 | padding:.5em; 62 | } 63 | .tutorial div.note h4 { 64 | font-size:1em; 65 | background:#FFE url(../images/icons/icon_notepin.gif) no-repeat 2px 4px; 66 | border-bottom:1px solid #999; 67 | padding-left:22px; 68 | } 69 | .tutorial div.note pre { 70 | width:600px; 71 | } 72 | .tutorial pre i { 73 | color:#999; 74 | } 75 | .tutorial pre.style { 76 | background-color: #F2E6EF; 77 | border: 1px solid #D2A4C1; 78 | } 79 | .tutorial pre.html { 80 | background-color: #E6EFF2; 81 | border: 1px solid #A4C1D2; 82 | } 83 | .tutorial .footnote { 84 | font-size:.8em; 85 | color:#666; 86 | } 87 | .tutorial .warning, .tutorial .alert { 88 | color:red; 89 | } 90 | 91 | table.table { 92 | border-collapse:collapse; 93 | } 94 | table.table th, table.table td { 95 | border:1px solid black; 96 | padding:3px; 97 | } 98 | table.table thead th { 99 | color:#333; 100 | background-color:#EEE; 101 | } 102 | table.table th { 103 | color:white; 104 | background-color:#666; 105 | } 106 | 107 | .new-content1 { 108 | padding-left:1em; 109 | border-left:3px solid #0A0; 110 | } 111 | .new-content2 { 112 | padding-left:1em; 113 | border-left:3px solid #8FEA8F; 114 | } 115 | .new-content3 { 116 | padding-left:1em; 117 | border-left:3px solid #D4FDD4; 118 | } 119 | .hidden { 120 | display:none; 121 | } -------------------------------------------------------------------------------- /8/lorem_ipsum.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam et ante vestibulum, hendrerit tellus id, imperdiet libero. Integer vitae augue ut ex rutrum dignissim quis sed velit. Vestibulum a enim odio. Duis eu mauris lobortis, porta nunc nec, euismod risus. Sed id erat non enim tempor dapibus et sed libero. Ut id mattis nibh, at convallis mi. In velit lectus, viverra id enim et, luctus mattis elit. Sed bibendum tristique libero, vitae accumsan erat. Proin rhoncus lectus a lorem fringilla dictum. Nullam sed justo lobortis, sagittis lacus congue, tempor massa. Aliquam vitae semper augue, tempus viverra purus. Proin lobortis turpis sed dignissim dignissim. Vivamus tellus tellus, tempus eu commodo a, interdum vel mauris. 2 | 3 | Ut sed laoreet lectus. Etiam vulputate a erat eget elementum. Etiam tristique dolor sollicitudin, pharetra massa quis, porttitor enim. Duis feugiat ornare pulvinar. Curabitur nec mauris ut velit aliquam commodo. Etiam in commodo lacus. Donec rhoncus id eros quis congue. 4 | 5 | Pellentesque diam augue, luctus vitae diam et, feugiat condimentum arcu. Maecenas pellentesque sem odio, dictum vehicula justo facilisis sed. Nunc facilisis urna et lectus ultrices fringilla. Vivamus ut magna ut eros fermentum accumsan. Curabitur nec tellus vel eros faucibus eleifend id id lorem. Duis quis blandit quam. Duis pellentesque metus accumsan nulla sagittis placerat. Maecenas dignissim, dolor nec tristique ultricies, nunc eros sollicitudin lorem, et rutrum turpis nisi vitae tellus. Morbi a magna ac nunc convallis iaculis ut at dui. Pellentesque vitae scelerisque turpis. 6 | 7 | Vivamus dictum hendrerit ultricies. Etiam eleifend sodales nisl, vitae tincidunt odio rutrum ut. Proin nec euismod tortor. In condimentum hendrerit sodales. Suspendisse aliquam ultricies ligula eget euismod. Duis sit amet facilisis sapien. Integer sodales malesuada velit. Fusce efficitur neque ac nisi venenatis aliquam. Duis hendrerit dignissim velit. Maecenas ut congue turpis, quis pellentesque erat. In lacus nunc, convallis nec tellus nec, ullamcorper facilisis eros. Cras ultricies lectus quis pellentesque euismod. Vestibulum scelerisque varius urna. Curabitur eleifend elementum turpis, a tristique felis sodales tempus. Sed pellentesque quis neque eu sodales. 8 | 9 | Aliquam sed nunc quis leo efficitur pharetra. Duis commodo sapien a nisi sollicitudin, at ornare dui eleifend. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ligula magna, pharetra sed pellentesque sed, commodo sed ex. Integer tristique, est vel mattis hendrerit, ante ligula pulvinar risus, eu convallis odio felis id augue. Suspendisse imperdiet ligula vel mi convallis, vitae fermentum sem imperdiet. Nunc vitae urna efficitur enim elementum tincidunt. Cras dictum hendrerit nunc. Quisque dignissim mauris est, vitae efficitur orci suscipit vel. Nam at posuere risus. -------------------------------------------------------------------------------- /intro/lib/js/head.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | Head JS The only script in your 3 | Copyright Tero Piirainen (tipiirai) 4 | License MIT / http://bit.ly/mit-license 5 | Version 0.96 6 | 7 | http://headjs.com 8 | */(function(a){function z(){d||(d=!0,s(e,function(a){p(a)}))}function y(c,d){var e=a.createElement("script");e.type="text/"+(c.type||"javascript"),e.src=c.src||c,e.async=!1,e.onreadystatechange=e.onload=function(){var a=e.readyState;!d.done&&(!a||/loaded|complete/.test(a))&&(d.done=!0,d())},(a.body||b).appendChild(e)}function x(a,b){if(a.state==o)return b&&b();if(a.state==n)return k.ready(a.name,b);if(a.state==m)return a.onpreload.push(function(){x(a,b)});a.state=n,y(a.url,function(){a.state=o,b&&b(),s(g[a.name],function(a){p(a)}),u()&&d&&s(g.ALL,function(a){p(a)})})}function w(a,b){a.state===undefined&&(a.state=m,a.onpreload=[],y({src:a.url,type:"cache"},function(){v(a)}))}function v(a){a.state=l,s(a.onpreload,function(a){a.call()})}function u(a){a=a||h;var b;for(var c in a){if(a.hasOwnProperty(c)&&a[c].state!=o)return!1;b=!0}return b}function t(a){return Object.prototype.toString.call(a)=="[object Function]"}function s(a,b){if(!!a){typeof a=="object"&&(a=[].slice.call(a));for(var c=0;c 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 116 | 117 | -------------------------------------------------------------------------------- /1/0_point_rectangle.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 112 | 113 | -------------------------------------------------------------------------------- /8/utils/quadratic.js: -------------------------------------------------------------------------------- 1 | var quadratic = function(exports) 2 | { 3 | 4 | 5 | 6 | exports.compute = function( anchors, precision, loop ) 7 | { 8 | 9 | var i, t; 10 | 11 | exports.anchors = anchors; 12 | 13 | precision = Math.max( .01, Math.min( 1, precision ) ); 14 | 15 | exports.loop = Boolean( loop ); 16 | exports.vertices = []; 17 | for ( i = 0; i < anchors.length; i++ ) 18 | { 19 | 20 | for ( t = 0; t < 1; t+= precision ) 21 | { 22 | 23 | exports.vertices.push( exports.computePointAt( i, t ) ); 24 | 25 | } 26 | 27 | } 28 | return exports.vertices; 29 | 30 | }; 31 | 32 | exports.computePointAt = function( i, t ) 33 | { 34 | 35 | var p0 = exports.p0 || ( exports.p0 = new Point() ), 36 | p1 = exports.anchors[ i ], 37 | p2 = exports.p2 || ( exports.p2 = new Point() ); 38 | 39 | if( i == 0 ) 40 | { 41 | 42 | if ( exports.loop == true ) 43 | { 44 | 45 | p0.x = ( exports.anchors[ exports.anchors.length-1 ].x + exports.anchors[ i ].x ) / 2; 46 | p0.y = ( exports.anchors[ exports.anchors.length-1 ].y + exports.anchors[ i ].y ) / 2; 47 | p0.z = ( exports.anchors[ exports.anchors.length-1 ].z + exports.anchors[ i ].z ) / 2; 48 | 49 | }else{ 50 | 51 | p0 = exports.anchors[ i ]; 52 | } 53 | 54 | } 55 | else 56 | { 57 | 58 | p0.x = ( exports.anchors[ i - 1 ].x + exports.anchors[ i ].x ) / 2; 59 | p0.y = ( exports.anchors[ i - 1 ].y + exports.anchors[ i ].y ) / 2; 60 | p0.z = ( exports.anchors[ i - 1 ].z + exports.anchors[ i ].z ) / 2; 61 | 62 | } 63 | 64 | 65 | if( i == exports.anchors.length - 1 ) 66 | { 67 | 68 | if (exports.loop == true) 69 | { 70 | 71 | p2.x=( exports.anchors[ i ].x + exports.anchors[0].x ) / 2; 72 | p2.y=( exports.anchors[ i ].y + exports.anchors[0].y ) / 2; 73 | p2.z=( exports.anchors[ i ].z + exports.anchors[0].z ) / 2; 74 | 75 | } 76 | else 77 | { 78 | 79 | p2 = exports.anchors[ i ]; 80 | } 81 | 82 | } 83 | else 84 | { 85 | 86 | p2.x = ( exports.anchors[ i + 1 ].x + exports.anchors[ i ].x ) / 2; 87 | p2.y = ( exports.anchors[ i + 1 ].y + exports.anchors[ i ].y ) / 2; 88 | p2.z = ( exports.anchors[ i + 1 ].z + exports.anchors[ i ].z ) / 2; 89 | 90 | } 91 | 92 | 93 | var t1 = 1 - t; 94 | var t2 = t1 * t1; 95 | var t3 = 2 * t * t1; 96 | var t4 = t * t; 97 | 98 | return new Point( t2 * p0.x + t3 * p1.x + t4 * p2.x, 99 | t2 * p0.y + t3 * p1.y + t4 * p2.y ); 100 | 101 | 102 | }; 103 | 104 | exports.getPositionAt = function( t ) 105 | { 106 | 107 | var length = exports.anchors.length; 108 | var i0 = Math.floor( length * t ); 109 | i0 = i0 < length - 1 ? i0 : length - 1; 110 | var delta = 1 / length; 111 | return exports.computePointAt( i0, ( t - ( i0 * delta ) ) / delta ); 112 | 113 | }; 114 | 115 | return exports; 116 | 117 | }({}); -------------------------------------------------------------------------------- /4/0_variable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 26 | 27 | 28 | 29 | 30 | 31 | 32 |
33 | 34 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /1/2_polygones.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 131 | 132 | -------------------------------------------------------------------------------- /8/utils/simplify.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by nico on 06/11/13. 3 | */ 4 | //adapted from http://geometryalgorithms.com/Archive/algorithm_0205/algorithm_0205.htm 5 | 6 | //original copyright message follows 7 | 8 | // Copyright 2002, softSurfer (www.softsurfer.com) 9 | // This code may be freely used and modified for any purpose 10 | // providing that this copyright notice is included with it. 11 | // SoftSurfer makes no warranty for this code, and cannot be held 12 | // liable for any real or imagined damage resulting from its use. 13 | // Users of this code must verify correctness for their application. 14 | 15 | /** 16 | * This method will reduce a 2D complex polyline. 17 | * @param tol the tolerance of the reduction algorithm. Higher numbers will simplify the line more. 18 | * @param V the array of Tuple2fs to be simplified 19 | * @return an array of Tuple2f representing the simplified polyline 20 | */ 21 | 22 | var simplify = new function(exports){ 23 | 24 | 25 | exports.compute = function( vertices, tol ) 26 | { 27 | 28 | 29 | var n = vertices.length; 30 | var i, b, k, m, pv = 0; 31 | var tol2 = tol * tol; 32 | 33 | var tmp = new Array( n ); 34 | var marked = new Array( n ); 35 | 36 | for ( b = 0; b < n; b++) 37 | { 38 | marked[ b ] = 0; 39 | } 40 | 41 | //STAGE 1 simple vertex reduction 42 | tmp[0] = vertices[0]; 43 | 44 | for (i = k = 1, pv = 0; i < n; i++) 45 | { 46 | if ( exports.distanceSquared( vertices[ i ], vertices[ pv ] ) < tol2 ) continue; 47 | 48 | tmp[k++] = vertices[i]; 49 | 50 | pv = i; 51 | 52 | } 53 | 54 | //adding last Vertex 55 | if (pv < n - 1) tmp[k++] = vertices[n - 1]; 56 | 57 | //STAGE 2 Douglas-Peucker polyline simplify 58 | //mark the first and last vertices 59 | marked[0] = marked[k - 1] = 1; 60 | 61 | exports.simplify( tol, tmp, 0, k - 1, marked ); 62 | 63 | //copy marked vertices to output 64 | var out = []; 65 | for (i = m = 0; i < k; i++) 66 | { 67 | 68 | if (marked[i] == 1) out.push(tmp[i]); 69 | 70 | } 71 | 72 | return out.concat(); 73 | 74 | }; 75 | 76 | 77 | exports.simplify = function( tol, v, j, k, mk ) 78 | { 79 | 80 | if( k <= j+1 ) return; //nothing to simplify 81 | 82 | var maxi = j; 83 | var maxd2 = 0; 84 | var tol2 = tol * tol; 85 | 86 | var u = new Point( v[ k ].x- v[j].x, v[k].y - v[j].y );//v[ k ].subtract(v[j]); 87 | 88 | var cu = (u.x*u.x + u.y*u.y); 89 | 90 | var Pb = new Point(0,0);//points 91 | var b = 0, cw = 0, dv2 = 0; 92 | var i; 93 | for ( i = j + 1; i < k; i++ ) 94 | { 95 | v.x = v[i].x-v[j].x; 96 | v.y = v[i].y-v[j].y; 97 | cw = u.x*v.x + u.y*v.y; 98 | 99 | if (cw <= 0) 100 | { 101 | dv2 = exports.distanceSquared(v[i],v[j]); 102 | } 103 | else if (cu <= cw) 104 | { 105 | dv2 = exports.distanceSquared(v[i],v[k]); 106 | } 107 | else 108 | { 109 | b = cw / cu; 110 | u.x *= -b; 111 | u.y *= -b; 112 | Pb.x = v[j].x- u.x; 113 | Pb.y = v[j].y- u.y; 114 | dv2 = exports.distanceSquared(v[i], Pb); 115 | } 116 | 117 | if (dv2 <= maxd2) continue; 118 | maxi = i; 119 | maxd2 = dv2; 120 | 121 | } 122 | 123 | if (maxd2 > tol2) 124 | { 125 | 126 | mk[maxi] = 1; 127 | exports.simplify(tol, v, j, maxi, mk); 128 | exports.simplify(tol, v, maxi, k, mk); 129 | 130 | } 131 | }; 132 | 133 | exports.distanceSquared = function( a, b ) 134 | { 135 | return ( ( a.x - b.x ) * ( a.x - b.x ) + ( a.y - b.y ) * ( a.y - b.y ) ); 136 | }; 137 | return exports; 138 | 139 | }({}); 140 | -------------------------------------------------------------------------------- /0/1_hello_world.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 48 | 49 | 50 | 51 | 138 | 139 | -------------------------------------------------------------------------------- /2/2_angle_distance.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 142 | 143 | -------------------------------------------------------------------------------- /intro/lib/font/source-sans-pro/LICENSE: -------------------------------------------------------------------------------- 1 | SIL Open Font License 2 | 3 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 4 | 5 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 6 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 7 | 8 | —————————————————————————————- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | —————————————————————————————- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. 14 | 15 | The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. 16 | 17 | DEFINITIONS 18 | “Font Software” refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. 19 | 20 | “Reserved Font Name” refers to any names specified as such after the copyright statement(s). 21 | 22 | “Original Version” refers to the collection of Font Software components as distributed by the Copyright Holder(s). 23 | 24 | “Modified Version” refers to any derivative made by adding to, deleting, or substituting—in part or in whole—any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. 25 | 26 | “Author” refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 27 | 28 | PERMISSION & CONDITIONS 29 | Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 30 | 31 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 32 | 33 | 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 34 | 35 | 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 36 | 37 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 38 | 39 | 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. 40 | 41 | TERMINATION 42 | This license becomes null and void if any of the above conditions are not met. 43 | 44 | DISCLAIMER 45 | THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. -------------------------------------------------------------------------------- /intro/css/print/pdf.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | /* SECTION 1: Set default width, margin, float, and 10 | background. This prevents elements from extending 11 | beyond the edge of the printed page, and prevents 12 | unnecessary background images from printing */ 13 | 14 | * { 15 | -webkit-print-color-adjust: exact; 16 | } 17 | 18 | body { 19 | margin: 0 auto !important; 20 | border: 0; 21 | padding: 0; 22 | float: none !important; 23 | overflow: visible; 24 | } 25 | 26 | html { 27 | width: 100%; 28 | height: 100%; 29 | overflow: visible; 30 | } 31 | 32 | /* SECTION 2: Remove any elements not needed in print. 33 | This would include navigation, ads, sidebars, etc. */ 34 | .nestedarrow, 35 | .reveal .controls, 36 | .reveal .progress, 37 | .reveal .playback, 38 | .reveal.overview, 39 | .fork-reveal, 40 | .share-reveal, 41 | .state-background { 42 | display: none !important; 43 | } 44 | 45 | /* SECTION 3: Set body font face, size, and color. 46 | Consider using a serif font for readability. */ 47 | body, p, td, li, div { 48 | 49 | } 50 | 51 | /* SECTION 4: Set heading font face, sizes, and color. 52 | Differentiate your headings from your body text. 53 | Perhaps use a large sans-serif for distinction. */ 54 | h1,h2,h3,h4,h5,h6 { 55 | text-shadow: 0 0 0 #000 !important; 56 | } 57 | 58 | .reveal pre code { 59 | overflow: hidden !important; 60 | font-family: Courier, 'Courier New', monospace !important; 61 | } 62 | 63 | 64 | /* SECTION 5: more reveal.js specific additions by @skypanther */ 65 | ul, ol, div, p { 66 | visibility: visible; 67 | position: static; 68 | width: auto; 69 | height: auto; 70 | display: block; 71 | overflow: visible; 72 | margin: auto; 73 | } 74 | .reveal { 75 | width: auto !important; 76 | height: auto !important; 77 | overflow: hidden !important; 78 | } 79 | .reveal .slides { 80 | position: static; 81 | width: 100%; 82 | height: auto; 83 | 84 | left: auto; 85 | top: auto; 86 | margin: 0 !important; 87 | padding: 0 !important; 88 | 89 | overflow: visible; 90 | display: block; 91 | 92 | -webkit-perspective: none; 93 | -moz-perspective: none; 94 | -ms-perspective: none; 95 | perspective: none; 96 | 97 | -webkit-perspective-origin: 50% 50%; /* there isn't a none/auto value but 50-50 is the default */ 98 | -moz-perspective-origin: 50% 50%; 99 | -ms-perspective-origin: 50% 50%; 100 | perspective-origin: 50% 50%; 101 | } 102 | .reveal .slides section { 103 | page-break-after: always !important; 104 | 105 | visibility: visible !important; 106 | position: relative !important; 107 | display: block !important; 108 | position: relative !important; 109 | 110 | margin: 0 !important; 111 | padding: 0 !important; 112 | box-sizing: border-box !important; 113 | min-height: 1px; 114 | 115 | opacity: 1 !important; 116 | 117 | -webkit-transform-style: flat !important; 118 | -moz-transform-style: flat !important; 119 | -ms-transform-style: flat !important; 120 | transform-style: flat !important; 121 | 122 | -webkit-transform: none !important; 123 | -moz-transform: none !important; 124 | -ms-transform: none !important; 125 | transform: none !important; 126 | } 127 | .reveal section.stack { 128 | margin: 0 !important; 129 | padding: 0 !important; 130 | page-break-after: avoid !important; 131 | height: auto !important; 132 | min-height: auto !important; 133 | } 134 | .reveal img { 135 | box-shadow: none; 136 | } 137 | .reveal .roll { 138 | overflow: visible; 139 | line-height: 1em; 140 | } 141 | 142 | /* Slide backgrounds are placed inside of their slide when exporting to PDF */ 143 | .reveal section .slide-background { 144 | display: block !important; 145 | position: absolute; 146 | top: 0; 147 | left: 0; 148 | width: 100%; 149 | z-index: -1; 150 | } 151 | 152 | /* All elements should be above the slide-background */ 153 | .reveal section>* { 154 | position: relative; 155 | z-index: 1; 156 | } 157 | 158 | /* Display slide speaker notes when 'showNotes' is enabled */ 159 | .reveal .speaker-notes-pdf { 160 | display: block; 161 | width: 100%; 162 | max-height: none; 163 | left: auto; 164 | top: auto; 165 | z-index: 100; 166 | } 167 | 168 | /* Display slide numbers when 'slideNumber' is enabled */ 169 | .reveal .slide-number { 170 | display: none; 171 | } 172 | .reveal .slide-number-pdf { 173 | display: block; 174 | position: absolute; 175 | font-size: 14px; 176 | } 177 | 178 | -------------------------------------------------------------------------------- /8/1_exercice.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /6/1_transform_operations.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /8/utils/circle.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by nico on 01/11/13. 3 | */ 4 | var Circle = function() 5 | { 6 | function Circle( x, y, r ) 7 | { 8 | this.x = x; 9 | this.y = y; 10 | this.r = r; 11 | this.scale = 1; 12 | } 13 | 14 | function lerp( t, origin, destination ) 15 | { 16 | if( origin == null || destination == null )return; 17 | this.x = origin.x + t * ( destination.x - origin.x ); 18 | this.y = origin.y + t * ( destination.y - origin.y ); 19 | this.r = origin.r + t * ( destination.r - origin.r ); 20 | } 21 | 22 | function minimumEnclosingCircle( points ) 23 | { 24 | if( points == null || points.length == 0 ) return; 25 | // Knuth shuffle 26 | var shuffled = points.slice( 0); 27 | 28 | for (var i = points.length - 1; i >= 0; i--) 29 | { 30 | var j = Math.floor(Math.random() * (i + 1)); 31 | j = Math.max(Math.min(j, i), 0); 32 | var temp = shuffled[i]; 33 | shuffled[i] = shuffled[j]; 34 | shuffled[j] = temp; 35 | } 36 | 37 | // Incrementally add points to circle 38 | var c = null; 39 | for ( i = 0; i < shuffled.length; i++) 40 | { 41 | var p = shuffled[i]; 42 | if (c == null || !this.isInCircle(c, p.x, p.y)) 43 | { 44 | c = this.circleOnePoint(shuffled.slice(0, i + 1), p); 45 | } 46 | } 47 | return c; 48 | } 49 | 50 | function circleOnePoint( points, p ) 51 | { 52 | var c = new Circle( p.x, p.y, 0 ); 53 | 54 | for( var i = 0; i < points.length; i++ ) 55 | { 56 | var q = points[i]; 57 | 58 | if (!this.isInCircle(c, q.x, q.y)) 59 | { 60 | if (c.r == 0) 61 | { 62 | c = this.diameter(p, q); 63 | } 64 | else 65 | { 66 | c = this.circleTwoPoints( points.slice(0, i + 1), p, q ); 67 | } 68 | } 69 | } 70 | return c; 71 | } 72 | 73 | 74 | function circleTwoPoints( points, p, q ) 75 | { 76 | var temp = this.diameter(p, q); 77 | var containsAll = true; 78 | for (var i = 0; i < points.length; i++) 79 | { 80 | containsAll = containsAll && this.isInCircle(temp, points[i].x, points[i].y); 81 | } 82 | if (containsAll) 83 | { 84 | return temp; 85 | } 86 | 87 | var left = null; 88 | var right = null; 89 | for( i = 0; i < points.length; i++ ) 90 | { 91 | var r = points[i]; 92 | var cross = this.crossProduct(p.x, p.y, q.x, q.y, r.x, r.y); 93 | var c = this.circumcircle(p, q, r); 94 | 95 | if (cross > 0 && (left == null || this.crossProduct(p.x, p.y, q.x, q.y, c.x, c.y) > this.crossProduct(p.x, p.y, q.x, q.y, left.x, left.y))) 96 | { 97 | left = c; 98 | } 99 | else if( cross < 0 && (right == null || this.crossProduct(p.x, p.y, q.x, q.y, c.x, c.y) < this.crossProduct(p.x, p.y, q.x, q.y, right.x, right.y))) 100 | { 101 | right = c; 102 | } 103 | } 104 | return right == null || left != null && left.r <= right.r ? left : right; 105 | } 106 | 107 | 108 | function circumcircle(p0, p1, p2) 109 | { 110 | // Mathematical algorithm from Wikipedia: Circumscribed circle 111 | var ax = p0.x, ay = p0.y; 112 | var bx = p1.x, by = p1.y; 113 | var cx = p2.x, cy = p2.y; 114 | var d = (ax * (by - cy) + bx * (cy - ay) + cx * (ay - by)) * 2; 115 | var x = ((ax * ax + ay * ay) * (by - cy) + (bx * bx + by * by) * (cy - ay) + (cx * cx + cy * cy) * (ay - by)) / d; 116 | var y = ((ax * ax + ay * ay) * (cx - bx) + (bx * bx + by * by) * (ax - cx) + (cx * cx + cy * cy) * (bx - ax)) / d; 117 | return new Circle( x, y, this.distance(x, y, ax, ay) ); 118 | } 119 | 120 | function diameter(p0, p1) 121 | { 122 | return new Circle( (p0.x + p1.x) / 2, 123 | (p0.y + p1.y) / 2, 124 | this.distance(p0.x, p0.y, p1.x, p1.y) / 2 ); 125 | } 126 | 127 | /* Simple mathematical functions */ 128 | 129 | function isInCircle(c, x, y) 130 | { 131 | return c != null && this.distance(x, y, c.x, c.y) <= c.r; 132 | } 133 | 134 | // Returns twice the signed area of the triangle defined by (x0, y0), (x1, y1), (x2, y2) 135 | function crossProduct(x0, y0, x1, y1, x2, y2) 136 | { 137 | return (x1 - x0) * (y2 - y0) - (y1 - y0) * (x2 - x0); 138 | } 139 | 140 | function distance(x0, y0, x1, y1) 141 | { 142 | return Math.sqrt((x0 - x1) * (x0 - x1) + (y0 - y1) * (y0 - y1)); 143 | } 144 | 145 | function angle( p0, p1 ){return Math.atan2( p1.y - p0.y, p1.x - p0.x );} 146 | function project( p ) 147 | { 148 | var a = this.angle( this, p ); 149 | return new Point( this.x + Math.cos( a ) * this.r, 150 | this.y + Math.sin( a ) * this.r ); 151 | } 152 | 153 | var _p = Circle.prototype; 154 | _p.constructor = Circle; 155 | 156 | _p.lerp = lerp; 157 | _p.minimumEnclosingCircle = minimumEnclosingCircle; 158 | _p.circleOnePoint = circleOnePoint; 159 | _p.circleTwoPoints = circleTwoPoints; 160 | _p.circumcircle = circumcircle; 161 | _p.diameter = diameter; 162 | _p.isInCircle = isInCircle; 163 | _p.crossProduct = crossProduct; 164 | _p.distance = distance; 165 | _p.angle = angle; 166 | _p.project = project; 167 | return Circle; 168 | 169 | }(); -------------------------------------------------------------------------------- /2/1_trigo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 26 | 196 | 197 | -------------------------------------------------------------------------------- /geom.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | //une classe point qui stocke 2 coorodnnées X et Y 4 | var Point = function( x, y ){ 5 | this.x = x || 0; 6 | this.y = y || 0; 7 | }; 8 | 9 | //deux méthodes utiles pour travailler avec des points 10 | Point.prototype = 11 | { 12 | 13 | angle : function( other ) 14 | { 15 | var dx = other.x - this.x; 16 | var dy = other.y - this.y; 17 | return Math.atan2( dy, dx ); 18 | }, 19 | 20 | distance : function( other ) 21 | { 22 | var dx = other.x - this.x; 23 | var dy = other.y - this.y; 24 | return Math.sqrt( dx*dx + dy*dy ); 25 | }, 26 | 27 | add : function( p ){this.x += p.x; this.y += p.y; return this;}, 28 | sub : function( p ){this.x -= p.x; this.y -= p.y; return this;}, 29 | clone : function(){return new Point( this.x, this.y );}, 30 | nearEquals : function( p, dist ){var x = Math.abs( this.x - p.x );var y = Math.abs( this.y - p.y );return (x <= dist) && (y <= dist);}, 31 | length : function(){return Math.sqrt( this.x * this.x + this.y * this.y );}, 32 | normalize : function ( scale ){scale = scale || 1;var l = this.length();this.x /= l;this.x *= scale;this.y /= l;this.y *= scale;return this;}, 33 | negate : function(){this.x *= -1;this.y *= -1;return this;}, 34 | randomize : function( amount ){this.x += ( Math.random() - .5 ) * amount;this.y += ( Math.random() - .5 ) * amount;return this;}, 35 | toString : function(){ return "x: " + this.x +" y: "+this.y; } 36 | }; 37 | 38 | Point.add = function( a, b ){return new Point( a.x + b.x, a.y + b.y );}; 39 | Point.sub = function( a, b ){return new Point( a.x - b.x, a.y - b.y );}; 40 | Point.fromAngleDistance = function( angle, distance ){return new Point( Math.cos( angle ) * distance, Math.sin( angle ) * distance );} 41 | 42 | 43 | 44 | 45 | 46 | 47 | function getPositionAt( points, t ) { 48 | 49 | var length = points.length-1; 50 | var i0 = Math.floor( length * t ); 51 | i0 = i0 < length - 1 ? i0 : length - 1; 52 | var i1 = Math.min( i0 + 1, length ); 53 | 54 | var delta = 1 / length; 55 | var nt = ( t - ( i0 * delta ) ) / delta; 56 | return p = new Point( 57 | lerp( nt, points[i0].x, points[i1].x ), 58 | lerp( nt, points[i0].y, points[i1].y ) 59 | ); 60 | } 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | var Rectangle = function() 70 | { 71 | function Rectangle(x,y,w,h) 72 | { 73 | this.x = x||0; 74 | this.y = y||0; 75 | this.width = w||0; 76 | this.height = h||0; 77 | 78 | this.cx = this.cy = 0; 79 | this.center = new Point(); 80 | this.getCenter(); 81 | 82 | } 83 | 84 | function union( other ) 85 | { 86 | this.x = Math.min( other.x, this.x ); 87 | this.y = Math.min( other.y, this.y ); 88 | this.width = Math.max( other.width, this.width ); 89 | this.height = Math.max( other.height, this.height ); 90 | return this; 91 | } 92 | function getCenter() 93 | { 94 | this.cx = this.center.x = this.x + this.w / 2; 95 | this.cy = this.center.y = this.y + this.h / 2; 96 | return this.center; 97 | } 98 | 99 | function containsPoint( x, y ) 100 | { 101 | if( x < this.x ) return false; 102 | if( y < this.y ) return false; 103 | if( x > this.x + this.w ) return false; 104 | return y <= this.y + this.h; 105 | } 106 | 107 | function isContained( x, y, w, h ) 108 | { 109 | return ( this.x >= x 110 | && this.y >= y 111 | && this.x + this.w <= x+w 112 | && this.y + this.h <= y+h ); 113 | } 114 | 115 | function intersect( x, y, w, h ) 116 | { 117 | return !( x > this.x + this.w || x+w < this.x || y > this.y + this.h || y+h< this.y ); 118 | } 119 | 120 | function intersection( b ) 121 | { 122 | 123 | var a = this; 124 | 125 | var x = Math.max(a.x, b.x); 126 | var num1 = Math.min(a.x + a.w, b.x + b.w); 127 | var y = Math.max(a.y, b.y); 128 | var num2 = Math.min(a.y + a.h, b.y + b.h); 129 | 130 | if (num1 >= x && num2 >= y){ 131 | 132 | var dx = Math.max( a.x , b.x ); 133 | var dy = Math.max( a.y , b.y ); 134 | return new Rect( x, y, num1 - dx - x, num2 - dy - y); 135 | } 136 | else return null; 137 | } 138 | function equals( other ) 139 | { 140 | return ( other.x == this.x && other.y == this.y && this.width == this.width && other.height == this.height ); 141 | } 142 | 143 | function scale( value ) 144 | { 145 | this.x += value * this.w; 146 | this.y += value * this.h; 147 | this.w -= value * this.w * 2; 148 | this.h -= value * this.h * 2; 149 | } 150 | function clone(){return new Rectangle( this.x, this.y, this.width, this.height ); } 151 | 152 | var _p = Rectangle.prototype; 153 | _p.constructor = Rectangle; 154 | _p.union = union; 155 | _p.getCenter = getCenter; 156 | _p.containsPoint = containsPoint; 157 | _p.isContained = isContained; 158 | _p.intersect = intersect; 159 | _p.intersection = intersection; 160 | _p.equals = equals; 161 | _p.scale = scale; 162 | _p.clone = clone; 163 | return Rectangle; 164 | }(); -------------------------------------------------------------------------------- /3/0_lerp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 175 | 176 | 177 | 178 | -------------------------------------------------------------------------------- /intro/css/print/paper.css: -------------------------------------------------------------------------------- 1 | /* Default Print Stylesheet Template 2 | by Rob Glazebrook of CSSnewbie.com 3 | Last Updated: June 4, 2008 4 | 5 | Feel free (nay, compelled) to edit, append, and 6 | manipulate this file as you see fit. */ 7 | 8 | 9 | @media print { 10 | 11 | /* SECTION 1: Set default width, margin, float, and 12 | background. This prevents elements from extending 13 | beyond the edge of the printed page, and prevents 14 | unnecessary background images from printing */ 15 | html { 16 | background: #fff; 17 | width: auto; 18 | height: auto; 19 | overflow: visible; 20 | } 21 | body { 22 | background: #fff; 23 | font-size: 20pt; 24 | width: auto; 25 | height: auto; 26 | border: 0; 27 | margin: 0 5%; 28 | padding: 0; 29 | overflow: visible; 30 | float: none !important; 31 | } 32 | 33 | /* SECTION 2: Remove any elements not needed in print. 34 | This would include navigation, ads, sidebars, etc. */ 35 | .nestedarrow, 36 | .controls, 37 | .fork-reveal, 38 | .share-reveal, 39 | .state-background, 40 | .reveal .progress, 41 | .reveal .backgrounds { 42 | display: none !important; 43 | } 44 | 45 | /* SECTION 3: Set body font face, size, and color. 46 | Consider using a serif font for readability. */ 47 | body, p, td, li, div { 48 | font-size: 20pt!important; 49 | font-family: Georgia, "Times New Roman", Times, serif !important; 50 | color: #000; 51 | } 52 | 53 | /* SECTION 4: Set heading font face, sizes, and color. 54 | Differentiate your headings from your body text. 55 | Perhaps use a large sans-serif for distinction. */ 56 | h1,h2,h3,h4,h5,h6 { 57 | color: #000!important; 58 | height: auto; 59 | line-height: normal; 60 | font-family: Georgia, "Times New Roman", Times, serif !important; 61 | text-shadow: 0 0 0 #000 !important; 62 | text-align: left; 63 | letter-spacing: normal; 64 | } 65 | /* Need to reduce the size of the fonts for printing */ 66 | h1 { font-size: 28pt !important; } 67 | h2 { font-size: 24pt !important; } 68 | h3 { font-size: 22pt !important; } 69 | h4 { font-size: 22pt !important; font-variant: small-caps; } 70 | h5 { font-size: 21pt !important; } 71 | h6 { font-size: 20pt !important; font-style: italic; } 72 | 73 | /* SECTION 5: Make hyperlinks more usable. 74 | Ensure links are underlined, and consider appending 75 | the URL to the end of the link for usability. */ 76 | a:link, 77 | a:visited { 78 | color: #000 !important; 79 | font-weight: bold; 80 | text-decoration: underline; 81 | } 82 | /* 83 | .reveal a:link:after, 84 | .reveal a:visited:after { 85 | content: " (" attr(href) ") "; 86 | color: #222 !important; 87 | font-size: 90%; 88 | } 89 | */ 90 | 91 | 92 | /* SECTION 6: more reveal.js specific additions by @skypanther */ 93 | ul, ol, div, p { 94 | visibility: visible; 95 | position: static; 96 | width: auto; 97 | height: auto; 98 | display: block; 99 | overflow: visible; 100 | margin: 0; 101 | text-align: left !important; 102 | } 103 | .reveal pre, 104 | .reveal table { 105 | margin-left: 0; 106 | margin-right: 0; 107 | } 108 | .reveal pre code { 109 | padding: 20px; 110 | border: 1px solid #ddd; 111 | } 112 | .reveal blockquote { 113 | margin: 20px 0; 114 | } 115 | .reveal .slides { 116 | position: static !important; 117 | width: auto !important; 118 | height: auto !important; 119 | 120 | left: 0 !important; 121 | top: 0 !important; 122 | margin-left: 0 !important; 123 | margin-top: 0 !important; 124 | padding: 0 !important; 125 | zoom: 1 !important; 126 | 127 | overflow: visible !important; 128 | display: block !important; 129 | 130 | text-align: left !important; 131 | -webkit-perspective: none; 132 | -moz-perspective: none; 133 | -ms-perspective: none; 134 | perspective: none; 135 | 136 | -webkit-perspective-origin: 50% 50%; 137 | -moz-perspective-origin: 50% 50%; 138 | -ms-perspective-origin: 50% 50%; 139 | perspective-origin: 50% 50%; 140 | } 141 | .reveal .slides section { 142 | visibility: visible !important; 143 | position: static !important; 144 | width: 100% !important; 145 | height: auto !important; 146 | display: block !important; 147 | overflow: visible !important; 148 | 149 | left: 0 !important; 150 | top: 0 !important; 151 | margin-left: 0 !important; 152 | margin-top: 0 !important; 153 | padding: 60px 20px !important; 154 | z-index: auto !important; 155 | 156 | opacity: 1 !important; 157 | 158 | page-break-after: always !important; 159 | 160 | -webkit-transform-style: flat !important; 161 | -moz-transform-style: flat !important; 162 | -ms-transform-style: flat !important; 163 | transform-style: flat !important; 164 | 165 | -webkit-transform: none !important; 166 | -moz-transform: none !important; 167 | -ms-transform: none !important; 168 | transform: none !important; 169 | 170 | -webkit-transition: none !important; 171 | -moz-transition: none !important; 172 | -ms-transition: none !important; 173 | transition: none !important; 174 | } 175 | .reveal .slides section.stack { 176 | padding: 0 !important; 177 | } 178 | .reveal section:last-of-type { 179 | page-break-after: avoid !important; 180 | } 181 | .reveal section .fragment { 182 | opacity: 1 !important; 183 | visibility: visible !important; 184 | 185 | -webkit-transform: none !important; 186 | -moz-transform: none !important; 187 | -ms-transform: none !important; 188 | transform: none !important; 189 | } 190 | .reveal section img { 191 | display: block; 192 | margin: 15px 0px; 193 | background: rgba(255,255,255,1); 194 | border: 1px solid #666; 195 | box-shadow: none; 196 | } 197 | 198 | .reveal section small { 199 | font-size: 0.8em; 200 | } 201 | 202 | } -------------------------------------------------------------------------------- /1/1_ligne.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 186 | 187 | -------------------------------------------------------------------------------- /8/utils/kmeans.js: -------------------------------------------------------------------------------- 1 | var kmeans = function(exports) 2 | { 3 | 4 | function distance( a, b ){ return Math.sqrt( Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) ); } 5 | function reduce( t,c ){var u,v;for ( var i = ( v = t[0], 1 ); i < t.length;) v = c(v,t[i],i++,t); i<2 & u && u(); return v;} 6 | function addIterator(x,y) { return x+y; } 7 | 8 | exports.compute = function( points, k, iterations ) 9 | { 10 | 11 | iterations = iterations || 5; 12 | 13 | var l = points.length; 14 | k = k || Math.sqrt( l/2 ); 15 | 16 | 17 | /** K-Means++ initialization */ 18 | var i, j, cmp1, cmp2; 19 | 20 | /** determine the amount of tries */ 21 | var D = [], ntries = 2 + Math.round(Math.log(k)); 22 | 23 | /** 1. Choose one center uniformly at random from the data points. */ 24 | var p0 = points[~~( Math.random() * l )]; 25 | p0.centroid = 0; 26 | this.centroids = [p0]; 27 | 28 | /** 29 | * 2. For each data point x, compute D(x), the distance between x and 30 | * the nearest center that has already been chosen. 31 | */ 32 | 33 | for (i = 0; i < l; i++) { 34 | D[i] = Math.pow(distance(p0, points[i]), 2); 35 | } 36 | 37 | var Dsum = reduce(D, addIterator); 38 | 39 | /** 40 | * 3. Choose one new data point at random as a new center, using a 41 | * weighted probability distribution where a point x is chosen with 42 | * probability proportional to D(x)2. 43 | * (Repeated until k centers have been chosen.) 44 | */ 45 | var centroids = []; 46 | for (j = 0; j < k; ++j) { 47 | 48 | var bestDsum = -1, 49 | bestIdx = -1; 50 | 51 | for (i = 0; i < ntries; ++i) { 52 | var rndVal = ~~( Math.random() * Dsum ); 53 | 54 | for (var n = 0; n < l; ++n) { 55 | if (rndVal <= D[n]) { 56 | break; 57 | } 58 | else { 59 | rndVal -= D[n]; 60 | } 61 | } 62 | 63 | var tmpD = []; 64 | for (var m = 0; m < l; ++m) { 65 | cmp1 = D[m]; 66 | cmp2 = Math.pow(distance(points[m], points[n]), 2); 67 | tmpD[m] = cmp1 > cmp2 ? cmp2 : cmp1; 68 | } 69 | 70 | var tmpDsum = reduce(tmpD, addIterator); 71 | if (bestDsum < 0 || tmpDsum < bestDsum) { 72 | bestDsum = tmpDsum; 73 | bestIdx = n; 74 | } 75 | } 76 | 77 | Dsum = bestDsum; 78 | 79 | var centroid = 80 | { 81 | x: points[bestIdx].x, 82 | y: points[bestIdx].y, 83 | centroid: j, 84 | items: 0 85 | }; 86 | 87 | centroids.push(centroid); 88 | 89 | for (i = 0; i < l; ++i) { 90 | cmp1 = D[i]; 91 | cmp2 = Math.pow(distance(points[bestIdx], points[i]), 2); 92 | D[i] = cmp1 > cmp2 ? cmp2 : cmp1; 93 | } 94 | 95 | } 96 | 97 | 98 | //////////////////////////////////////////// 99 | 100 | 101 | //////////////////////////////////////////// 102 | 103 | 104 | function iterate(k) { 105 | 106 | /** When the result doesn't change anymore, the final result has been found. */ 107 | 108 | var converged = true; 109 | var sums = []; 110 | var i; 111 | for (i = 0; i < k; ++i) { 112 | sums.push({x: 0, y: 0, items: 0}); 113 | } 114 | 115 | var closestItem = null; 116 | var dist, minDist; 117 | for (i = 0, l = points.length; i < l; ++i) { 118 | closestItem = null; 119 | minDist = 10e6; 120 | centroids.forEach(function (c) { 121 | dist = distance(c, points[i]); 122 | if (dist < minDist) { 123 | closestItem = c; 124 | minDist = dist; 125 | } 126 | }); 127 | 128 | 129 | // var distances = sortBy( exports.centroids, measureDistance( exports.points, i ) ); 130 | // var closestItem = distances[ 0 ]; 131 | var centroid = closestItem.centroid; 132 | 133 | /** 134 | * When the point is not attached to a centroid or the point was 135 | * attached to some other centroid before, the result differs from the 136 | * previous iteration. 137 | */ 138 | if (typeof points[i].centroid !== 'number' 139 | || points[i].centroid !== centroid) { 140 | converged = false; 141 | } 142 | 143 | /** Attach the point to the centroid */ 144 | 145 | points[i].centroid = centroid; 146 | 147 | /** Add the points' coordinates to the sum of its centroid */ 148 | 149 | sums[centroid].x += points[i].x; 150 | sums[centroid].y += points[i].y; 151 | sums[centroid].items++; 152 | 153 | 154 | } 155 | 156 | /** Re-calculate the center of the centroid. */ 157 | 158 | for (i = 0; i < k; i++) { 159 | 160 | if (sums[i].items > 0) { 161 | centroids[i].x = sums[i].x / sums[i].items; 162 | centroids[i].y = sums[i].y / sums[i].items; 163 | } 164 | centroids[i].items = sums[i].items; 165 | } 166 | 167 | return converged; 168 | } 169 | 170 | 171 | i = iterations; 172 | while (i--) { 173 | iterate(k); 174 | } 175 | 176 | return { centroids:centroids, points:points }; 177 | 178 | }; 179 | return exports; 180 | }({}); 181 | -------------------------------------------------------------------------------- /5/0_quadratic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 200 | 201 | 202 | 203 | -------------------------------------------------------------------------------- /appendix/flash_transform_matrix_files/standard.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | /* ********************************** 4 | GENERAL 5 | ********************************** */ 6 | body { 7 | border:none; 8 | margin:0; 9 | padding:0; 10 | background-color:#ABA; 11 | } 12 | body, table { 13 | font-family: Verdana, Geneva, sans-serif; 14 | font-size: 10pt; 15 | } 16 | img { 17 | border:none; 18 | } 19 | 20 | /* ********************************** 21 | HEADER 22 | ********************************** */ 23 | 24 | .header-w { 25 | background:#025 url(../images/design/headergradient.png) repeat-x; 26 | min-width:685px; 27 | } 28 | .header { 29 | background:url(../images/design/logoid.gif) no-repeat; 30 | color:#FFF; 31 | padding:0; 32 | margin:0; 33 | max-width:1280px; 34 | } 35 | .header .foot { 36 | height:0px; 37 | padding:0; 38 | margin:0; 39 | clear:both; 40 | } 41 | .header a { 42 | color:#FFF; 43 | } 44 | .header .iden { 45 | margin:107px 0 0 155px; 46 | padding:0; 47 | width:270px; 48 | height:32px; 49 | float:left; 50 | } 51 | .header h1 { 52 | padding:0; 53 | margin:0; 54 | } 55 | .header h1 .text { 56 | visibility:hidden; 57 | } 58 | .header h1 a { 59 | display:block; 60 | text-decoration:none; 61 | } 62 | .header .about { 63 | width:525px; 64 | float:right; 65 | font-size:10px; 66 | color:#89A; 67 | padding:0; 68 | margin:14px 5px 5px 0; 69 | } 70 | .nav { 71 | width:525px; 72 | float:right; 73 | padding:20px 5px 0 0; 74 | margin:0; 75 | } 76 | .nav .topic { 77 | width:125px; 78 | display:block; 79 | float:left; 80 | } 81 | .nav .topic h4, .nav ul a { 82 | font-size:12px; 83 | } 84 | .nav ul a { 85 | color:#FFC; 86 | text-decoration:none; 87 | } 88 | .nav ul a:hover { 89 | text-decoration:underline; 90 | } 91 | .nav ul, .nav li { 92 | list-style:none; 93 | margin:0; 94 | padding:0; 95 | } 96 | .nav .topic h4 { 97 | margin:0; 98 | padding:0; 99 | } 100 | 101 | 102 | /* ********************************** 103 | PAGE 104 | ********************************** */ 105 | 106 | .content-w { 107 | min-width:685px; 108 | border-top:2px solid #EFEFEF; 109 | } 110 | .content-w, .content { 111 | background-color:#FFF; 112 | } 113 | .content { 114 | padding:20px 20px 50px 155px; 115 | clear:both; 116 | } 117 | 118 | .content h2 { 119 | color:#999; 120 | } 121 | .content h2.source, .content h2.extensions, .content h2.tutorials { 122 | margin-left:-28px; 123 | padding-left:28px; 124 | background-repeat:no-repeat; 125 | background-position:0 4px; 126 | } 127 | .content h2.source { 128 | background-image:url(../images/icons/section_source.png); 129 | } 130 | .content h2.extensions { 131 | background-image:url(../images/icons/section_extensions.png); 132 | } 133 | .content h2.tutorials { 134 | background-image:url(../images/icons/section_tutorials.png); 135 | } 136 | .content a { 137 | color:#039; 138 | text-decoration:none; 139 | } 140 | .pages { 141 | width:525px; 142 | margin-top:30px; 143 | font-weight:bold; 144 | } 145 | .pages .links { 146 | border-top:1px solid #CCC; 147 | margin:0; 148 | padding:.5em; 149 | text-align:center; 150 | } 151 | .pages .links strong { 152 | color:#999; 153 | } 154 | 155 | .search { 156 | margin:20px 0; 157 | } 158 | .search-info { 159 | font-style:italic; 160 | } 161 | 162 | /* ********************************** 163 | ENTRIES 164 | ********************************** */ 165 | 166 | .entries { 167 | width:525px; 168 | clear:both; 169 | color:#333; 170 | background-color:#FFF; 171 | line-height:1.5em; 172 | } 173 | .entry { 174 | margin:50px 0 0 0; 175 | } 176 | .entry h3 { 177 | border-bottom:1px solid #CCC; 178 | margin:0; 179 | } 180 | .entry-compact { 181 | margin:0; 182 | } 183 | .entry h3 a, .entry .more a { 184 | color:#36C; 185 | } 186 | .entry .body a:hover, .entry .body-ext a:hover, .entry .more a:hover { 187 | text-decoration:underline; 188 | } 189 | .entry .more { 190 | font-weight:bold; 191 | margin:1.5em 0 0 0; 192 | } 193 | .entry .info { 194 | color:#000; 195 | font-size:10px; 196 | font-weight:bold; 197 | margin:.25em 0 1em 0; 198 | } 199 | .entry-compact .info { 200 | color:#999; 201 | font-size:10px; 202 | font-style:italic; 203 | } 204 | .entry .foot { 205 | color:#999; 206 | border:1px solid #CCC; 207 | border-top:none; 208 | background-color:#F3F3F3; 209 | margin-top:.75em; 210 | padding-left:.5em; 211 | } 212 | 213 | 214 | /* ********************************** 215 | ENTRY CONTENT 216 | ********************************** */ 217 | .entry .body pre, .entry .body-ext pre { 218 | border:1px solid #BCE; 219 | background-color:#F0F4FF; 220 | color:#557; 221 | padding:.5em; 222 | } 223 | 224 | .entry .body-ext { 225 | margin-top:1em; 226 | } 227 | code { 228 | color:#36A; 229 | font-size:10pt; 230 | } 231 | 232 | pre { 233 | margin:.5em; 234 | padding:1em; 235 | padding-bottom:2em; 236 | width:675px; 237 | color:#113; 238 | font-size:8pt; 239 | background-color:#F5F9FF; 240 | border:1px solid #A5C8DF; 241 | overflow:auto; 242 | } 243 | pre .hilite, pre b { 244 | background-color:#FAFAE0; 245 | font-weight:normal; 246 | color:black; 247 | } 248 | pre .comment, pre dfn { 249 | background-color: #F4F4F4; 250 | font-style:normal; 251 | color: #666; 252 | } 253 | 254 | ul.file { 255 | padding:1em 3em; 256 | margin-left:0; 257 | font-weight:bold; 258 | border:1px outset black; 259 | background-color:#FFC; 260 | } 261 | ul.file li { 262 | padding-left:.25em; 263 | list-style-image:url(../images/icons/bullet_file.gif); 264 | } 265 | ul.file li.zip { 266 | list-style-image:url(../images/icons/bullet_zip.gif); 267 | } 268 | ul.file li.fla { 269 | list-style-image:url(../images/icons/bullet_fla.gif); 270 | } 271 | ul.file li.swf { 272 | list-style-image:url(../images/icons/bullet_swf.gif); 273 | } 274 | ul.file li.as { 275 | list-style-image:url(../images/icons/bullet_as.gif); 276 | } 277 | ul.file li.png { 278 | list-style-image:url(../images/icons/bullet_png.gif); 279 | } 280 | ul.file li.image { 281 | list-style-image:url(../images/icons/bullet_image.gif); 282 | } 283 | ul.file li.mxp { 284 | list-style-image:url(../images/icons/bullet_mxp.gif); 285 | } 286 | 287 | .preview-w { 288 | border:1px solid #CCC; 289 | border-top-color:#EEE; 290 | border-left-color:#EEE; 291 | width:312px; 292 | padding:10px; 293 | margin:10px auto; 294 | overflow:hidden; 295 | } 296 | #swfContent { 297 | margin:0; 298 | padding:0; 299 | } 300 | 301 | 302 | /* ********************************** 303 | FORMS 304 | ********************************** */ 305 | 306 | .send-button { 307 | width:75px; 308 | } 309 | .send-button a { 310 | display:block; 311 | padding:.25em; 312 | text-align:center; 313 | border:1px solid #CCC; 314 | background-color:#FFC; 315 | } 316 | .send-button a:hover { 317 | border:1px outset #39C; 318 | } 319 | 320 | /* ********************************** 321 | FOOTER 322 | ********************************** */ 323 | 324 | .footer-w { 325 | border-top:1px solid #898; 326 | } 327 | .footer .info { 328 | text-align:center; 329 | color:#454; 330 | font-size:10px; 331 | } -------------------------------------------------------------------------------- /graphics.js: -------------------------------------------------------------------------------- 1 | /** 2 | * usage : 3 | var G = new Graphics( ctx ); 4 | G.line( p0, p1 ) 5 | G.circle( x, y, radius ) 6 | etc. 7 | * @param ctx canvas 2d context 8 | * @returns {{}} wraps some methods 9 | * @constructor 10 | */ 11 | 12 | var Graphics = function( ctx ) 13 | { 14 | var exports = {}; 15 | exports.ctx = ctx; 16 | exports.line = function( x0, y0, x1, y1 ) 17 | { 18 | //permet de passer 2 points au lieu des coordonnées X0, Y0, X1, Y1 19 | if( x0.x != null && y0.x != null )return exports.line( x0.x, x0.y, y0.x, y0.y ); 20 | exports.ctx.beginPath(); 21 | exports.ctx.moveTo( x0, y0 ); 22 | exports.ctx.lineTo( x1, y1 ); 23 | exports.ctx.stroke(); 24 | }; 25 | 26 | exports.text = function( text, size, x,y ) 27 | { 28 | exports.ctx.font = size + "pt Verdana "; 29 | exports.ctx.fillText( text, x||0, y||0 ); 30 | }; 31 | 32 | exports.polyline = function( points, closed ) 33 | { 34 | exports.ctx.beginPath(); 35 | points.forEach( function( p ) 36 | { 37 | exports.ctx.lineTo( p.x, p.y ); 38 | }); 39 | if( Boolean( closed ) )exports.ctx.closePath(); 40 | exports.ctx.stroke(); 41 | }; 42 | 43 | exports.polygon = function( points, closed ) 44 | { 45 | exports.ctx.beginPath(); 46 | points.forEach( function( p ) 47 | { 48 | exports.ctx.lineTo( p.x, p.y ); 49 | }); 50 | if( Boolean( closed ) )exports.ctx.closePath(); 51 | exports.ctx.fill(); 52 | }; 53 | 54 | exports.arc = function( x, y, radius, angle, length ) 55 | { 56 | //permet de passer un point et un rayon au lieu de X, Y et Rayon 57 | if(x.x != null )return exports.arc(x.x, x.y, y, radius, angle ); 58 | exports.ctx.beginPath(); 59 | exports.ctx.arc( x, y, radius, angle, length, length < 0 ); 60 | exports.ctx.stroke(); 61 | }; 62 | 63 | exports.sector = function( x, y, radius, angle, length ) 64 | { 65 | //permet de passer un point et un rayon au lieu de X, Y et Rayon 66 | if(x.x != null )return exports.sector(x.x, x.y, y, radius, angle ); 67 | exports.ctx.beginPath(); 68 | exports.ctx.moveTo( x, y ); 69 | exports.ctx.arc( x, y, radius, angle, length, length < 0 ); 70 | exports.ctx.closePath(); 71 | exports.ctx.stroke(); 72 | }; 73 | 74 | exports.sectorFilled = function( x, y, radius, angle, length ) 75 | { 76 | //permet de passer un point et un rayon au lieu de X, Y et Rayon 77 | if(x.x != null )return exports.sectorFilled(x.x, x.y, y, radius, angle ); 78 | exports.ctx.beginPath(); 79 | exports.ctx.moveTo( x, y ); 80 | exports.ctx.arc( x, y, radius, angle, length, length < 0 ); 81 | exports.ctx.closePath(); 82 | exports.ctx.fill(); 83 | }; 84 | 85 | exports.circle = function( x, y, radius ) 86 | { 87 | //permet de passer un point et un rayon au lieu de X, Y et Rayon 88 | if(x.x != null )return exports.circle(x.x, x.y, y ); 89 | exports.ctx.beginPath(); 90 | exports.ctx.arc( x, y, radius, 0, Math.PI * 2 ); 91 | exports.ctx.stroke(); 92 | }; 93 | 94 | exports.disc = function( x, y, radius ) 95 | { 96 | //permet de passer un point et un rayon 97 | if(x.x != null )return exports.disc(x.x, x.y, y ); 98 | exports.ctx.beginPath(); 99 | exports.ctx.arc( x, y, radius, 0, Math.PI*2 ); 100 | exports.ctx.fill(); 101 | }; 102 | 103 | exports.strokeRing = function( x,y, radiusIn, radiusOut, angle, length ) 104 | { 105 | //permet de passer un point au lieu de x, y 106 | if(x.x != null )return exports.strokeRing(x.x, x.y, y, radiusIn, radiusOut, angle ); 107 | 108 | angle = angle || 0; 109 | length = length || Math.PI * 2; 110 | 111 | var ia = Math.min( angle, length ); 112 | var oa = Math.max( angle, length ); 113 | 114 | var center = new Point(x,y); 115 | var i0 = Point.fromAngleDistance( ia, radiusIn ).add( center ); 116 | //var i1 = Point.fromAngleDistance( oa, radiusIn ).add( center ); 117 | var o1 = Point.fromAngleDistance( oa, radiusOut ).add( center ); 118 | //var o0 = Point.fromAngleDistance( ia, radiusOut ).add( center ); 119 | 120 | exports.ctx.beginPath(); 121 | exports.ctx.arc( x, y, radiusIn, ia, oa, false ); 122 | exports.ctx.lineTo( o1.x, o1.y ); 123 | exports.ctx.arc( x, y, radiusOut, oa, ia, true ); 124 | exports.ctx.lineTo( i0.x, i0.y ); 125 | exports.ctx.stroke(); 126 | 127 | }; 128 | 129 | exports.fillRing = function( x,y, radiusIn, radiusOut, angle, length ) 130 | { 131 | //permet de passer un point au lieu de x, y 132 | if(x.x != null )return exports.fillRing(x.x, x.y, y, radiusIn, radiusOut, angle ); 133 | 134 | angle = angle || 0; 135 | length = length || Math.PI * 2; 136 | 137 | var ia = Math.min( angle, length ); 138 | var oa = Math.max( angle, length ); 139 | 140 | var center = new Point(x,y); 141 | var i0 = Point.fromAngleDistance( ia, radiusIn ).add( center ); 142 | //var i1 = Point.fromAngleDistance( oa, radiusIn ).add( center ); 143 | var o1 = Point.fromAngleDistance( oa, radiusOut ).add( center ); 144 | //var o0 = Point.fromAngleDistance( ia, radiusOut ).add( center ); 145 | 146 | exports.ctx.beginPath(); 147 | exports.ctx.arc( x, y, radiusIn, ia, oa, false ); 148 | exports.ctx.lineTo( o1.x, o1.y ); 149 | exports.ctx.arc( x, y, radiusOut, oa, ia, true ); 150 | exports.ctx.lineTo( i0.x, i0.y ); 151 | exports.ctx.fill(); 152 | 153 | }; 154 | 155 | exports.quadCurve = function( a,b,c ) 156 | { 157 | exports.ctx.beginPath(); 158 | exports.ctx.moveTo(a.x, a.y ); 159 | exports.ctx.quadraticCurveTo(b.x, b.y, c.x, c.y ); 160 | exports.ctx.stroke(); 161 | }; 162 | 163 | exports.bezierCurve = function( a,b,c,d ) 164 | { 165 | exports.ctx.beginPath(); 166 | exports.ctx.moveTo(a.x, a.y ); 167 | exports.ctx.bezierCurveTo(b.x, b.y, c.x, c.y, d.x, d.y ); 168 | exports.ctx.stroke(); 169 | }; 170 | 171 | exports.graduation = function( x0,y0, x1,y1, count, width ) 172 | { 173 | //permet de passer un point au lieu de x, y 174 | if( x0.x != null && y0.x != null )return exports.graduation( x0.x, x0.y, y0.x, y0.y, x1, y1 ); 175 | 176 | G.line( x0,y0, x1,y1 ); 177 | var p = new Point(); 178 | var n = new Point( -( y1 - y0 ), ( x1 - x0 ) ); 179 | n.normalize( width || 5 ); 180 | 181 | for( var i = 0; i <= count; i++ ) 182 | { 183 | var t = i/count; 184 | p.x = lerp( t, x0, x1 ); 185 | p.y = lerp( t, y0, y1 ); 186 | G.line( p, Point.add( p,n ) ); 187 | } 188 | 189 | }; 190 | 191 | 192 | 193 | 194 | return exports; 195 | }; -------------------------------------------------------------------------------- /3/1_norm.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 207 | 208 | 209 | 210 | -------------------------------------------------------------------------------- /intro/css/theme/night.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Black theme for reveal.js. 3 | * 4 | * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se 5 | */ 6 | @import url(https://fonts.googleapis.com/css?family=Montserrat:700); 7 | @import url(https://fonts.googleapis.com/css?family=Open+Sans:400,700,400italic,700italic); 8 | /********************************************* 9 | * GLOBAL STYLES 10 | *********************************************/ 11 | body { 12 | background: #111; 13 | background-color: #111; } 14 | 15 | .reveal { 16 | font-family: "Open Sans", sans-serif; 17 | font-size: 30px; 18 | font-weight: normal; 19 | color: #eee; } 20 | 21 | ::selection { 22 | color: #fff; 23 | background: #e7ad52; 24 | text-shadow: none; } 25 | 26 | .reveal .slides > section, 27 | .reveal .slides > section > section { 28 | line-height: 1.3; 29 | font-weight: inherit; } 30 | 31 | /********************************************* 32 | * HEADERS 33 | *********************************************/ 34 | .reveal h1, 35 | .reveal h2, 36 | .reveal h3, 37 | .reveal h4, 38 | .reveal h5, 39 | .reveal h6 { 40 | margin: 0 0 20px 0; 41 | color: #eee; 42 | font-family: "Montserrat", Impact, sans-serif; 43 | font-weight: normal; 44 | line-height: 1.2; 45 | letter-spacing: -0.03em; 46 | text-transform: none; 47 | text-shadow: none; 48 | word-wrap: break-word; } 49 | 50 | .reveal h1 { 51 | font-size: 3.77em; } 52 | 53 | .reveal h2 { 54 | font-size: 2.11em; } 55 | 56 | .reveal h3 { 57 | font-size: 1.55em; } 58 | 59 | .reveal h4 { 60 | font-size: 1em; } 61 | 62 | .reveal h1 { 63 | text-shadow: none; } 64 | 65 | /********************************************* 66 | * OTHER 67 | *********************************************/ 68 | .reveal p { 69 | margin: 20px 0; 70 | line-height: 1.3; } 71 | 72 | /* Ensure certain elements are never larger than the slide itself */ 73 | .reveal img, 74 | .reveal video, 75 | .reveal iframe { 76 | max-width: 95%; 77 | max-height: 95%; } 78 | 79 | .reveal strong, 80 | .reveal b { 81 | font-weight: bold; } 82 | 83 | .reveal em { 84 | font-style: italic; } 85 | 86 | .reveal ol, 87 | .reveal dl, 88 | .reveal ul { 89 | display: inline-block; 90 | text-align: left; 91 | margin: 0 0 0 1em; } 92 | 93 | .reveal ol { 94 | list-style-type: decimal; } 95 | 96 | .reveal ul { 97 | list-style-type: disc; } 98 | 99 | .reveal ul ul { 100 | list-style-type: square; } 101 | 102 | .reveal ul ul ul { 103 | list-style-type: circle; } 104 | 105 | .reveal ul ul, 106 | .reveal ul ol, 107 | .reveal ol ol, 108 | .reveal ol ul { 109 | display: block; 110 | margin-left: 40px; } 111 | 112 | .reveal dt { 113 | font-weight: bold; } 114 | 115 | .reveal dd { 116 | margin-left: 40px; } 117 | 118 | .reveal q, 119 | .reveal blockquote { 120 | quotes: none; } 121 | 122 | .reveal blockquote { 123 | display: block; 124 | position: relative; 125 | width: 70%; 126 | margin: 20px auto; 127 | padding: 5px; 128 | font-style: italic; 129 | background: rgba(255, 255, 255, 0.05); 130 | box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.2); } 131 | 132 | .reveal blockquote p:first-child, 133 | .reveal blockquote p:last-child { 134 | display: inline-block; } 135 | 136 | .reveal q { 137 | font-style: italic; } 138 | 139 | .reveal pre { 140 | display: block; 141 | position: relative; 142 | width: 90%; 143 | margin: 20px auto; 144 | text-align: left; 145 | font-size: 0.55em; 146 | font-family: monospace; 147 | line-height: 1.2em; 148 | word-wrap: break-word; 149 | box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.3); } 150 | 151 | .reveal code { 152 | font-family: monospace; } 153 | 154 | .reveal pre code { 155 | display: block; 156 | padding: 5px; 157 | overflow: auto; 158 | max-height: 400px; 159 | word-wrap: normal; } 160 | 161 | .reveal table { 162 | margin: auto; 163 | border-collapse: collapse; 164 | border-spacing: 0; } 165 | 166 | .reveal table th { 167 | font-weight: bold; } 168 | 169 | .reveal table th, 170 | .reveal table td { 171 | text-align: left; 172 | padding: 0.2em 0.5em 0.2em 0.5em; 173 | border-bottom: 1px solid; } 174 | 175 | .reveal table th[align="center"], 176 | .reveal table td[align="center"] { 177 | text-align: center; } 178 | 179 | .reveal table th[align="right"], 180 | .reveal table td[align="right"] { 181 | text-align: right; } 182 | 183 | .reveal table tr:last-child td { 184 | border-bottom: none; } 185 | 186 | .reveal sup { 187 | vertical-align: super; } 188 | 189 | .reveal sub { 190 | vertical-align: sub; } 191 | 192 | .reveal small { 193 | display: inline-block; 194 | font-size: 0.6em; 195 | line-height: 1.2em; 196 | vertical-align: top; } 197 | 198 | .reveal small * { 199 | vertical-align: top; } 200 | 201 | /********************************************* 202 | * LINKS 203 | *********************************************/ 204 | .reveal a { 205 | color: #e7ad52; 206 | text-decoration: none; 207 | -webkit-transition: color 0.15s ease; 208 | -moz-transition: color 0.15s ease; 209 | transition: color 0.15s ease; } 210 | 211 | .reveal a:hover { 212 | color: #f3d7ac; 213 | text-shadow: none; 214 | border: none; } 215 | 216 | .reveal .roll span:after { 217 | color: #fff; 218 | background: #d08a1d; } 219 | 220 | /********************************************* 221 | * IMAGES 222 | *********************************************/ 223 | .reveal section img { 224 | margin: 15px 0px; 225 | background: rgba(255, 255, 255, 0.12); 226 | border: 4px solid #eee; 227 | box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); } 228 | 229 | .reveal section img.plain { 230 | border: 0; 231 | box-shadow: none; } 232 | 233 | .reveal a img { 234 | -webkit-transition: all 0.15s linear; 235 | -moz-transition: all 0.15s linear; 236 | transition: all 0.15s linear; } 237 | 238 | .reveal a:hover img { 239 | background: rgba(255, 255, 255, 0.2); 240 | border-color: #e7ad52; 241 | box-shadow: 0 0 20px rgba(0, 0, 0, 0.55); } 242 | 243 | /********************************************* 244 | * NAVIGATION CONTROLS 245 | *********************************************/ 246 | .reveal .controls .navigate-left, 247 | .reveal .controls .navigate-left.enabled { 248 | border-right-color: #e7ad52; } 249 | 250 | .reveal .controls .navigate-right, 251 | .reveal .controls .navigate-right.enabled { 252 | border-left-color: #e7ad52; } 253 | 254 | .reveal .controls .navigate-up, 255 | .reveal .controls .navigate-up.enabled { 256 | border-bottom-color: #e7ad52; } 257 | 258 | .reveal .controls .navigate-down, 259 | .reveal .controls .navigate-down.enabled { 260 | border-top-color: #e7ad52; } 261 | 262 | .reveal .controls .navigate-left.enabled:hover { 263 | border-right-color: #f3d7ac; } 264 | 265 | .reveal .controls .navigate-right.enabled:hover { 266 | border-left-color: #f3d7ac; } 267 | 268 | .reveal .controls .navigate-up.enabled:hover { 269 | border-bottom-color: #f3d7ac; } 270 | 271 | .reveal .controls .navigate-down.enabled:hover { 272 | border-top-color: #f3d7ac; } 273 | 274 | /********************************************* 275 | * PROGRESS BAR 276 | *********************************************/ 277 | .reveal .progress { 278 | background: rgba(0, 0, 0, 0.2); } 279 | 280 | .reveal .progress span { 281 | background: #e7ad52; 282 | -webkit-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 283 | -moz-transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); 284 | transition: width 800ms cubic-bezier(0.26, 0.86, 0.44, 0.985); } 285 | -------------------------------------------------------------------------------- /8/0_sample.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 62 | 223 | 224 | 225 | --------------------------------------------------------------------------------