12
Nov
10

I’ve forgotten the math


I was working on an awesome little snippet of code for dynamically generating graphs using java and jsp. I know google has an app sort of thing you can use that they have developed but I decided that, hell, I’m totally capable of doing this myself.

So off I trot, I get the basics, I have my pie graph, I have my slices of pie, and it works nicely with percentages. I decide I want to make my graph look pretty so I get to work adding some contrast between the slices. Part of what I want to do involves drawing a line where two slices meet. This shouldn’t be to hard (we’ll that’s what I was thinking like 2 hours ago).

Anyway, turns out all that awesome maths I studied in high school about cos, sin, tan, opposite, adjacent, hypotenuse and tangents has drifted out of my brain. I did some googling trying to locate a formula and I came across the most AWESOME site. It has detailed explanations and diagrams, this is one to keep in the ‘awesome reference stuff’ pile:

The Carpentry Way

Signing Off – MCL

Advertisements

0 Responses to “I’ve forgotten the math”



  1. Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Categories

November 2010
M T W T F S S
    Dec »
1234567
891011121314
15161718192021
22232425262728
2930  

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 9 other followers

Blog Stats

  • 12,439 hits

%d bloggers like this: