gifs for sorting sketches

This commit is contained in:
Xevion
2019-12-10 15:09:26 -06:00
parent e47b07967d
commit e13d07fea4
6 changed files with 5 additions and 13 deletions

BIN
sorting/CocktailShaker.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 MiB

BIN
sorting/ColorSort.gif Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 MiB

View File

@@ -1,7 +1,7 @@
import colorsys, random import colorsys, random
def setup(): def setup():
size(360 * 2, 360 * 2) size(180 * 2, 180 * 2)
global array, carray global array, carray
frameRate(1000) frameRate(1000)

View File

@@ -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). - **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. - **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)

View File

@@ -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(

View File

@@ -1,2 +0,0 @@
mode=Python
mode.id=jycessing.mode.PythonMode