diff --git a/README.md b/README.md index f7ed33d..fdc7385 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,20 @@ # The-Nature-of-Code-Examples p5.js -This is the repository for example [p5.js](https://github.com/lmccart/p5.js/) code from [The Nature of Code book](http://natureofcode.com/). If you are looking for the book's raw content (text, illustrations, images, CSS, etc.), have a look at [The Nature of Code repo](https://github.com/shiffman/The-Nature-of-Code). +This is the repository for example [p5.js](https://github.com/lmccart/p5.js/) code from [The Nature of Code book](http://natureofcode.com/). The original repo is at [https://github.com/nature-of-code/noc-examples-p5.js](https://github.com/nature-of-code/noc-examples-p5.js). If you are looking for the book's raw content (text, illustrations, images, CSS, etc.), have a look at [The Nature of Code repo](https://github.com/shiffman/The-Nature-of-Code). The original [Processing](http://processing.org) examples [can be found here](https://github.com/shiffman/The-Nature-of-Code-Examples), along with a [list of other ports](https://github.com/shiffman/The-Nature-of-Code-Examples/blob/master/README.md). +* [chp00_introduction](chp00_introduction/index.md) +* [chp01_vectors](chp01_vectors/index.md) +* [chp02_forces](chp02_forces/index.md) +* [chp03_oscillation](chp03_oscillation/index.md) +* [chp04_systems](chp04_systems/index.md) +* [chp05_libraries](chp05_libraries/index.md) +* [chp06_agents](chp06_agents/index.md) +* [chp07_CA](chp07_CA/index.md) +* [chp08_fractals](chp08_fractals/index.md) +* [chp09_ga](chp09_ga/index.md) +* [chp10_nn](chp10_nn/index.md) ## Installation Instruction diff --git a/chp00_introduction/index.md b/chp00_introduction/index.md new file mode 100644 index 0000000..48b1fc5 --- /dev/null +++ b/chp00_introduction/index.md @@ -0,0 +1,8 @@ +* [Graphing1D](Graphing1D) +* [NOC_I_01_RandomWalkTraditional](NOC_I_01_RandomWalkTraditional) +* [NOC_I_02_RandomDistribution](NOC_I_02_RandomDistribution) +* [NOC_I_03_RandomWalkTendsToRight](NOC_I_03_RandomWalkTendsToRight) +* [NOC_I_04_Gaussian](NOC_I_04_Gaussian) +* [NOC_I_05_NoiseWalk](NOC_I_05_NoiseWalk) +* [Noise 2D](Noise 2D) +* [Noise1D](Noise1D) diff --git a/chp01_vectors/index.md b/chp01_vectors/index.md new file mode 100644 index 0000000..b40b23d --- /dev/null +++ b/chp01_vectors/index.md @@ -0,0 +1,12 @@ +* [NOC_1_01_bouncingball_novectors](NOC_1_01_bouncingball_novectors) +* [NOC_1_02_bouncingball_vectors](NOC_1_02_bouncingball_vectors) +* [NOC_1_02_bouncingball_vectors_object](NOC_1_02_bouncingball_vectors_object) +* [NOC_1_03_vector_subtraction](NOC_1_03_vector_subtraction) +* [NOC_1_04_vector_multiplication](NOC_1_04_vector_multiplication) +* [NOC_1_05_vector_magnitude](NOC_1_05_vector_magnitude) +* [NOC_1_06_vector_normalize](NOC_1_06_vector_normalize) +* [NOC_1_07_motion101](NOC_1_07_motion101) +* [NOC_1_08_motion101_acceleration](NOC_1_08_motion101_acceleration) +* [NOC_1_09_motion101_acceleration](NOC_1_09_motion101_acceleration) +* [NOC_1_10_motion101_acceleration](NOC_1_10_motion101_acceleration) +* [NOC_1_11_motion101_acceleration_array](NOC_1_11_motion101_acceleration_array) diff --git a/chp02_forces/index.md b/chp02_forces/index.md new file mode 100644 index 0000000..494b2b9 --- /dev/null +++ b/chp02_forces/index.md @@ -0,0 +1,8 @@ +* [NOC_2_01_forces](NOC_2_01_forces) +* [NOC_2_02_forces](NOC_2_02_forces) +* [NOC_2_03_forces](NOC_2_03_forces) +* [NOC_2_04_forces_friction](NOC_2_04_forces_friction) +* [NOC_2_05_forces_drag](NOC_2_05_forces_drag) +* [NOC_2_06_attraction](NOC_2_06_attraction) +* [NOC_2_07_attraction_many](NOC_2_07_attraction_many) +* [NOC_2_08_mutualattraction](NOC_2_08_mutualattraction) diff --git a/chp03_oscillation/index.md b/chp03_oscillation/index.md new file mode 100644 index 0000000..e048eb2 --- /dev/null +++ b/chp03_oscillation/index.md @@ -0,0 +1,17 @@ +* [AttractionArrayWithOscillation](AttractionArrayWithOscillation) +* [Exercise_3_02_cannon](Exercise_3_02_cannon) +* [Exercise_3_16_springs](Exercise_3_16_springs) +* [Exercise_3_16_springs_array](Exercise_3_16_springs_array) +* [NOC_3_01_angular_motion](NOC_3_01_angular_motion) +* [NOC_3_02_forces_angular_motion](NOC_3_02_forces_angular_motion) +* [NOC_3_03_pointing_velocity](NOC_3_03_pointing_velocity) +* [NOC_3_04_PolarToCartesian](NOC_3_04_PolarToCartesian) +* [NOC_3_05_simple_harmonic_motion](NOC_3_05_simple_harmonic_motion) +* [NOC_3_06_simple_harmonic_motion](NOC_3_06_simple_harmonic_motion) +* [NOC_3_07_oscillating_objects](v) +* [NOC_3_08_static_wave_lines](NOC_3_08_static_wave_lines) +* [NOC_3_09_exercise_additive_wave](NOC_3_09_exercise_additive_wave) +* [NOC_3_09_wave](NOC_3_09_wave) +* [NOC_3_10_PendulumExample](NOC_3_10_PendulumExample) +* [NOC_3_10_PendulumExampleSimplified](NOC_3_10_PendulumExampleSimplified) +* [NOC_3_11_spring](NOC_3_11_spring) diff --git a/chp04_systems/index.md b/chp04_systems/index.md new file mode 100644 index 0000000..9686381 --- /dev/null +++ b/chp04_systems/index.md @@ -0,0 +1,14 @@ +* [Exercise_4_03_MovingParticleSystem](Exercise_4_03_MovingParticleSystem) +* [Exercise_4_04_asteroids](Exercise_4_04_asteroids) +* [Exercise_4_06_Shatter](Exercise_4_06_Shatter) +* [Exercise_4_10_particlerepel](Exercise_4_10_particlerepel) +* [Exercise_4_12_ArrayofImages](Exercise_4_12_ArrayofImages) +* [NOC_4_01_SingleParticle](NOC_4_01_SingleParticle) +* [NOC_4_02_ArrayParticles](NOC_4_02_ArrayParticles) +* [NOC_4_03_ParticleSystemClass](NOC_4_03_ParticleSystemClass) +* [NOC_4_04_SystemofSystems](NOC_4_04_SystemofSystems) +* [NOC_4_05_ParticleSystemInheritancePolymorphism](NOC_4_05_ParticleSystemInheritancePolymorphism) +* [NOC_4_06_ParticleSystemForces](NOC_4_06_ParticleSystemForces) +* [NOC_4_07_ParticleSystemForcesRepeller](NOC_4_07_ParticleSystemForcesRepeller) +* [NOC_4_08_ParticleSystemSmoke](NOC_4_08_ParticleSystemSmoke) +* [NOC_4_08_ParticleSystemSmoke_WEBGL](NOC_4_08_ParticleSystemSmoke_WEBGL) diff --git a/chp05_libraries/box2d-html5/index.md b/chp05_libraries/box2d-html5/index.md new file mode 100644 index 0000000..8fbc628 --- /dev/null +++ b/chp05_libraries/box2d-html5/index.md @@ -0,0 +1,10 @@ +* [NOC_5_01_exercise](NOC_5_01_exercise) +* [NOC_5_01_exercise_solved](NOC_5_01_exercise_solved) +* [NOC_5_02_Boxes](NOC_5_02_Boxes) +* [NOC_5_03_ChainShape_Simple](NOC_5_03_ChainShape_Simple) +* [NOC_5_04_Polygons](NOC_5_04_Polygons) +* [NOC_5_05_MultiShapes](NOC_5_05_MultiShapes) +* [NOC_5_06_DistanceJoint](NOC_5_06_DistanceJoint) +* [NOC_5_07_RevoluteJoint](NOC_5_07_RevoluteJoint) +* [NOC_5_08_MouseJoint](NOC_5_08_MouseJoint) +* [NOC_5_09_CollisionListening](NOC_5_09_CollisionListening) diff --git a/chp05_libraries/index.md b/chp05_libraries/index.md new file mode 100644 index 0000000..4ecd73c --- /dev/null +++ b/chp05_libraries/index.md @@ -0,0 +1,2 @@ +* [box2d-html5](box2d-html5/index.md) +* [toxiclibs](toxiclibs/index.md) \ No newline at end of file diff --git a/chp05_libraries/toxiclibs/index.md b/chp05_libraries/toxiclibs/index.md new file mode 100644 index 0000000..45149ff --- /dev/null +++ b/chp05_libraries/toxiclibs/index.md @@ -0,0 +1,5 @@ +* [NOC_5_10_SimpleSpring](NOC_5_10_SimpleSpring) +* [NOC_5_11_SoftString](NOC_5_11_SoftString) +* [NOC_5_12_SimpleCluster](NOC_5_12_SimpleCluster) +* [NOC_5_13_AttractRepel](NOC_5_13_AttractRepel) +* [NOC_5_14_Blob_ZL](NOC_5_14_Blob_ZL) diff --git a/chp06_agents/index.md b/chp06_agents/index.md new file mode 100644 index 0000000..931eb9f --- /dev/null +++ b/chp06_agents/index.md @@ -0,0 +1,10 @@ +* [Exercise_6_13_CrowdPathFollowing](Exercise_6_13_CrowdPathFollowing) +* [NOC_6_01_Seek](NOC_6_01_Seek) +* [NOC_6_02_Arrive](NOC_6_02_Arrive) +* [NOC_6_03_StayWithinWalls](NOC_6_03_StayWithinWalls) +* [NOC_6_04_FlowField](NOC_6_04_FlowField) +* [NOC_6_05_PathFollowing_Simple](NOC_6_05_PathFollowing_Simple) +* [NOC_6_06_PathFollowing](NOC_6_06_PathFollowing) +* [NOC_6_07_Separation](NOC_6_07_Separation) +* [NOC_6_08_SeparationAndSeek](NOC_6_08_SeparationAndSeek) +* [NOC_6_09_Flocking](NOC_6_09_Flocking) diff --git a/chp07_CA/index.md b/chp07_CA/index.md new file mode 100644 index 0000000..08a23d9 --- /dev/null +++ b/chp07_CA/index.md @@ -0,0 +1,6 @@ +* [Exercise_7_01_WolframCA_randomizedrules](Exercise_7_01_WolframCA_randomizedrules) +* [Exercise_7_04_WolframCA_scrolling](Exercise_7_04_WolframCA_scrolling) +* [GameOfLifeWrapAround](GameOfLifeWrapAround) +* [NOC_7_01_WolframCA_simple](NOC_7_01_WolframCA_simple) +* [NOC_7_02_GameOfLifeSimple](NOC_7_02_GameOfLifeSimple) +* [NOC_7_03_GameOfLifeOOP](NOC_7_03_GameOfLifeOOP) diff --git a/chp08_fractals/index.md b/chp08_fractals/index.md new file mode 100644 index 0000000..8a9d874 --- /dev/null +++ b/chp08_fractals/index.md @@ -0,0 +1,11 @@ +* [Exercise_8_10_TreeStochasticNoise](Exercise_8_10_TreeStochasticNoise) +* [NOC_8_01_Recursion](NOC_8_01_Recursion) +* [NOC_8_02_Recursion](NOC_8_02_Recursion) +* [NOC_8_03_Recursion](NOC_8_03_Recursion) +* [NOC_8_04_CantorSet](NOC_8_04_CantorSet) +* [NOC_8_05_Koch](NOC_8_05_Koch) +* [NOC_8_05_KochSimple](NOC_8_05_KochSimple) +* [NOC_8_06_Tree](NOC_8_06_Tree) +* [NOC_8_07_TreeStochastic](NOC_8_07_TreeStochastic) +* [NOC_8_08_SimpleLSystem](NOC_8_08_SimpleLSystem) +* [NOC_8_09_LSystem](NOC_8_09_LSystem) diff --git a/chp09_ga/index.md b/chp09_ga/index.md new file mode 100644 index 0000000..572a4d5 --- /dev/null +++ b/chp09_ga/index.md @@ -0,0 +1,7 @@ +* [EvolveFlowField](EvolveFlowField) +* [NOC_9_01_GA_Shakespeare](NOC_9_01_GA_Shakespeare) +* [NOC_9_01_GA_Shakespeare_simplified](NOC_9_01_GA_Shakespeare_simplified) +* [NOC_9_02_SmartRockets_superbasic](NOC_9_02_SmartRockets_superbasic) +* [NOC_9_03_SmartRockets](NOC_9_03_SmartRockets) +* [NOC_9_04_Faces_interactiveselection](NOC_9_04_Faces_interactiveselection) +* [NOC_9_05_EvolutionEcosystem](NOC_9_05_EvolutionEcosystem) diff --git a/chp10_nn/index.md b/chp10_nn/index.md new file mode 100644 index 0000000..b318a20 --- /dev/null +++ b/chp10_nn/index.md @@ -0,0 +1,3 @@ +* [NOC_10_01_Perceptron](NOC_10_01_Perceptron) +* [NOC_10_03_NetworkViz](NOC_10_03_NetworkViz) +* [NOC_10_04_NetworkAnimation](NOC_10_04_NetworkAnimation)