Welcome Guest [Log In] [Register]
Add Reply
Sort animations; I made something!
Topic Started: Feb 10 2008, 03:02 PM (1,179 Views)
Jesin
Member Avatar
The Small Fish
[ * ]
I have made something somewhat decent. It's not very big, I just went overboard on a CS assignment, and so it is written in Java. I have some pretty good animations of quick, gnome, selection, and insertion sorts. The quicksort one has two flags that can be set to change options: parallel and medianOf3. You can guess what they do. The abstract base class, SortAnimation, should be useful for anyone who wants to animate a different algorithm. I'd also be interested in feedback from anyone with a better way to do it. I'll be posting the sources here.
Offline Profile Quote Post Goto Top
 
Jesin
Member Avatar
The Small Fish
[ * ]
Meh. I'm attaching the files because this forum software kills indentation. Shouldn't anything between code tags be (X)HTML pre?

Also, I know I should comment my code. I did with the base SortAnimation class, and I'll probably comment the other ones sometime in the future.

EDIT: I just fixed a bug in the selection sort animation. I had forgotten to redraw one of the positions after a swap.
Attached to this post:
Attachments: SortAnimation.java (4.68 KB)
Attachments: GnomeSortAnimation.java (790 Bytes)
Attachments: SelectionSortAnimation.java (967 Bytes)
Attachments: InsertionSortAnimation.java (959 Bytes)
Attachments: QuickSortAnimation.java (2.22 KB)
Edited by Jesin, Feb 10 2008, 06:08 PM.
Offline Profile Quote Post Goto Top
 
techwizrd
Member Avatar
Magister ex Machina
[ *  *  * ]
Eh? You do realize we have limited space on the board, right? Why not upload them to MediaFire or a similar provider?
My DeviantArt user page Please comment and add me to your favorites!
Posted Image
Offline Profile Quote Post Goto Top
 
BobTheFerret
Member Avatar
It's The End Of The World As We Know It
[ *  * ]
If nobody uses the space, it doesn't matter how little there is.

I attached images *regularly* on the old board and managed to have no problem.
It is dark. You are likely to be eaten by a grue.
Offline Profile Quote Post Goto Top
 
Jesin
Member Avatar
The Small Fish
[ * ]
It's just 9.6 KB.
(For comparison, the image in Techie's sig is 29.1 KB.)

Also, when/if I make changes, I will replace the old file with the new one, rather than uploading the new copies and leaving the old ones there.

So, I ask you. You likes them?
Offline Profile Quote Post Goto Top
 
techwizrd
Member Avatar
Magister ex Machina
[ *  *  * ]
Jesin
Feb 11 2008, 04:27 PM
It's just 9.6 KB.
(For comparison, the image in Techie's sig is 29.1 KB.)

Also, when/if I make changes, I will replace the old file with the new one, rather than uploading the new copies and leaving the old ones there.

So, I ask you. You likes them?
Actually, my sig is not uploaded to the forum. It is uploaded to Picoodle.

@Bobtheferret: It probably seemed insignificant to you considering the old forum has 16 MB possible of free space. If we had continued to use that forum for a long time and everyone uploaded their various pictures, siginatures, avatars, and whatnot, we wouldn't have any space left after a while. The forum's space should be left to stuff we actually need.

If anyone needs files, pictures, or etc. uploaded somewhere, just ask me. I'll take care of it.
My DeviantArt user page Please comment and add me to your favorites!
Posted Image
Offline Profile Quote Post Goto Top
 
Jesin
Member Avatar
The Small Fish
[ * ]
techwizrd
Feb 11 2008, 05:21 PM
If anyone needs files, pictures, or etc. uploaded somewhere, just ask me. I'll take care of it.
Move the files elsewhere if you want, as long as I still get to modify them.
Offline Profile Quote Post Goto Top
 
techwizrd
Member Avatar
Magister ex Machina
[ *  *  * ]
Jesin
Feb 11 2008, 05:56 PM
techwizrd
Feb 11 2008, 05:21 PM
If anyone needs files, pictures, or etc. uploaded somewhere, just ask me. I'll take care of it.
Move the files elsewhere if you want, as long as I still get to modify them.
Why not get a MediaFire account? It's really easy.
My DeviantArt user page Please comment and add me to your favorites!
Posted Image
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Programming · Next Topic »
Add Reply