Posts Tagged ‘school’

Bresenham’s Line Algorithm

Posted in Left Brain on February 16th, 2010 by Jordan – Comments Off

Bresenham’s line algorithm is the best known way to render a continuous and straight line through a raster display. I started out allowing floating point operations, but quickly decided to implement the algorithm using only integers. I didn’t like the online explanations and tutorials of the algo, so I decided to write something that I conceptually understood. View my code here.

My algorithm works by increasing an “error” variable by y0 – y1 every iteration. Should the error ever rise above x0-x1, the error is decreased by x0 – x1 and the drawn Y value is increased by 1.

Rewriting Stuyvesant’s Computer Science Website

Posted in Left Brain on December 20th, 2009 by Jordan – Comments Off

I have been given the responsibility of redesigning and rewriting Stuyvesant High School’s computer science website (cs.stuy.edu).

We are leaning towards writing a bare-bones server using Python’s WSGI specification. The specifics are still being worked out, but this new web presence will need to:

  • Serve a “presentable” site to the public complete with teacher bios, course descriptions, syllabus, and possibly a calendar.
  • Serve special class pages with editable sections and some sort of source code browser to authenticated users.

Since every teacher at Stuy would rather edit files in Emacs than bother with a buggy AJAX admin interface, most configuration and static content will be kept in plain-text files. Again, the specifics have not been worked out. More to come!

Pointdrive for Desbot

Posted in Left Brain on December 7th, 2009 by Jordan – Comments Off

Pointdrive is a revolutionary control system developed by me and a small team of programmers for Stuyvesant FRC’s 2007-2008 season. The system includes a bezier curve interpreter (written in C) onboard the robot’s IFI PIC18 RC unit as well as an AdobeSVG file converter on the host PC. This novel system allows drivers to literally draw the desired autonomous drive routine atop a map of the competition field, greatly reducing pre-match glitches and debugging.