diff --git a/sorting/CocktailShaker.gif b/sorting/CocktailShaker.gif new file mode 100644 index 0000000..f7365c7 Binary files /dev/null and b/sorting/CocktailShaker.gif differ diff --git a/sorting/ColorSort.gif b/sorting/ColorSort.gif new file mode 100644 index 0000000..4713237 Binary files /dev/null and b/sorting/ColorSort.gif differ diff --git a/sorting/ColorSort/ColorSort.pyde b/sorting/ColorSort/ColorSort.pyde index 02d23c1..8c11c11 100644 --- a/sorting/ColorSort/ColorSort.pyde +++ b/sorting/ColorSort/ColorSort.pyde @@ -1,7 +1,7 @@ import colorsys, random def setup(): - size(360 * 2, 360 * 2) + size(180 * 2, 180 * 2) global array, carray frameRate(1000) diff --git a/sorting/README.md b/sorting/README.md index f8818a5..ea10ad0 100644 --- a/sorting/README.md +++ b/sorting/README.md @@ -8,6 +8,8 @@ Sketches that visualize sorting algorithms as they progress. - **cocktail_shaker_line** - Sorting of a line using the cocktail shaker algorithm (double bouble sort I believe). Needs reworking as the colors and movement of the line is not as expected (colors shift, movement doesn't properly correlate). -- **insertion_sort_line** - Sorting of a line using the insertion sort algorithm. +![Cocktail Shaker Line Sorting](./CocktailShaker.gif) -- **ColorSort** - Spherical rainbow sorted using simple Bubblesort (?) algorithm. Probably the sketch I am most proud of in the sorting category, as the sphere representation was difficult to create ande model. \ No newline at end of file +- **ColorSort** - Circular rainbow sorted using simple Bubblesort (?) algorithm. Probably the sketch I am most proud of in the sorting category, as the sphere representation was difficult to create ande model. + +![Colorsort Circular Rainbow Sort](./ColorSort.gif) \ No newline at end of file diff --git a/sorting/insertion_sort_line/insertion_sort_line.pyde b/sorting/insertion_sort_line/insertion_sort_line.pyde deleted file mode 100644 index d9d0da3..0000000 --- a/sorting/insertion_sort_line/insertion_sort_line.pyde +++ /dev/null @@ -1,8 +0,0 @@ -def setup(): - -def draw(): - if unsorted: - get = unsorted.pop(0) - for index, num in enumerate(sorted): - if sorted[index] < sorted[index + 1] and sorted[index + 1] >= get: - sorted.append( diff --git a/sorting/insertion_sort_line/sketch.properties b/sorting/insertion_sort_line/sketch.properties deleted file mode 100644 index 2456b0a..0000000 --- a/sorting/insertion_sort_line/sketch.properties +++ /dev/null @@ -1,2 +0,0 @@ -mode=Python -mode.id=jycessing.mode.PythonMode