Wednesday, May 2, 2012

A Wave Making App

I was bored so I made a simple application to render a sine wave into a console window. It was a pretty simple idea so it didn't take very long to do and I soon had this:
While I was making it though I found out a cool artifact of choosing to output into a console window. The screen space that I was using to create the output is defined like this:
        Dim drawLength As Integer = 78
        Dim drawHeight As Integer = amplitude * 2
The granular output of the graph results in some neat looking images when you change the wavelength that I will now share with you.
The last of these being my favourite because it looks similar to the anticline/syncline form of folding rock strata. The last thing that I did was add user input and made a video of scrolling quickly through wavelengths. I thought it was kind of neat how some points seemed to be animated as they slid up and down the screen and were rather predictable relative to their surroundings.

No comments:

Post a Comment