ScratchData LogoScratchData
Back to MalinC's profile

Three axis gimbal set and sorting algorithms

MAMalinC•Created August 3, 2013
Three axis gimbal set and sorting algorithms
46
36
1446 views
View on Scratch

Instructions

Press space bar to swap between selection sort and merge sort. Press h to hide stuff and s to show stuff. Tilt the axes by changing the angles.

Description

The circles/polygons are made up of line segments between two vertices. In each step, the vertices are sorted so that line segments that lie far from the observer are drawn first. This way to render 3D is called the Painter's algorithm. When the number of vertices is low, both selection sort and merge sort work well. As the number of vertices increases, selection sort takes considerably longer time than merge sort, thus making the animation less smooth. Selection sort takes O(n²) time. Merge sort takes O(nlog(n)) time. Wikipedia - Gimbal: http://en.wikipedia.org/wiki/Gimbal Wikipedia - Sorting algorithm: http://en.wikipedia.org/wiki/Sorting_algorithm Wikipedia - Painter's algorithm: https://en.wikipedia.org/wiki/Painter%27s_algorithm Wikipedia - Big O notation: http://en.wikipedia.org/wiki/Big_O_notation

Project Details

Project ID11703595
CreatedAugust 3, 2013
Last ModifiedJuly 11, 2018
SharedAugust 3, 2013
Visibilityvisible
CommentsAllowed