![]() ![]() The coordinates (0, 0) are in the top left of the window, and (1000, 1000) is in the bottom right. Your visualizations can always be drawn presuming a 1000x1000 canvas, which will then be scaled to the actual size. The constants Visualizer.DRAW_WIDTH and Visualizer.DRAW_HEIGHT are the maximum width and height of the canvas. The window is set to scale dynamically, but your drawing canvas is constant. If you're creating a sort, consider extending the abstract class Sort. Consider modfiying an Visualization if you think you can do it better, rather than creating a new one. We will only accept new algorithms, or radically different visualizations of already existing algorithms. When considering an algorithm to visualize, check to make sure a visualization of that algorithm does not already exist in the project. For example, sorts, searches, or tree operations. This repository is intended to visualize classic algorithms. ![]() ![]() Please document your code well, and make sure no artifacts are left from any IDE you might use. Once you've created your visualization and tested it, submit a pull request. The classes TestVisualization and BubbleSort are intended to be examples of how to extend Visualizer. Take a look at the Java Graphic2D library for easy instructions and how to draw different shapes for a visualization of your algorithm! This class should extend the class Visualizer and implement its three important methods listed below. Contributing is easy! Fork the repo on github, and create a new class named after the algorithm you're visualizing in the src/ directory. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |