CLICK HERE TO COPY
Actionscript:
[SWF(width = 600, height = 600)]
var a:Number = 0.02;
var b:Number = .9998;
var xn1:Number = 5;
var yn1:Number = 0;
var xn:Number, yn:Number;
var scale:Number = 10;
var iterations:Number = 20000;
var step:Number = stage.stageWidth / iterations;
function f(x:Number):Number{
var x2:Number = x * x;
return a * x + (2 * (1 - a) * x2) [...]
CLICK HERE TO COPY
Actionscript:
// from
// http://www.gamedev.net/topic/444154-closest-point-on-a-line/
function getClosestPoint(A:*, B:*, P:*, segmentClamp:Boolean=true):Point {
var AP:Point = new Point(P.x - A.x, P.y - A.y),
AB:Point = new Point(B.x - A.x, B.y - A.y);
var ab2:Number=AB.x*AB.x+AB.y*AB.y;
var ap_ab:Number=AP.x*AB.x+AP.y*AB.y;
var t:Number=ap_ab/ab2;
if (segmentClamp) {
if (t<0.0) {
[...]
By Zevan | August 30, 2011
Cross your eyes to see 3D third image:
Posted in 3D | Tagged papervision |
By Zevan | August 28, 2011
2018 UPDATE: grab the zip here http://actionsnippet.com/actionsnippet.zip
Seems I missed a good 15-20 requests over the years - so here it is ^^
Who would like a zip of the folder I used when making this site fla files and all? If you want one, post a comment and I'll send it to you.
Actually have a little [...]