Skip to content
Nov 9 09

Useful Trig Methods

by Colin

I've recently been working on a physics/trigonometry project at home using Processing and memo's amazing MSARemote. In short, I realized I haven't posted anything on Tomorrow Evening in ages, I have a lot of cool things up my sleeve right now, just trying to find time to get all these ideas out. I'll be taking all of Thanksgiving week off to take a break from work and do some fun experiments. If I weren't a web developer I'd turn my internet off for a few weeks, I keep finding such great developers/art online that I start something new every other day and never finish what I was working on the day before! That needs to end soon :P. I know I said I was doing a Processing experiment and this code is in AS3 but I have a good reason why! My wordpress doesn't know how to format processing code and since it's only a few lines, I converted it to AS3.

function findDistance(x1:Number, y1:Number, x2:Number, y2:Number) : Number{
  var xd:Number = x1 - x2;
  var yd:Number = y1 - y2;
  var td:Number = Math.sqrt(xd * xd + yd * yd);
  return td;
}
 
function findAngle(x1:Number, y1:Number, x2:Number, y2:Number) : Number{
  var xd:Number = x1 - x2;
  var yd:Number = y1 - y2;
 
  var t:Number = Math.atan2(yd,xd);
  var a:Number = 180 + (-(180 * t) / Math.PI);
  return a;
}
Sep 25 09

Comment Generator

by Colin

commentGenerator
read more...

Jul 23 09

Quick Duplicate

by Colin

quickDuplicate
read more...

Jul 17 09

Layer Settings

by Colin

layerSettings
Ever need to guide out a bunch of layers real quick? Change the outline color for multiple layers? This JSFL command let's you alter multiple layer settings all at once. read more...

Jun 25 09

Transform Objects

by Colin

transformImage
The beauty of this JSFL command is that it let's you change the scale/size of multiple objects in multiple frames at once.
read more...