Posts tagged with "Java"
k-means Clustering
A Processing visualization of the k-means clustering algorithm, demonstrating iterative centroid-based data partitioning and Voronoi cell formation for different values of k.
Published: May 18, 2021 | Last Modified: May 13, 2025Buddhabrot
An implementation of the Buddhabrot fractal rendering technique, which visualizes escape-time trajectories of points outside the Mandelbrot set, creating intricate patterns that resemble a seated Buddha figure.
Published: August 25, 2019 | Last Modified: May 13, 2025Blending Textures With Open Simplex Noise
A Processing implementation that combines Open Simplex Noise with image blending techniques to create smooth, organic animations of texture transitions.
Published: August 18, 2019 | Last Modified: May 13, 2025Cube Wave
A Processing implementation of a 3D cube wave animation using PeasyCam for camera control, featuring dynamic lighting and orthographic projection for a mesmerizing visual effect.
Published: December 30, 2018 | Last Modified: May 13, 2025Lorenz Doll
A Processing visualization where each pixel of an image is transformed into a Lorenz System, with the system’s velocity mapped to the original pixel’s brightness values.
Published: November 21, 2018 | Last Modified: May 13, 2025Barnsley Fern
A Processing implementation of the Barnsley Fern fractal, demonstrating iterative geometric transformations to create a self-similar fern-like pattern with applications in computer graphics and chaos theory.
Published: June 28, 2018 | Last Modified: May 13, 2025UVa Online Judge Challenge "11045"
This is a maximum flow problem on a bipartite graph. I created the flow chart above to visualize the 3 test cases. The virtual judge run time was 0.18s.
Published: May 1, 2018 | Last Modified: May 2, 2025Kattis Challenge "Grid"
Solved using a non-recursive version of BFS. Runs in pretty good time.
Published: April 28, 2018 | Last Modified: May 2, 2025UVa Online Judge Challenge "10305"
This problem presents a DAG and the solution requires implementing a topological sort. I noticed that a topological sort can be implemented using only boolean arrays so I used this as an opportunity to finally get around to using Java’s BitSet class. The virtual judge run time was 0.050s.
Published: April 26, 2018 | Last Modified: May 2, 2025UVa Online Judge Challenge "572"
Although BFS and DFS were recommended solutions to the problem, I saw an opportunity to solve this problem using Disjoint Sets. The virtual judge run time was 0.050s.
Published: April 23, 2018 | Last Modified: May 2, 2025Comparing Java Distance Functions
A Java program that compares various distance calculation methods, including Manhattan, Euclidean, and Chebyshev distances, and visualizes their differences using Processing.
Published: April 17, 2018 | Last Modified: May 13, 2025Faster Java String Inputs
A high-performance Java input reader class optimized for programming contests, providing fast integer and double parsing with automatic tokenization and buffering options.
Published: April 11, 2018 | Last Modified: May 13, 2025Kruskal's Algorithm Visualized With Processing
A Processing implementation of Kruskal’s algorithm for finding minimum spanning trees in weighted graphs, demonstrating the O(E log E) greedy approach to network optimization.
Published: April 11, 2018 | Last Modified: May 13, 2025Collatz Conjecture + Unit Circle
A Processing visualization of the Collatz Conjecture mapped onto a unit circle, creating 360 distinct branches with 1-degree turns, featuring an interactive exploration of number paths.
Published: April 9, 2018 | Last Modified: May 13, 2025UVa Online Judge Challenge "1112"
This problem involves a relatively small graph, so I opted to implement the Floyd-Warshall Algorithm instead of Dijkstra’s Algorithm for the sake of simplicity. This algorithm finds the shortest path between every pair of vertices in a graph, running in O(n^3) time. Although this might sound inefficient, the UVA judge accepted this program with a runtime of 0.12 seconds, which is well within the 3-second threshold. I designed this algorithm using an object-oriented approach and avoided arrays, so that if I ever have enough free time, I can easily integrate it into Processing and visualize it in 3D.
Published: April 9, 2018 | Last Modified: May 2, 2025Minimum Spanning Tree Visualized
A Processing visualization of Prim’s Algorithm creating a minimum spanning tree on procedurally generated terrain using Perlin noise height maps and orthographic projection.
Published: April 7, 2018 | Last Modified: May 13, 2025AT&T Hackathon
A reflection on participating in the AT&T Hackathon, focusing on Android game development, optimization techniques, and rapid prototyping of 3D scene building functions.
Published: March 12, 2018 | Last Modified: May 13, 2025Generating Terrain with Open Simplex Noise
A Processing implementation of a Minecraft-style terrain generator using Open Simplex Noise, featuring 3D voxel-based terrain with performance analysis of random walker agents.
Published: January 3, 2018 | Last Modified: May 13, 2025Open Simplex Noise
A Processing implementation exploring 4D Simplex Noise to create smooth, organic looping animations through a 2D grid of pixel objects with variable noise scaling.
Published: January 2, 2018 | Last Modified: May 13, 2025Flipping Tiles
A Processing sketch creating mesmerizing animations of tiles that flip based on either random patterns or Perlin noise algorithms, demonstrating creative uses of procedural animation.
Published: November 18, 2017 | Last Modified: May 13, 2025Juno Cam Image Processing
A Java program that reconstructs and processes raw image data from NASA’s Juno spacecraft’s pushframe camera, combining multiple filter strips to create high-resolution composite images of Jupiter.
Published: November 12, 2017 | Last Modified: May 13, 2025UVa Online Judge Challenge "10550"
“Now that you’re back to school for another term, you need to remember how to work the combination lock on your locker. A common design is that of the Master Brand, shown at right. The lock has a dial with 40 calibration marks numbered 0 to 39. A combination consists of 3 of these numbers; for example: 15-25-8. To open the lock, the following steps are taken…”
Published: November 9, 2017 | Last Modified: May 2, 2025UVa Online Judge Challenge "272"
“TEX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a beautiful document. Beautiful documents use…”
Published: October 17, 2017 | Last Modified: May 2, 2025UVa Online Judge Challenge "100"
“Problems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. Consider the following algorithm…”
Published: October 5, 2017 | Last Modified: May 2, 2025UVa Online Judge Challenge "10110"
“There is man named ”mabu” for switching on-off light in our University. He switches on-off the lights in a corridor. Every bulb has its own toggle switch. That is, if it is pressed then the bulb turns on. Another press will turn it off. To save power consumption (or may be he is mad or something else) he does a peculiar thing. If in a corridor there is n bulbs, he walks along the corridor back and forth n times and in i-th walk he toggles only the switches whose serial is divisable by i. He does not press any switch when coming back to his initial position. A i-th walk is defined as going down the corridor (while doing the peculiar thing) and coming back again. Now you have to determine what is the final condition of the last bulb. Is it on or off?”
Published: October 5, 2017 | Last Modified: May 2, 2025Kattis Challenge "Parking"
“When shopping on Long Street, Michael usually parks his car at some random location, and then walks to the stores he needs. Can you help Michael choose a place to park which minimises the distance he needs to walk on his shopping round? Long Street is a straight line, where all positions are integer. You pay for parking in a specific slot, which is an integer position on Long Street. Michael does not want to pay for more than one parking though. He is very strong, and does not mind carrying all the bags around.”
Published: September 15, 2017 | Last Modified: May 2, 2025Kattis Challenge "Sum of Others"
“Every day, your job requires you to add up long lists of integers, like the following:
3 + 2 + -4 + 8 + 3 + -6 + 1 + 4 + 6 + -1 + -6 = 10
That is, a sum of positive and negative integers, followed by an equals sign, followed by a single integer. To save yourself some time, you normally leave out the and signs as you write down your work, so the previous example would be…”
Published: September 15, 2017 | Last Modified: May 2, 2025UVa Online Judge Challenge "11172"
“Some operators checks about the relationship between two values and these operators are called relational operators. Given two numerical values your job is just to find out the relationship between them that is (i) First one is greater than the second (ii) First one is less than the second or (iii) First and second one is equal.”
Published: August 24, 2017 | Last Modified: May 2, 2025Kattis Challenge "Line Them Up"
“An eccentric coach asks players on the team to line up alphabetically at the start of practice. The coach does not tell the players whether they need to line up in increasing or decreasing order, so they guess. If they guess wrong, the coach makes them run laps before practice. Given a list of names, you are to determine if the list is in increasing alphabetical order, decreasing alphabetical order or neither.”
Published: August 18, 2017 | Last Modified: May 2, 2025Kattis Challenge "Server"
“You are in charge of a server that needs to run some submitted tasks on a first-come, first-served basis. Each day, you can dedicate the server to run these tasks for at most minutes. Given the time each task takes, you want to know how many of them will be finished today.”
Published: August 18, 2017 | Last Modified: May 2, 2025Kattis Challenge "A Different Problem"
“Write a program that computes the difference between non-negative integers.”
Published: August 15, 2017 | Last Modified: May 2, 2025A Java implementation of the counting sort algorithm, a non-comparison based sorting method with O(n+k) time complexity, demonstrated using Processing.
Published: July 18, 2017 | Last Modified: May 13, 2025