Archive for June, 2009

Understanding Sine

i understand this sign

i understand this sign

Understanding Sine

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

  1. 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?
  2. 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.
permalinkRead More CommentComments (0) Catjavascript

Thank you, open source

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
permalinkRead More CommentComments (0) Catsoftware

Experiment 20090607

Experiment 20090607

permalinkRead More CommentComments (6) Catjavascript

Experiment 20090606

Experiment 20090606 (for saturday – i was painting a house.)

permalinkRead More CommentComments (1) Catjavascript

WEEeeed

*cough*

*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.

permalinkRead More CommentComments (0) Catjavascript, music

Experiment 20090604

Experiment 20090604

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.

Experiment 20090604 v0.2

permalinkRead More CommentComments (5) Catjavascript

IE6: The goddamn hidden cache

Aside from the ‘goddamn’, this article title may sound like a good movie name.  Anyway, it turns out that IE has a hidden cache of temporary internet files (TIFs).  Big deal, right?  Everyone and their grandmother knows that Windows/IE/MS-products-in-general and even software-in-general have these caches of files for whatever reason – sometimes good, sometimes not so good.  A little Google searching and you find out how to unhide your hidden and system files and hot dog – you can see everything.

Wrong. Despite doing everything the Windows UI allows you to do to see ‘hidden’ files, there is a folder called Content.IE5 which you will not find. It can be reached by a few different methods, but the most direct is: Start > Run > “%homepath%\Local Settings\Temporary Internet Files\Content.IE5″.  There you may find some 8-character long folders, an index.dat file, and maybe a desktop.ini file.  Browsing these folders and/or deleting the contents may be nigh impossible, especially if you’ve ever had a cache overflow problem, and especially if you’ve ever had a browser hijacker which sat there reloading incomplete web pages over and over.  Such was my case.  A colleague has entrusted me to clean up some problems on her computer, and this goddamn cache is preventing me from moving forward*.  There are probably 10s if not 100s of millions of little files in these folders.  I’m currently running CClean on it.  It seems to be the only thing that can knock them out at a decent pace.  Even a command line del command just hung.  Shift+Delete? Forget about it.

This issue is confounding, it’s bullshit, and from what I’ve read, it’s still a problem in the latest incarnations of the ghost of Windows past.  Thank god for browser choices such as Safari, Firefox, and Chrome.  To me, junk like this defeats every other MS zealot’s argument in favor of using the ‘standard’ browser, Internet Explorer, or as I prefer: Internet Destroyer.

*a thorough virus scan on a computer takes a long time.  Uselessly scanning millions of tiny files which are garbage data can take all night + all day + ??? I couldn’t let it continue. 24 hours later and it was still scanning in the same folder which I didn’t even care about!!!

permalinkRead More CommentComments (3) Catwindows pains

Flight

Flight

This one  plays with a lot of randomization.  Some of my other scripts before randomized things, but this one has many factors – gravity, current, change in current, rate of change, frequency of current changes- all this is on a randomized timeline.  Constants are forward direction and gravity.  This one also defines boundaries and gently alters reality to keep our guy in the picture.

I’d like to work more on this to allow the bg to move along with our graceful flyer.  But not now.

[UPDATE 2009-06-04 00:32] Added the auto-scroll.  It’s pretty sweet now. I’m happy with it. It now makes use of the ScrollTo jQuery plugin.

permalinkRead More CommentComments (1) Catjavascript

2050

i want to learn kung fu

i want to learn kung fu

A day late and a dollar short as usual, I humbly present 2050, inspired by Steve’s story Software, as well as some fairly popular movie … what’s the name again?

permalinkRead More CommentComments (1) Catjavascript

Experiment 20090601

Get ready to be bored! Experiment 20090601

My excuse for this one is that I had to watch a movie with the wife last night, and then I was too tired to do what I really wanted, plus I needed to teach myself color animation before I get to do the script I have in mind. There: 3 perfectly legit reasons for this boring production.

permalinkRead More CommentComments (1) Catjavascript
CSS Template by RamblingSoul | Tomodachi theme by Theme Lab