software en
Kit Petrie's code samples
You have found Kit Petrie's web presence.
These are some sample programs from a few of my courses in Computer
Science at Cal Poly
Pomona.
Feel free to use this code for non-commercial purposes, no
warranty is made as to the usefullness or correcness of any code found
here.
If you have questions you may contact me at kit _at_ kitpetrie dot
com
CS
331: Algorithm Design and Analysis
- Kth.java takes an unsorted array and
finds the Kth sorted element within that array. Four different sorting
algorithms are compared: mergesort (whole array), iterative
quicksort (until pivot ==k), recursive quicksort
(until pivot==k) and recursive quicksort using median to median for
pivot selection. The time complexity of the four algorithms are
compared for a number of array sizes and positions of K within the
array.
CS
365: Computer Architechture
- Mult.java contains a class that
simulates the harware representation of multiplying two floating point
numbers together.
CS 420: Artificial Inteligence
CS 431: Operating Systems
- AlgorithmScheduler.java
simulates the scheduling of several algorithms using Shortest Job First,
First In First Out, and Round Robin with slice 3 & 5.
CS 460: Secure Communications
- RSA.java implements the RSA encryption
algorithm.
Here are some links to some other projects that I have
programmed:
Eyes on the Exoplanets. A Data driven 3D immersive visualization of all of the planets that have been found orbiting other stars in the Milky Way galaxy.
I wrote a custom shader to represent all of the exoplanet systems as sprites with the ability to identify each system on mose hover and to encode star type, number of planets and unique ID into the RGBA value of the sprite.
This incerased performance (framerate) of the software 125% and increased the data capacity from 2000 to 20,000 stars.
Finalist for 2014 SXSW interacive award for Technical Acheivement
iOS
Earth Now. A beautiful data driven tool to visualize some of NASA's best climate data. Awarded Best Mobile App for Education and Reference by the Academy of Digital Arts and Sciences.
Sudoku Slider iOS app. An basic 8 tile slider puzzle
with the novelty that each tile is a sudoku puzzle and the correct solution
creates a 9x9 sudoku. Developed for F84 games in 2009.
Living Photo
is an iOS app that will take a picture
of a face and an audio clip from the user and then create an animation of the face speaking the audio. Created for Conspiracy Entertainment with F84 games.