“Simple Spy” Wrapper
Jun1
No time to explain right now. Gotta run!
[UPDATE 2009-06-14] I just looked at this again and it had some bugs in it, which I fixed, plus it turns out I forgot to tag it 100 Days, so no one has seen it yet, most likely. I’m also going to take this opportunity to explain the script a little bit. I guess there was this site called ‘Simple Spy’ which used some sort of rotating script to achieve this effect in their side bar. jqueryfordesigners.com, which looks to be an excellent resource for attractive jquery demos and tutorials, did a little demo and tutorial on how to ajaxify it to pull content in from whatever source one desired. But I didn’t follow the tutorial to create mine. I rolled my own wrapper. ‘Wrappers’ are pieces of code which abstract the functionality of some other code. Simply put, a wrapper usually makes life easier for the next programmer, because it handles the inner working for you and gives you just an easy-to-use subset of tools or configuration options.
In this case, my wrapper gives the user one configuration option, FEED_URL. Since I plugged in Maggie’s feed URL, the demo features her content. If we provide my feed URL, we’d get content loading from my web site. Of course, a lot more documentation and use cases would need to be written to make this useful to anyone, but it’s a dandy start.
Based on demo here: http://jqueryfordesigners.com/ajax-spy/
Understanding Trigonometry
Jun8
This animation plots sin, cos, and tan. Tan is cool because it has asymptotes (loosely: straight lines that the equation approaches but never reaches – kind of like the Cooper situation). This is because for angle a, tan a = opposite/adjacent = sin a / cos a … but WAIT! cos a sometimes comes out to 0! We see that in the graph whenever the cosine line touches the x-axis. Well, as you probably recall from algebra, you can’t divide by 0. The answer is just undefined. So when cos a hits 0, you’ll see the tan line jump to a remote y coordinate – in other words, it appears again at the edge.
Tan is sexy like that. Just wait til we get to secant, cosecant, cotangent, arcsine, arccosine, and arctangent!!!!
Storyboard: The Robber or The Image
Jun3
Storyboard: The Robber or The Image
This isn’t the final storyboard – it just gets the concept across. It begins to tell the story of The Robber or The Image by Steve Ersinghaus. I wanted to use phpthumb to do some image resizing as I’d done in Rose Clouds, but didn’t have enough time. Maybe it will make it into version 2.
Understanding Cosine
Jun0
This experiment graphs a sine and a cosine wave on the same grid so you can see how they vary, given degree and hypotenuse length (circle radius).
Understanding Sine
Jun0

i understand this sign
A couple days ago when I was working on the spiral experiment, I needed to read up a little bit on trigonometry because I realized that to calculate the x’s and y’s that I needed to plot, I needed to visualize a right triangle with point A at origin, B at my x coordinate, and C at my y coordinate. Given angle and a hypotenuse length, I could calculate my adjacent and opposite angles using the cosine and sine functions, respectively. Then, increase the hypotenuse length at the same rate as lines are drawn, et voila, you get a spiral.
But I wanted to understand sine better. I saw an animated diagram at the Wikipedia article that showed me how the sine function produced the typical sine wave graph, and how it related to the circle. But I still wanted more. I wanted to be the line and find out how given one number, the other number could be circumscribed either on the circumference of a circle, or transposed(?) onto the positive-x quadrants of a graph. Hence my experiment today.
Questions still lingering
- As I increased angle, my red line was moving clockwise on the circle. I thought increasing angle would move in a counter-clockwise direction. Is this just a move on the part of programming engines to try to be more logical than traditional math?
- As angle approached 90°, the y-coordinate decreased – why? I thought it should increase as angle approaches 90, then fall as it approaches 180, repeat.
Thank you, open source
Jun0
Before I get started on yesterday’s and todays scripts, I’d like to take a moment to thank all the open-source developers who are making my computing experience possible. Here is just some of the open source software that I’ve used during my run on 100 Days.
- jQuery & JQuery UI – javascript & js/css library, respectively
- jQuery plugins: SVG, jMP3, random code snippets from a lot of sites …
- GIMP – for my boitmap graphics
- InkScape – for vector graphics and SVG conceptualization
- gedit – GNOME Text Editor
- Firebug – Javascript debugging would be IMPOSSIBLE without this
- Firefox
- Wordpress
- Ubuntu (currently the “Jaunty Jackalope” version) – my operating system
- Songbird – musical inspiration
WEEeeed
Jun0

*cough*
WEEeeed (yeah, that kind)
I don’t even wanna SAY how much time this took me to build. Everything I tried to do got screwed up. This is, like, Plan X.
Music by G. Love & Special Sauce. Used without permission*.
*please don’t sue me. i have nothing but love for y’all. i buy your albums.
Experiment 20090604
Jun5
There are occasional anomalies which I haven’t figured out. More soon.
———–
[UPDATE 2009-06-05 19:10] This from the developer of the SVG integration plugin for jQuery, Keith Wood:
Hi James
There was a problem with initialising the animation in some cases, which resulted in the start values being set to 0. This has been fixed in v1.4.0, due out tomorrow.
Cheers
Keith
So when 1.4 is out, I’ll put out a v.2 so you can see the difference. And I think I’ll add the music as Mike suggested it would go well with this.
———–
[UPDATE 2009-06-09 13:04] SVG Integration 1.4 came out. Here’s a re-release of Experiment 20090604 with the new library which solved the issue with the shooting branches. Sorry to those who like those.
