STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/68711372?noj=FRM68711372-22DC" width="1" height="1"></div>

g3dcr.swf

This is the info page for
Flash #166718

(Click the ID number above for more basic data on this flash file.)


Text
xmin

xmax

ymin

ymax

zmin

zmax

3D Function Grapher

Copyright 2004  by
Barbara Kaskosz

GRAPH

START

Enter a formula for f(x,y) (in terms of x,y), enter  x-, y- ranges
and click the GRAPH button to see the graph of z=f(x,y):

Click arrows to
rotate graph.

Enter an (optional) z-range or leave it  set to Auto. If you want
to specify a z-range, you have to enter both zmin and zmax. To set
the z-range back to Auto, type Auto in both boxes.

Use ordinary syntax, for example:

sin(pi*x*y)/0.5+x^2-e^x

Mouse over the SYNTAX button for a complete set of rules
and functions.

Version 1.2

Enter x- and y- ranges in the boxes below:

RESET

START

Approximate current z-range displayed:

Click to show or hide wireframe:

FRAME

Choose a color scheme:

SYNTAX

z=x^3-3*x+y^3-3*y

A few preprogrammed examples:

z=sin(4*x*y)

z=cos(x*y)*(x^2-y^2)

Note: Depending on the speed of your computer
and the grid you choose, you may have to wait a
second or so for buttons to respond.

z =

Enter New
GRID

START

To change grid  (must be an integer
between 5 and 22), type in the new
number and click Enter New Grid:

FUNCTIONS AND SYNTAX RULES
Below is a list of functions which the grapher knows
and examples of usage. Note that "ln" stands for the
natural logarithm.
ln, the natural logarithm, for example: ln(x*y).
sin,   for example:  sin(x^2-1).
cos, for example: cos(x-y+2).
tan, for example: tan(2*x-y).
asin, (inverse sin), for example: asin(3*x).
acos, (inverse cos), for example: acos(x).
atan, (inverse tan) for example: atan(10).
abs, absolute value, for example: abs(x-y).
max, maximum of two entries, for example:max(x^2,y).
min, minimum of two entries, for example: min(sin(x),0)
sqrt, squre root, for example: sqrt(e^x).

Also, some less common functions:
floor, rounds down to the previous integer, e.g. floor(x).
ceil, rounds up to the next integer, e.g. ceil(x^2+y).
round, rounds up to the nearest integer, e.g. round(x).

Note the following syntax rules:
-- use e to enter the natural base e
-- use e^x for the natural exponential, for example:
e^(2*x*y+3).
-- pi stands for the constant pi, for example: sin(pi*x).
-- always use  *  to denote multiplication
-- always use parentheses inside functions, for
example, tan(x-1), sin(cos(x^2+4)), etc.
-- powers associate to the right; that is:
2^3^2=2^(3^2).
-- sin(x+1)^2 stands for (sin(x+1))^2.
When in doubt, use parentheses.

ActionScript [AS1/AS2]

Frame 1
function doCompile(inputstring, varnames) { function istokf1(chars) { var _local1 = chars; i = 0; while (i < f1Array.length) { if (_local1 == f1Array[i]) { return(true); } i++; } return(false); } function isVar(chars) { var _local1 = chars; i = 0; while (i < varnames.length) { if (_local1 == varnames[i]) { return(true); } i++; } return(false); } function istokf2(chars) { var _local1 = chars; i = 0; while (i < f2Array.length) { if (_local1 == f2Array[i]) { return(true); } i++; } return(false); } function isLet(char) { return(lets.indexOf(char) >= 0); } function isOper(char) { return(opers.indexOf(char) >= 0); } function isNum(char) { return(nums.indexOf(char) >= 0); } function setToken(curtype, curvalue, curlength) { tokentype = curtype; tokenvalue = curvalue; tokenlength = curlength; } function nextToken(inputstring, pos) { var _local1; var _local3; var inilen; var _local2; var cString; cString = inputstring; _local2 = pos; inilen = inputstring.length; if ((_local2 >= inilen) || (_local2 < 0)) { return(false); } _local1 = cString.charAt(_local2); if (isLet(_local1)) { _local3 = _local1; do { _local2 = _local2 + 1; if (_local2 >= inilen) { break; } _local1 = cString.charAt(_local2); if (!isLet(_local1)) { break; } _local3 = _local3 + _local1; } while (1); if (istokf1(_local3)) { setToken("f1", _local3, _local3.length); return(true); } if (istokf2(_local3)) { setToken("f2", _local3, _local3.length); return(true); } setToken("v", _local3, _local3.length); return(true); } if (isNum(_local1)) { _local3 = _local1; do { _local2 = _local2 + 1; if (_local2 >= inilen) { break; } _local1 = cString.charAt(_local2); if (!isNum(_local1)) { break; } _local3 = _local3 + _local1; } while (1); setToken("n", _local3, _local3.length); return(true); } if (isOper(_local1)) { setToken("oper", _local1, 1); return(true); } return(false); } function checkToks(inputstring) { var pString; var _local3; var _local2; var _local1; var bPos; var fchar; var bchar; var counter; var matchpar; var iscomma; var comcounter; pString = inputstring; _local2 = 0; counter = 0; comcounter = 0; _local3 = pString.length; if (pString.indexOf("---") >= 0) { callError("No need for so many minuses."); } else { while ((_local2 < _local3) && (counter < (_local3 * 2))) { if (nextToken(pString, _local2)) { _local1 = _local2 + tokenlength; fchar = pString.charAt(_local1); bPos = _local2 - 1; bchar = pString.charAt(bPos); if (tokentype == "f1") { if (fchar != "(") { callError(("'(' expected at position " + _local1) + "."); return; } if ((_local2 > 0) && (!isOper(bchar))) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local2 > 0) && (bchar == ")")) { callError(("Operator expected at position " + bPos) + "."); return; } } if (tokentype == "f2") { if ((tokenvalue != "max") && (tokenvalue != "min")) { callError(("Unknown functions at position " + _local1) + "."); return; } if (fchar != "(") { callError(("'(' expected at position " + _local1) + "."); return; } matchpar = 1; iscomma = 0; comcounter = 0; while ((matchpar > 0) && (comcounter < _local3)) { comcounter = comcounter + 1; if (pString.charAt(_local1 + comcounter) == "(") { matchpar = matchpar + 1; } if (pString.charAt(_local1 + comcounter) == ")") { matchpar = matchpar + -1; } if (pString.charAt(_local1 + comcounter) == ",") { iscomma = iscomma + 1; } } if (iscomma == 0) { callError(("Two arguments expected for function at position " + _local2) + "."); return; } if ((_local2 > 0) && (!isOper(bchar))) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local2 > 0) && (bchar == ")")) { callError(("Operator expected at position " + bPos) + "."); return; } } if (tokentype == "v") { if (!((isVar(tokenvalue) || (tokenvalue == "pi")) || (tokenvalue == "e"))) { callError(("Unknown entries at position " + _local2) + "."); return; } if ((_local2 > 0) && (!isOper(bchar))) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local2 > 0) && (bchar == ")")) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local1 < _local3) && (!isOper(fchar))) { callError(("Operator expected at position " + _local1) + "."); return; } if ((_local1 < _local3) && (fchar == "(")) { callError(("Operator expected at position " + _local1) + "."); return; } } if (tokentype == "n") { if ((_local2 > 0) && (!isOper(bchar))) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local2 > 0) && (bchar == ")")) { callError(("Operator expected at position " + bPos) + "."); return; } if ((_local1 < _local3) && (!isOper(fchar))) { callError(("Operator expected at position " + _local1) + "."); return; } if ((_local1 < _local3) && (fchar == "(")) { callError(("Operator expected at position " + _local1) + "."); return; } } if (tokenvalue == "(") { if ((_local1 < _local3) && ("^*,)+/".indexOf(fchar) >= 0)) { callError(("Entries expected at position " + _local1) + "."); return; } } if (tokenvalue == ")") { if ((_local1 < _local3) && ("^*+-,/)".indexOf(fchar) == -1)) { callError(("Entries expected at position " + _local1) + "."); return; } if ((bPos >= 0) && ("^*+-,/(".indexOf(bchar) >= 0)) { callError(("Entries expected at position" + _local1) + "."); return; } } if (tokenvalue == ",") { if ((_local2 == 0) || (_local2 == (_local3 - 1))) { callError(("Stray comma at position " + _local2) + "."); return; } if ((_local1 < _local3) && ("^*+,/)".indexOf(fchar) >= 0)) { callError(("Entries expected at position " + _local1) + "."); return; } if ((bPos >= 0) && ("^*+-,/(".indexOf(bchar) >= 0)) { callError(("Entries expected at position " + _local1) + "."); return; } } if ("^/*-+".indexOf(tokenvalue) >= 0) { if ("+*^/),".indexOf(fchar) >= 0) { callError(("Entries expected at position " + _local1) + "."); return; } if (("+*^/(,".indexOf(bchar) >= 0) && (tokenvalue != "-")) { callError(("Entries expected at position " + _local1) + "."); return; } } } else { callError("Unknown characters at position ." + _local2); } _local2 = _local2 + tokenlength; counter = counter + 1; } } } function conOper(inputstring, char) { var _local2 = char; var _local1; var inilen; var mco; var curpos; var _local3; var rightoper; inilen = inputstring.length; _local1 = inputstring; if (_local1.indexOf(_local2) == -1) { return(_local1); } if ((_local1.indexOf(_local2) == 0) && (_local2 != "-")) { callError("Error at the first " + _local2); return(""); } if (_local1.charAt(_local1.length - 1) == _local2) { callError(("Error at the last " + _local2) + "."); return(""); } mco = 0; while ((_local1.indexOf(_local2) > 0) && (mco < (inilen * 6))) { mco = mco + 1; curpos = _local1.indexOf(_local2); leftmove = goLeft(_local1, curpos); if (iserror == 1) { callError(((("Error at " + _local2) + " number ") + mco) + "."); return(""); } _local3 = _local1.substring(leftmove + 1, curpos); rightmove = goRight(_local1, curpos); if (iserror == 1) { callError(((("Error at " + _local2) + " number ") + mco) + "."); return(""); } rightoper = _local1.substring(curpos + 1, rightmove); if (_local2 == "*") { _local1 = (((((_local1.substring(0, leftmove + 1) + "mul(") + _local3) + ",") + rightoper) + ")") + _local1.substring(rightmove, _local1.length + 1); } if (_local2 == "/") { _local1 = (((((_local1.substring(0, leftmove + 1) + "div(") + _local3) + ",") + rightoper) + ")") + _local1.substring(rightmove, _local1.length + 1); } if (_local2 == "-") { _local1 = (((((_local1.substring(0, leftmove + 1) + "minus(") + _local3) + ",") + rightoper) + ")") + _local1.substring(rightmove, _local1.length + 1); } if (_local2 == "+") { _local1 = (((((_local1.substring(0, leftmove + 1) + "plus(") + _local3) + ",") + rightoper) + ")") + _local1.substring(rightmove, _local1.length + 1); } if (_local1.length > (inilen * 7)) { callError("Oooops!"); return(""); } } return(_local1); } function conUnary(inputstring) { var _local1; var inilen; var mco; var curpos; var _local2; var _local3; inilen = inputstring.length; _local1 = inputstring; if (_local1.indexOf("-") == -1) { return(_local1); } if (_local1.charAt(_local1.length - 1) == "-") { callError("Error at the last minus."); return(""); } _local2 = 0; while (_local2 < _local1.length) { if ((_local1.charAt(_local2) == "-") && (unaryId(_local1.charAt(_local2 - 1)))) { _local3 = goRight(_local1, _local2); if (iserror == 1) { callError("Error at position " + _local2); return(""); } _local1 = (((_local1.substring(0, _local2) + "minus(0,") + _local1.substring(_local2 + 1, _local3)) + ")") + _local1.substring(_local3, _local1.length); } if (_local1.length > (9 * inilen)) { callError("Ooops!"); return(""); } _local2++; } return(_local1); } function unaryId(char) { if ("+-,(/*^".indexOf(char) > -1) { return(true); } return(false); } function goRight(inputstring, pos) { var _local2 = inputstring; var rightchar; var _local1; var _local3; rightchar = _local2.charAt(pos + 1); _local1 = pos + 1; if (rightchar == "-") { _local1 = _local1 + 1; if (_local1 >= _local2.length) { iserror = 1; return(_local1); } rightchar = _local2.charAt(_local1); } if (nums.indexOf(rightchar) > -1) { while ((nums.indexOf(_local2.charAt(_local1)) > -1) && (_local1 < _local2.length)) { _local1 = _local1 + 1; } } else if (lets.indexOf(rightchar) > -1) { while ((lets.indexOf(_local2.charAt(_local1)) > -1) && (_local1 < _local2.length)) { _local1 = _local1 + 1; } if (_local2.charAt(_local1) == "(") { _local3 = 1; while ((_local3 > 0) && (_local1 < _local2.length)) { _local1 = _local1 + 1; if (_local2.charAt(_local1) == "(") { _local3 = _local3 + 1; } if (_local2.charAt(_local1) == ")") { _local3 = _local3 + -1; } } } if (_local3 > 0) { iserror = 1; return(_local1); } } else if (rightchar == "(") { _local3 = 1; while ((_local3 > 0) && (_local1 < _local2.length)) { _local1 = _local1 + 1; if (_local2.charAt(_local1) == "(") { _local3 = _local3 + 1; } if (_local2.charAt(_local1) == ")") { _local3 = _local3 + -1; } } _local1 = _local1 + 1; if (_local3 > 0) { iserror = 1; return(_local1); } } else { iserror = 1; return(_local1); } return(_local1); } function goLeft(inputstring, pos) { var _local2 = inputstring; var leftchar; var _local1; var _local3; leftchar = _local2.charAt(pos - 1); _local1 = pos - 1; if (nums.indexOf(leftchar) > -1) { while ((nums.indexOf(_local2.charAt(_local1)) > -1) && (_local1 >= 0)) { _local1 = _local1 + -1; } } else if (lets.indexOf(leftchar) > -1) { while ((lets.indexOf(_local2.charAt(_local1)) > -1) && (_local1 >= 0)) { _local1 = _local1 + -1; } } else if (leftchar == ")") { _local3 = 1; if (_local1 == 0) { iserror = 1; return(_local1); } while ((_local3 > 0) && (_local1 > 0)) { _local1 = _local1 + -1; if (_local2.charAt(_local1) == ")") { _local3 = _local3 + 1; } if (_local2.charAt(_local1) == "(") { _local3 = _local3 + -1; } } _local1 = _local1 + -1; if (_local3 > 0) { iserror = 1; return(_local1); } if ((_local1 >= 0) && (nums.indexOf(_local2.charAt(_local1)) > -1)) { iserror = 1; return(_local1); } if (((_local1 == 0) && (_local2.charAt(_local1) != "-")) && (_local2.charAt(_local1) != "(")) { iserror = 1; return(_local1); } if ((_local1 > 0) && (lets.indexOf(_local2.charAt(_local1)) > -1)) { while ((lets.indexOf(_local2.charAt(_local1)) > -1) && (_local1 >= 0)) { _local1 = _local1 + -1; } } } else { iserror = 1; return(_local1); } return(_local1); } function conCaret(inputstring) { var _local1; var inilen; var _local3; var _local2; var leftmove; var rightmove; var base; var expon; inilen = inputstring.length; _local1 = inputstring; if (_local1.indexOf("^") == -1) { return(_local1); } if (_local1.indexOf("^") == 0) { callError("Error at the first ^."); return(""); } if (_local1.charAt(_local1.length - 1) == "^") { callError("Error at the last ^."); return(""); } _local3 = 0; while ((_local1.indexOf("^") > 0) && (_local3 < (inilen * 6))) { _local3 = _local3 + 1; _local2 = _local1.lastIndexOf("^"); leftmove = goLeft(_local1, _local2); if (iserror == 1) { callError(("Error at ^ number " + _local3) + " from the end."); return(""); } base = _local1.substring(leftmove + 1, _local2); rightmove = goRight(_local1, _local2); if (iserror == 1) { callError(("Error at ^ number " + _local3) + " from the end."); return(""); } expon = _local1.substring(_local2 + 1, rightmove); _local1 = (((((_local1.substring(0, leftmove + 1) + "pow(") + base) + ",") + expon) + ")") + _local1.substring(rightmove, _local1.length + 1); if (_local1.length > (inilen * 7)) { callError("Oooops!"); return(""); } } return(_local1); } function whiteSpaces(inputstring) { var _local2; var _local1; var inilen; var _local3 = 0; inilen = inputstring.length; _local1 = inputstring.toLowerCase(); while ((_local1.indexOf(" ") > -1) && (_local3 < (inilen + 1))) { _local2 = _local1.indexOf(" "); _local1 = _local1.substring(0, _local2) + _local1.substring(_local2 + 1, _local1.length); _local3 = _local3 + 1; } return(_local1); } function checkLegal(inputstring) { var _local3 = inputstring; var _local2; var legal; var _local1; if (_local3 == "") { callError("Empty input."); return(false); } _local2 = 0; while (_local2 < _local3.length) { _local1 = _local3.charAt(_local2); legal = (nums.indexOf(_local1) + lets.indexOf(_local1)) + opers.indexOf(_local1); if (legal == -3) { callError("Unknown characters."); return(false); } _local2++; } return(true); } function checkPars(inputstring) { var _local2 = inputstring; var i; var _local1; var matchpar; var left = 0; var right = 0; var _local3 = 0; i = 0; while (i < _local2.length) { if (_local2.charAt(i) == "(") { left = left + 1; } if (_local2.charAt(i) == ")") { right = right + 1; } i++; } if (left != right) { callError("Mismatched parenthesis."); return(false); } _local1 = 0; while (_local1 < _local2.length) { if (_local2.charAt(_local1) == "(") { matchpar = 1; _local3 = 0; while ((matchpar > 0) && (_local3 < _local2.length)) { _local3 = _local3 + 1; if (_local2.charAt(_local1 + _local3) == "(") { matchpar = matchpar + 1; } if (_local2.charAt(_local1 + _local3) == ")") { matchpar = matchpar + -1; } } if (matchpar > 0) { _local1 = _local1 + 1; callError("Mismatched parenthesis at position number " + _local1); return(false); } } _local1++; } _local1 = 0; while (_local1 < _local2.length) { if (_local2.charAt(_local1) == ")") { matchpar = 1; _local3 = 0; while ((matchpar > 0) && (_local3 < _local2.length)) { _local3 = _local3 + 1; if (_local2.charAt(_local1 - _local3) == ")") { matchpar = matchpar + 1; } if (_local2.charAt(_local1 - _local3) == "(") { matchpar = matchpar + -1; } } if (matchpar > 0) { _local1 = _local1 + 1; callError("Mismatched parenthesis at position number " + _local1); return(false); } } _local1++; } return(true); } function makeStack(inputstring) { var mString; var minilen; var mPos; var mStack; var checkStack; var checkExpr; var counter; mString = inputstring; mPos = 0; mStack = []; checkStack = []; minilen = mString.length; checkExpr = []; checkResult = []; counter = 0; while ((mPos < minilen) && (counter < (minilen * 2))) { if (nextToken(mString, mPos)) { if (tokentype == "f1") { mStack.push(eval (tokenvalue)); mStack.push("f1"); checkStack.push(sin); checkStack.push("f1"); } if (tokentype == "f2") { mStack.push(eval (tokenvalue)); mStack.push("f2"); checkStack.push(plus); checkStack.push("f2"); } if (tokentype == "v") { mStack.push(tokenvalue); mStack.push("v"); checkStack.push("x"); checkStack.push("v"); } if (tokentype == "n") { mStack.push(Number(tokenvalue)); mStack.push("n"); checkStack.push(Number(tokenvalue)); checkStack.push("n"); } } else { callError("Unknown characters."); return([]); } mPos = mPos + tokenlength; counter = counter + 1; } mStack.reverse(); checkExpr = checkStack.reverse(); checkEval(checkExpr); if (iserror == 1) { return([]); } return(mStack); } function callError(mess) { errorMes = "Syntax error. " + mess; iserror = 1; } function checkEval(compiledExpression) { var _local3 = ""; var _local1 = []; var arg1; var arg2; var _local2 = 0; while (_local2 < compiledExpression.length) { _local3 = compiledExpression[_local2++]; if (_local3 == "n") { _local1.push(compiledExpression[_local2]); } else if (_local3 == "v") { _local1.push(1); } else if (_local3 == "f1") { if (_local1.length < 1) { callError("Check number of arguments in your functions."); return; } _local1.push(compiledExpression[_local2](_local1.pop())); } else if (_local3 == "f2") { if (_local1.length < 2) { callError("Check number of arguments in your functions."); return; } arg1 = _local1.pop(); arg2 = _local1.pop(); _local1.push(compiledExpression[_local2](arg1, arg2)); } else { callError("Can't evaluate."); return; } _local2++; } if (_local1.length != 1) { callError(""); } else if (isNaN(_local1[0])) { callError(""); } } var iserror = 0; var errorMes = ""; var stepString; var conString; var tokenvalue; var tokentype; var tokenlength; var nums = "0123456789."; var lets = "abcdefghijklmnopqrstuwvxzy"; var opers = "^*+-/(),"; var fStack = []; stepString = whiteSpaces(inputstring); checkLegal(stepString); if (iserror == 1) { return([[], errorMes, 1]); } checkPars(stepString); if (iserror == 1) { return([[], errorMes, 1]); } checkToks(stepString); if (iserror == 1) { return([[], errorMes, 1]); } conString = conOper(conOper(conOper(conOper(conUnary(conCaret(stepString)), "/"), "*"), "-"), "+"); if (iserror == 1) { return([[], errorMes, 1]); } fStack = makeStack(conString); if (iserror == 1) { return([[], errorMes, 1]); } return([fStack, "", 0]); } function sin(a) { return(Math.sin(a)); } function cos(a) { return(Math.cos(a)); } function tan(a) { return(Math.tan(a)); } function ln(a) { return(Math.log(a)); } function sqrt(a) { return(Math.sqrt(a)); } function abs(a) { return(Math.abs(a)); } function asin(a) { return(Math.asin(a)); } function acos(a) { return(Math.acos(a)); } function atan(a) { return(Math.atan(a)); } function floor(a) { return(Math.floor(a)); } function ceil(a) { return(Math.ceil(a)); } function round(a) { return(Math.round(a)); } function max(a, b) { return(Math.max(a, b)); } function min(a, b) { return(Math.min(a, b)); } function plus(a, b) { return(a + b); } function minus(a, b) { return(a - b); } function mul(a, b) { return(a * b); } function div(a, b) { return(a / b); } function pow(a, b) { var _local1 = b; var _local2 = a; if ((_local2 < 0) && (_local1 == Math.floor(_local1))) { if (_local1 % 2) { return(-Math.pow(-_local2, _local1)); } return(Math.pow(-_local2, _local1)); } if ((_local2 == 0) && (_local1 > 0)) { return(0); } return(Math.pow(_local2, _local1)); } function doEval(compiledExpression) { var entrytype = ""; var operands = []; var arg1; var arg2; var i = 0; while (i < compiledExpression.length) { entrytype = compiledExpression[i++]; if (entrytype == "n") { operands.push(compiledExpression[i]); } else if (entrytype == "v") { operands.push(eval (compiledExpression[i])); } else if (entrytype == "f1") { operands.push(compiledExpression[i](operands.pop())); } else if (entrytype == "f2") { arg1 = operands.pop(); arg2 = operands.pop(); operands.push(compiledExpression[i](arg1, arg2)); } else { return(false); } i++; } return(operands[0]); } function signum(a, b) { if ((b - a) > 0) { return(1); } if ((b - a) < 0) { return(-1); } return(0); } function setUpColors(grid) { var _local2 = grid; var _local3; var _local1; _local1 = 0; while (_local1 <= _local2) { Kolory[_local1] = []; _local3 = 0; while (_local3 <= _local2) { if (colorchoice == 1) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(Math.floor(Math.pow((_local3 / _local2) * 10, 2) + Math.pow((_local1 / _local2) * 10, 2)) + 50, (2 * Math.floor(Math.pow((_local1 / _local2) * 10, 2))) + 50, 80); } if (colorchoice == 2) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(120, Math.floor(Math.pow((_local3 / _local2) * 10, 2) + Math.pow((_local1 / _local2) * 10, 2)) + 50, (2 * Math.floor(Math.pow((_local1 / _local2) * 10, 2))) + 50); } if (colorchoice == 3) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(Math.floor(Math.pow((_local3 / _local2) * 10, 2) + Math.pow((_local1 / _local2) * 10, 2)) + 50, 100, (2 * Math.floor(Math.pow((_local1 / _local2) * 10, 2))) + 50); } if (colorchoice == 4) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(220, Math.floor((_local3 / _local2) * 205) + 50, Math.floor((_local1 / _local2) * 205) + 50); } if (colorchoice == 5) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(Math.floor((_local3 / _local2) * 205) + 50, 220, Math.floor((_local1 / _local2) * 205) + 50); } if (colorchoice == 6) { colo = 3355443 /* 0x333333 */; Kolory[_local1][_local3] = combineRGB(Math.floor((_local1 / _local2) * 205) + 50, Math.floor((_local3 / _local2) * 205) + 50, 220); } _local3++; } _local1++; } } function combineRGB(red, green, blue) { var _local1 = ((red << 16) | (green << 8)) | blue; return(_local1); } function reSet() { var _local1; var _local2; var _local3; outIsError = 0; outErrorMes = ""; errorbox._visible = false; symin = ""; symax = ""; pixArray = []; funArray = []; compiledExpr = []; newy = [0, 1, 0]; prepAxes(); dispxbox._visible = true; dispybox._visible = true; dispzbox._visible = true; boxzmax._visible = true; boxzmin._visible = true; boxxmax._visible = true; boxxmin._visible = true; boxymax._visible = true; boxymin._visible = true; _local2 = 0; while (_local2 <= mesh) { _local1 = 0; while (_local1 <= mesh) { board[(("patch_" + _local2) + "_") + _local1].clear(); _local1++; } _local2++; } _local3 = 1; while (_local3 <= 12) { board["side" + _local3].clear(); _local3++; } } function procInput() { reSet(); prepGraph(); if (outIsError == 1) { return(undefined); } drawGraph(1, 0, 0, -21.496046148071); drawGraph(newy[0], newy[1], newy[2], 23.5619449019234); } function iniClips() { var _local2; var _local1; var _local3; _local3 = 1; while (_local3 <= 12) { board.createEmptyMovieClip("side" + _local3, _local3); _local3++; } _local2 = 0; while (_local2 < mesh) { _local1 = 0; while (_local1 < mesh) { board.createEmptyMovieClip((("patch_" + _local2) + "_") + _local1, ((50 * _local2) + _local1) + 14); _local1++; } _local2++; } } function funcToGraph(a, b) { x = a; y = b; return(doEval(compiledExpr)); } function notLegalValue(a) { var _local1 = a; if (((typeof(_local1) != "number") || (isNaN(_local1))) || (!isFinite(_local1))) { return(true); } return(false); } function isLegal(a) { if (!notLegalValue(a)) { return(true); } return(false); } function outCallError(mes) { outErrorMes = mes; outIsError = 1; errorbox._visible = true; dispxbox._visible = false; dispybox._visible = false; dispzbox._visible = false; boxzmax._visible = false; boxzmin._visible = false; boxxmax._visible = false; boxxmin._visible = false; boxymax._visible = false; boxymin._visible = false; } function prepGraph() { var _local1; var _local2; var curx; var _local3; var curz; var entymin; var entymax; var tranymin; var tranymax; var lastymin; var lastymax; var outarray = []; funArray = []; pixArray = []; xmin = Number(sxmin); xmax = Number(sxmax); zmin = Number(szmin); zmax = Number(szmax); if ((((((zmax <= zmin) || (xmax <= xmin)) || (notLegalValue(xmax))) || (notLegalValue(xmin))) || (notLegalValue(zmax))) || (notLegalValue(zmin))) { outCallError("Check your x-, y- range."); } else if (inpString.length > 0) { outarray = doCompile(inpString, ["x", "y"]); if (outarray[2] == 1) { outCallError(outarray[1]); } else { compiledExpr = outarray[0]; lastymin = funcToGraph(xmin, zmin); lastymax = lastymin; _local2 = 0; while (_local2 <= mesh) { funArray[_local2] = []; curz = zmin + ((_local2 * (zmax - zmin)) / mesh); _local1 = 0; while (_local1 <= mesh) { curx = xmin + ((_local1 * (xmax - xmin)) / mesh); _local3 = funcToGraph(curz, curx); funArray[_local2][_local1] = [curx, _local3, curz]; if (notLegalValue(lastymin)) { lastymin = _local3; } else if ((_local3 < lastymin) && (isLegal(_local3))) { lastymin = _local3; } else { lastymin = lastymin + 0; } if (notLegalValue(lastymax)) { lastymax = _local3; } else if ((_local3 > lastymax) && (isLegal(_local3))) { lastymax = _local3; } else { lastymax = lastymax + 0; } _local1++; } _local2++; } entymin = sentymin.toLowerCase(); entymax = sentymax.toLowerCase(); if ((entymax == "auto") && (entymin == "auto")) { ymin = lastymin; ymax = lastymax; } else { tranymin = Number(entymin); tranymax = Number(entymax); if (((tranymax <= tranymin) || (notLegalValue(tranymax))) || (notLegalValue(tranymin))) { outCallError("Check your z- range. Remember to enter both zmin and zmax."); return; } ymin = tranymin; ymax = tranymax; } if (ymax == ymin) { ymax = ymax + 0.5; ymin = ymin + -0.5; } symax = String(Math.round(ymax * 1000) / 1000); symin = String(Math.round(ymin * 1000) / 1000); _local2 = 0; while (_local2 <= mesh) { pixArray[_local2] = []; _local1 = 0; while (_local1 <= mesh) { pixArray[_local2][_local1] = []; pixArray[_local2][_local1][0] = xtoPix(funArray[_local2][_local1][0]); pixArray[_local2][_local1][1] = ytoPix(funArray[_local2][_local1][1]); pixArray[_local2][_local1][2] = ztoPix(funArray[_local2][_local1][2]); _local1++; } _local2++; } } } } function drawGraph(x, y, z, ang) { var _local2; var _local1; var avx; var avy; var avz; var gcamer; var newdept; var _local3 = []; var curMatrix = rotMatrix(x, y, z, ang); _local2 = 0; while (_local2 <= mesh) { _local1 = 0; while (_local1 <= mesh) { board[(("patch_" + _local2) + "_") + _local1].clear(); _local1++; } _local2++; } drawAxes(x, y, z, ang); if (inpString.length > 0) { _local2 = 0; while (_local2 <= mesh) { _local3[_local2] = []; _local1 = 0; while (_local1 <= mesh) { pixArray[_local2][_local1] = matrixByVector(curMatrix, pixArray[_local2][_local1]); _local3[_local2][_local1] = projectPoint(pixArray[_local2][_local1]); _local1++; } _local2++; } _local2 = 0; while (_local2 < mesh) { _local1 = 0; while (_local1 < mesh) { if ((((((((((((funArray[_local2][_local1][1] <= ymax) && (funArray[_local2][_local1 + 1][1] <= ymax)) && (funArray[_local2 + 1][_local1][1] <= ymax)) && (funArray[_local2 + 1][_local1 + 1][1] <= ymax)) && (funArray[_local2][_local1][1] >= ymin)) && (funArray[_local2][_local1 + 1][1] >= ymin)) && (funArray[_local2 + 1][_local1][1] >= ymin)) && (funArray[_local2 + 1][_local1 + 1][1] >= ymin)) && (isLegal(funArray[_local2][_local1][1]))) && (isLegal(funArray[_local2][_local1 + 1][1]))) && (isLegal(funArray[_local2 + 1][_local1][1]))) && (isLegal(funArray[_local2 + 1][_local1 + 1][1]))) { if (showframe == "Show") { board[(("patch_" + _local2) + "_") + _local1].lineStyle(0, colo, 100); } board[(("patch_" + _local2) + "_") + _local1].moveTo(_local3[_local2][_local1][0], _local3[_local2][_local1][1]); board[(("patch_" + _local2) + "_") + _local1].beginFill(Kolory[_local2][_local1], 100); board[(("patch_" + _local2) + "_") + _local1].lineTo(_local3[_local2][_local1 + 1][0], _local3[_local2][_local1 + 1][1]); board[(("patch_" + _local2) + "_") + _local1].lineTo(_local3[_local2 + 1][_local1 + 1][0], _local3[_local2 + 1][_local1 + 1][1]); board[(("patch_" + _local2) + "_") + _local1].lineTo(_local3[_local2 + 1][_local1][0], _local3[_local2 + 1][_local1][1]); board[(("patch_" + _local2) + "_") + _local1].lineTo(_local3[_local2][_local1][0], _local3[_local2][_local1][1]); board[(("patch_" + _local2) + "_") + _local1].endFill(); avx = (((pixArray[_local2][_local1][0] + pixArray[_local2][_local1 + 1][0]) + pixArray[_local2 + 1][_local1 + 1][0]) + pixArray[_local2 + 1][_local1][0]) / 4; avy = (((pixArray[_local2][_local1][1] + pixArray[_local2][_local1 + 1][1]) + pixArray[_local2 + 1][_local1 + 1][1]) + pixArray[_local2 + 1][_local1][1]) / 4; avz = (((pixArray[_local2][_local1][2] + pixArray[_local2][_local1 + 1][2]) + pixArray[_local2 + 1][_local1 + 1][2]) + pixArray[_local2 + 1][_local1][2]) / 4; gcamer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(gcamer * 100); board[(("patch_" + _local2) + "_") + _local1].swapDepths(newdept); } _local1++; } _local2++; } } newy = matrixByVector(curMatrix, newy); } function prepAxes() { p1 = [-size, -size, -size]; p2 = [-size, size, -size]; p3 = [-size, size, size]; p4 = [size, size, size]; p5 = [size, size, -size]; p6 = [size, -size, -size]; p7 = [-size, -size, size]; p8 = [size, -size, size]; } function drawAxes(a, b, c, alpha) { function mag(m1, m2) { if (m1 >= m2) { return(-1); } if (m1 < m2) { return(1); } } var dp1; var _local3; var dp3; var dp4; var _local1; var avx; var avy; var avz; var camer; var newdept; var comMatrix = rotMatrix(a, b, c, alpha); _local1 = 1; while (_local1 <= 6) { this["mid" + _local1] = 0; _local1++; } var mids = []; var _local2 = []; _local1 = 1; while (_local1 <= 12) { board["side" + _local1].clear(); _local1++; } p1 = matrixByVector(comMatrix, p1); dp1 = projectPoint(p1); p2 = matrixByVector(comMatrix, p2); _local3 = projectPoint(p2); p3 = matrixByVector(comMatrix, p3); dp3 = projectPoint(p3); p4 = matrixByVector(comMatrix, p4); dp4 = projectPoint(p4); p5 = matrixByVector(comMatrix, p5); dp5 = projectPoint(p5); p6 = matrixByVector(comMatrix, p6); dp6 = projectPoint(p6); p7 = matrixByVector(comMatrix, p7); dp7 = projectPoint(p7); p8 = matrixByVector(comMatrix, p8); dp8 = projectPoint(p8); dispybox._x = ((_local3[0] + dp5[0]) / 2) + 181; dispybox._y = ((_local3[1] + dp5[1]) / 2) + 215; boxymin._x = (_local3[0] + (signum(_local3[0], dp5[0]) * 10)) + 181; boxymin._y = (_local3[1] + (signum(_local3[1], dp5[1]) * 15)) + 215; boxymax._x = (dp5[0] - (signum(_local3[0], dp5[0]) * 10)) + 181; boxymax._y = (dp5[1] - (signum(_local3[1], dp5[1]) * 10)) + 215; dispxbox._x = ((_local3[0] + dp3[0]) / 2) + 181; dispxbox._y = ((_local3[1] + dp3[1]) / 2) + 215; boxxmin._x = (_local3[0] + (signum(_local3[0], dp3[0]) * 10)) + 181; boxxmin._y = (_local3[1] + (signum(_local3[1], dp3[1]) * 10)) + 215; boxxmax._x = (dp3[0] - (signum(_local3[0], dp3[0]) * 10)) + 181; boxxmax._y = (dp3[1] - (signum(_local3[1], dp3[1]) * 10)) + 215; dispzbox._x = ((_local3[0] + dp1[0]) / 2) + 181; dispzbox._y = ((_local3[1] + dp1[1]) / 2) + 215; boxzmin._x = (_local3[0] + (signum(_local3[0], dp1[0]) * 10)) + 181; boxzmin._y = (_local3[1] + (signum(_local3[1], dp1[1]) * 20)) + 215; boxzmax._x = (dp1[0] - (signum(_local3[0], dp1[0]) * 10)) + 181; boxzmax._y = (dp1[1] - (signum(_local3[1], dp1[1]) * 10)) + 215; avx = (((p7[0] + p8[0]) + p3[0]) + p4[0]) / 4; avy = (((p7[1] + p8[1]) + p3[1]) + p4[1]) / 4; avz = (((p7[2] + p8[2]) + p3[2]) + p4[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid1 = newdept; avx = (((p8[0] + p6[0]) + p4[0]) + p5[0]) / 4; avy = (((p8[1] + p6[1]) + p4[1]) + p5[1]) / 4; avz = (((p8[2] + p6[2]) + p4[2]) + p5[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid2 = newdept; avx = (((p1[0] + p6[0]) + p2[0]) + p5[0]) / 4; avy = (((p1[1] + p6[1]) + p2[1]) + p5[1]) / 4; avz = (((p1[2] + p6[2]) + p2[2]) + p5[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid3 = newdept; avx = (((p1[0] + p2[0]) + p3[0]) + p7[0]) / 4; avy = (((p1[1] + p2[1]) + p3[1]) + p7[1]) / 4; avz = (((p1[2] + p2[2]) + p3[2]) + p7[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid4 = newdept; avx = (((p8[0] + p6[0]) + p1[0]) + p7[0]) / 4; avy = (((p8[1] + p6[1]) + p1[1]) + p7[1]) / 4; avz = (((p8[2] + p6[2]) + p1[2]) + p7[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid5 = newdept; avx = (((p2[0] + p3[0]) + p4[0]) + p5[0]) / 4; avy = (((p2[1] + p3[1]) + p4[1]) + p5[1]) / 4; avz = (((p2[2] + p3[2]) + p4[2]) + p5[2]) / 4; camer = Math.sqrt((Math.pow(avx, 2) + Math.pow(avy, 2)) + Math.pow(fLength - avz, 2)); newdept = 1000000 - Math.floor(camer * 100); this.mid6 = newdept; mids = [this.mid1, this.mid2, this.mid3, this.mid4, this.mid5, this.mid6]; mids.sort(mag); i = 1; while (i <= 6) { _local1 = 1; while (_local1 <= 6) { if (this["mid" + i] == mids[_local1 - 1]) { _local2[_local1 - 1] = "wall" + i; } _local1++; } i++; } index1 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall3") || (_local2[_local1] == "wall4")) { index1 = 1; } _local1++; } if (index1 == 1) { board.side1.swapDepths(1000001); } else { board.side1.swapDepths(1); } index2 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall4")) { index2 = 1; } _local1++; } if (index2 == 1) { board.side2.swapDepths(1000002); } else { board.side2.swapDepths(2); } index3 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall1")) { index3 = 1; } _local1++; } if (index3 == 1) { board.side3.swapDepths(1000003); } else { board.side3.swapDepths(3); } index4 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall2")) { index4 = 1; } _local1++; } if (index4 == 1) { board.side4.swapDepths(1000004); } else { board.side4.swapDepths(4); } index5 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall3")) { index5 = 1; } _local1++; } if (index5 == 1) { board.side5.swapDepths(1000005); } else { board.side5.swapDepths(5); } index6 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall2") || (_local2[_local1] == "wall3")) { index6 = 1; } _local1++; } if (index6 == 1) { board.side6.swapDepths(1000006); } else { board.side6.swapDepths(6); } index7 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall3")) { index7 = 1; } _local1++; } if (index7 == 1) { board.side7.swapDepths(1000007); } else { board.side7.swapDepths(7); } index8 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall4")) { index8 = 1; } _local1++; } if (index8 == 1) { board.side8.swapDepths(1000008); } else { board.side8.swapDepths(8); } index9 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall1")) { index9 = 1; } _local1++; } if (index9 == 1) { board.side9.swapDepths(1000009); } else { board.side9.swapDepths(9); } index10 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall2")) { index10 = 1; } _local1++; } if (index10 == 1) { board.side10.swapDepths(1000010); } else { board.side10.swapDepths(10); } index11 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall1") || (_local2[_local1] == "wall4")) { index11 = 1; } _local1++; } if (index11 == 1) { board.side11.swapDepths(1000011); } else { board.side11.swapDepths(11); } index12 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall1") || (_local2[_local1] == "wall2")) { index12 = 1; } _local1++; } if (index12 == 1) { board.side12.swapDepths(1000012); } else { board.side12.swapDepths(12); } _local1 = 1; while (_local1 <= 12) { board["side" + _local1].lineStyle(1, 13421772, 100); _local1++; } if (board.side1.getDepth() < 10) { dispzbox._visible = false; boxzmax._visible = false; boxzmin._visible = false; } else { dispzbox._visible = true; boxzmax._visible = true; boxzmin._visible = true; } if (board.side5.getDepth() < 10) { dispybox._visible = false; boxymin._visible = false; boxymax._visible = false; } else { dispybox._visible = true; boxymin._visible = true; boxymax._visible = true; } if (board.side2.getDepth() < 10) { dispxbox._visible = false; boxxmax._visible = false; boxxmin._visible = false; } else { dispxbox._visible = true; boxxmax._visible = true; boxxmin._visible = true; } board.side1.moveTo(dp1[0], dp1[1]); board.side1.lineTo(_local3[0], _local3[1]); board.side2.moveTo(_local3[0], _local3[1]); board.side2.lineTo(dp3[0], dp3[1]); board.side3.moveTo(dp3[0], dp3[1]); board.side3.lineTo(dp4[0], dp4[1]); board.side4.moveTo(dp4[0], dp4[1]); board.side4.lineTo(dp5[0], dp5[1]); board.side5.moveTo(dp5[0], dp5[1]); board.side5.lineTo(_local3[0], _local3[1]); board.side6.moveTo(dp5[0], dp5[1]); board.side6.lineTo(dp6[0], dp6[1]); board.side7.moveTo(dp6[0], dp6[1]); board.side7.lineTo(dp1[0], dp1[1]); board.side8.moveTo(dp1[0], dp1[1]); board.side8.lineTo(dp7[0], dp7[1]); board.side9.moveTo(dp7[0], dp7[1]); board.side9.lineTo(dp8[0], dp8[1]); board.side10.moveTo(dp8[0], dp8[1]); board.side10.lineTo(dp6[0], dp6[1]); board.side11.moveTo(dp7[0], dp7[1]); board.side11.lineTo(dp3[0], dp3[1]); board.side12.moveTo(dp8[0], dp8[1]); board.side12.lineTo(dp4[0], dp4[1]); } function xtoPix(xfun) { var _local1; _local1 = (2 * size) / (xmax - xmin); return(size - ((xmax - xfun) * _local1)); } function xtoFun(xpix) { var _local1; _local1 = (2 * size) / (xmax - xmin); return(xmax - ((size - xpix) / _local1)); } function ytoPix(yfun) { var _local1; _local1 = (2 * size) / (ymax - ymin); return(size - ((yfun - ymin) * _local1)); } function ytoFun(ypix) { var _local1; _local1 = (2 * size) / (ymax - ymin); return(ymin + ((size - ypix) / _local1)); } function ztoPix(zfun) { var _local1; _local1 = (2 * size) / (zmax - zmin); return(size - ((zmax - zfun) * _local1)); } function ztoFun(zpix) { var _local1; _local1 = (2 * size) / (zmax - zmin); return(zmax - ((size - zpix) / _local1)); } function projectPoint(point) { var _local2 = point; var _local1 = []; _local1[0] = (fLength / (fLength - _local2[2])) * _local2[0]; _local1[1] = (fLength / (fLength - _local2[2])) * _local2[1]; return(_local1); } function rotMatrix(x, y, z, theta) { var _local2 = z; var _local3 = y; var axLen; var _local1 = []; var radtheta = ((Math.PI/180) * theta); axLen = Math.sqrt(((x * x) + (_local3 * _local3)) + (_local2 * _local2)); _local1 = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; if (axLen > 0.0001) { x = x / axLen; _local3 = _local3 / axLen; _local2 = _local2 / axLen; cosT = Math.cos(radtheta); sinT = Math.sin(radtheta); diffT = 1 - cosT; _local1[0][0] = ((diffT * x) * x) + cosT; _local1[0][1] = ((diffT * x) * _local3) - (sinT * _local2); _local1[0][2] = ((diffT * x) * _local2) + (sinT * _local3); _local1[1][0] = ((diffT * x) * _local3) + (sinT * _local2); _local1[1][1] = ((diffT * _local3) * _local3) + cosT; _local1[1][2] = ((diffT * _local3) * _local2) - (sinT * x); _local1[2][0] = ((diffT * x) * _local2) - (sinT * _local3); _local1[2][1] = ((diffT * _local3) * _local2) + (sinT * x); _local1[2][2] = ((diffT * _local2) * _local2) + cosT; } return(_local1); } function matrixByVector(A, B) { var _local1 = B; var _local2 = A; C = []; C[0] = ((_local2[0][0] * _local1[0]) + (_local2[0][1] * _local1[1])) + (_local2[0][2] * _local1[2]); C[1] = ((_local2[1][0] * _local1[0]) + (_local2[1][1] * _local1[1])) + (_local2[1][2] * _local1[2]); C[2] = ((_local2[2][0] * _local1[0]) + (_local2[2][1] * _local1[1])) + (_local2[2][2] * _local1[2]); return(C); } function changeGrid() { var remmesh = mesh; var _local2; var _local1; var _local3; var testmesh; _local3 = 1; while (_local3 <= 12) { board["side" + _local3].removeMovieClip(); _local3++; } _local2 = 0; while (_local2 < remmesh) { _local1 = 0; while (_local1 < remmesh) { board[(("patch_" + _local2) + "_") + _local1].removeMovieClip(); _local1++; } _local2++; } testmesh = Number(smesh); if (notLegalValue(testmesh)) { testmesh = 15; smesh = "15"; } testmesh = Math.round(testmesh); smesh = String(testmesh); if (testmesh < 5) { testmesh = 5; smesh = "5"; } if (testmesh > 22) { testmesh = 22; smesh = "22"; } mesh = testmesh; iniClips(); setUpColors(mesh); procInput(); } var e = Math.E; var pi = Math.PI; var f1Array = ["sin", "cos", "tan", "ln", "sqrt", "abs", "acos", "asin", "atan", "ceil", "floor", "round"]; var f2Array = ["max", "min", "plus", "minus", "mul", "div", "pow"]; var fLength = 9000; var inpString = "x^2+y^2"; var sxmin = "-1"; var sxmax = "1"; var symin = "0"; var symax = "2"; var sentymin = "Auto"; var sentymax = "Auto"; var szmin = "-1"; var szmax = "1"; var xmin = -1; var xmax = 1; var ymin = 0; var ymax = 2; var zmin = -1; var zmax = 1; var pixArray = []; var funArray = []; var p1 = []; var p2 = []; var p3 = []; var p4 = []; var p5 = []; var p6 = []; var p7 = []; var p8 = []; var size = 100; var smesh = "15"; var mesh = 15; var newy = [0, 1, 0]; var outIsError = 0; var outErrorMes = ""; var compiledExpr = []; var x; var y; var Kolory = []; var dispy = "y"; var dispx = "x"; var dispz = "z"; var zmindisp = "zmin"; var zmaxdisp = "zmax"; var ymindisp = "ymin"; var ymaxdisp = "ymax"; var xmindisp = "xmin"; var xmaxdisp = "xmax"; var showframe = "Show"; var colorchoice = 1; var colo; var proc = "Processing..."; synexp._visible = false; processing._visible = false; setUpColors(mesh); inputbox.wordWrap = true; errorbox.wordWrap = true; inputbox.borderColor = 10027161 /* 0x990099 */; xminbox.wordWrap = true; xmaxbox.wordWrap = true; yminbox.wordWrap = true; ymaxbox.wordWrap = true; zminbox.wordWrap = true; zmaxbox.wordWrap = true; dispzminbox.wordWrap = true; dispzmaxbox.wordWrap = true; meshbox.wordWrap = true; errorbox._visible = false; iniClips(); procInput(); graphbut.onPress = function () { processing._visible = true; }; graphbut.onReleaseOutside = function () { processing._visible = false; }; graphbut.onRelease = function () { procInput(); processing._visible = false; }; resetbut.onPress = function () { processing._visible = true; }; resetbut.onReleaseOutside = function () { processing._visible = false; }; resetbut.onRelease = function () { reSet(); sentymin = "Auto"; sentymax = "Auto"; inpString = ""; sxmin = "-1"; sxmax = "1"; symin = "0"; symax = "2"; szmin = "-1"; szmax = "1"; xmin = -1; xmax = 1; ymin = 0; ymax = 2; zmin = -1; zmax = 1; smesh = "15"; changeGrid(); processing._visible = false; }; xup.onPress = function () { processing._visible = true; }; xup.onReleaseOutside = function () { processing._visible = false; }; xdown.onPress = function () { processing._visible = true; }; xdown.onReleaseOutside = function () { processing._visible = false; }; yleft.onPress = function () { processing._visible = true; }; yleft.onReleaseOutside = function () { processing._visible = false; }; yright.onPress = function () { processing._visible = true; }; yright.onReleaseOutside = function () { processing._visible = false; }; xup.onRelease = function () { drawGraph(1, 0, 0, 10); processing._visible = false; }; xdown.onRelease = function () { drawGraph(1, 0, 0, -10); processing._visible = false; }; yright.onRelease = function () { drawGraph(newy[0], newy[1], newy[2], 10); processing._visible = false; }; yleft.onRelease = function () { drawGraph(newy[0], newy[1], newy[2], -10); processing._visible = false; }; framebut.onPress = function () { processing._visible = true; }; framebut.onReleaseOutside = function () { processing._visible = false; }; framebut.onRelease = function () { if (showframe == "Show") { showframe = "Hide"; drawGraph(0, 0, 0, 0); processing._visible = false; } else { showframe = "Show"; drawGraph(0, 0, 0, 0); processing._visible = false; } }; color1.onPress = function () { processing._visible = true; }; color1.onReleaseOutside = function () { processing._visible = false; }; color2.onPress = function () { processing._visible = true; }; color2.onReleaseOutside = function () { processing._visible = false; }; color3.onPress = function () { processing._visible = true; }; color3.onReleaseOutside = function () { processing._visible = false; }; color4.onPress = function () { processing._visible = true; }; color4.onReleaseOutside = function () { processing._visible = false; }; color5.onPress = function () { processing._visible = true; }; color5.onReleaseOutside = function () { processing._visible = false; }; color6.onPress = function () { processing._visible = true; }; color6.onReleaseOutside = function () { processing._visible = false; }; color1.onRelease = function () { colorchoice = 1; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; color2.onRelease = function () { colorchoice = 2; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; color3.onRelease = function () { colorchoice = 3; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; color4.onRelease = function () { colorchoice = 4; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; color5.onRelease = function () { colorchoice = 5; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; color6.onRelease = function () { colorchoice = 6; setUpColors(mesh); drawGraph(0, 0, 0, 0); processing._visible = false; }; syntax.onRollOver = function () { synexp._visible = true; }; syntax.onRollOut = function () { synexp._visible = false; }; example1.onPress = function () { processing._visible = true; }; example1.onReleaseOutside = function () { processing._visible = false; }; example2.onPress = function () { processing._visible = true; }; example2.onReleaseOutside = function () { processing._visible = false; }; example3.onPress = function () { processing._visible = true; }; example3.onReleaseOutside = function () { processing._visible = false; }; example1.onRelease = function () { reSet(); sentymin = "Auto"; sentymax = "Auto"; inpString = "x^3-3*x+y^3-3*y"; sxmin = "-2"; sxmax = "2"; szmin = "-2"; szmax = "2"; procInput(); processing._visible = false; }; example2.onRelease = function () { reSet(); sentymin = "Auto"; sentymax = "Auto"; inpString = "sin(4*x*y)"; sxmin = "-1"; sxmax = "1"; szmin = "-1"; szmax = "1"; procInput(); processing._visible = false; }; example3.onRelease = function () { reSet(); sentymin = "Auto"; sentymax = "Auto"; inpString = "cos(x*y)*(x^2-y^2)"; sxmin = "-2"; sxmax = "2"; szmin = "-2"; szmax = "2"; procInput(); processing._visible = false; }; gridbut.onRelease = function () { changeGrid(); processing._visible = false; }; gridbut.onPress = function () { processing._visible = true; }; gridbut.onReleaseOutside = function () { processing._visible = false; };

Library Items

Symbol 1 GraphicUsed by:Timeline
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClipUses:2Used by:Timeline
Symbol 4 GraphicUsed by:Timeline
Symbol 5 GraphicUsed by:6
Symbol 6 ButtonUses:5Used by:Timeline
Symbol 7 GraphicUsed by:Timeline
Symbol 8 FontUsed by:9 10 11 12 13 14 15 16 17 18 19 20 25 28 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 48 50 53 55 56 57 58 59 60 62 63 77 82 86 87 89 93 95 97 99 100 103 104
Symbol 9 EditableTextUses:8Used by:Timeline
Symbol 10 EditableTextUses:8Used by:Timeline
Symbol 11 EditableTextUses:8Used by:Timeline
Symbol 12 EditableTextUses:8Used by:Timeline
Symbol 13 EditableTextUses:8Used by:Timeline
Symbol 14 EditableTextUses:8Used by:Timeline
Symbol 15 TextUses:8Used by:Timeline
Symbol 16 TextUses:8Used by:Timeline
Symbol 17 TextUses:8Used by:Timeline
Symbol 18 TextUses:8Used by:Timeline
Symbol 19 TextUses:8Used by:Timeline
Symbol 20 TextUses:8Used by:Timeline
Symbol 21 FontUsed by:22 23 39
Symbol 22 TextUses:21Used by:Timeline
Symbol 23 TextUses:21Used by:Timeline
Symbol 24 GraphicUsed by:29 61
Symbol 25 TextUses:8Used by:29
Symbol 26 GraphicUsed by:29 61
Symbol 27 GraphicUsed by:29 61
Symbol 28 TextUses:8Used by:29 61
Symbol 29 ButtonUses:24 25 26 27 28Used by:Timeline
Symbol 30 EditableTextUses:8Used by:Timeline
Symbol 31 TextUses:8Used by:Timeline
Symbol 32 TextUses:8Used by:Timeline
Symbol 33 TextUses:8Used by:Timeline
Symbol 34 EditableTextUses:8Used by:Timeline
Symbol 35 EditableTextUses:8Used by:Timeline
Symbol 36 TextUses:8Used by:Timeline
Symbol 37 TextUses:8Used by:Timeline
Symbol 38 TextUses:8Used by:Timeline
Symbol 39 TextUses:21Used by:Timeline
Symbol 40 EditableTextUses:8Used by:Timeline
Symbol 41 EditableTextUses:8Used by:Timeline
Symbol 42 EditableTextUses:8Used by:Timeline
Symbol 43 EditableTextUses:8Used by:Timeline
Symbol 44 EditableTextUses:8Used by:Timeline
Symbol 45 EditableTextUses:8Used by:Timeline
Symbol 46 TextUses:8Used by:Timeline
Symbol 47 GraphicUsed by:Timeline
Symbol 48 EditableTextUses:8Used by:Timeline
Symbol 49 GraphicUsed by:54
Symbol 50 TextUses:8Used by:54
Symbol 51 GraphicUsed by:54
Symbol 52 GraphicUsed by:54
Symbol 53 TextUses:8Used by:54 80
Symbol 54 ButtonUses:49 50 51 52 53Used by:Timeline
Symbol 55 TextUses:8Used by:Timeline
Symbol 56 EditableTextUses:8Used by:Timeline
Symbol 57 EditableTextUses:8Used by:Timeline
Symbol 58 EditableTextUses:8Used by:Timeline
Symbol 59 TextUses:8Used by:Timeline
Symbol 60 TextUses:8Used by:61
Symbol 61 ButtonUses:24 60 26 27 28Used by:Timeline
Symbol 62 EditableTextUses:8Used by:Timeline
Symbol 63 TextUses:8Used by:Timeline
Symbol 64 GraphicUsed by:65
Symbol 65 ButtonUses:64Used by:Timeline
Symbol 66 GraphicUsed by:67
Symbol 67 ButtonUses:66Used by:Timeline
Symbol 68 GraphicUsed by:69
Symbol 69 ButtonUses:68Used by:Timeline
Symbol 70 GraphicUsed by:71
Symbol 71 ButtonUses:70Used by:Timeline
Symbol 72 GraphicUsed by:73
Symbol 73 ButtonUses:72Used by:Timeline
Symbol 74 GraphicUsed by:75
Symbol 75 ButtonUses:74Used by:Timeline
Symbol 76 GraphicUsed by:80
Symbol 77 TextUses:8Used by:80
Symbol 78 GraphicUsed by:80
Symbol 79 GraphicUsed by:80
Symbol 80 ButtonUses:76 77 78 79 53Used by:Timeline
Symbol 81 GraphicUsed by:85
Symbol 82 TextUses:8Used by:85 88 90
Symbol 83 GraphicUsed by:85 88 90
Symbol 84 GraphicUsed by:85 88 90
Symbol 85 ButtonUses:81 82 83 84Used by:Timeline
Symbol 86 TextUses:8Used by:Timeline
Symbol 87 TextUses:8Used by:88
Symbol 88 ButtonUses:83 87 84 82Used by:Timeline
Symbol 89 TextUses:8Used by:90
Symbol 90 ButtonUses:83 89 84 82Used by:Timeline
Symbol 91 FontUsed by:92 101
Symbol 92 TextUses:91Used by:Timeline
Symbol 93 TextUses:8Used by:Timeline
Symbol 94 GraphicUsed by:98
Symbol 95 TextUses:8Used by:98
Symbol 96 GraphicUsed by:98
Symbol 97 TextUses:8Used by:98
Symbol 98 ButtonUses:94 95 96 97Used by:Timeline
Symbol 99 TextUses:8Used by:Timeline
Symbol 100 EditableTextUses:8Used by:Timeline
Symbol 101 EditableTextUses:91Used by:Timeline
Symbol 102 GraphicUsed by:105
Symbol 103 TextUses:8Used by:105
Symbol 104 TextUses:8Used by:105
Symbol 105 MovieClipUses:102 103 104Used by:Timeline

Instance Names

"board"Frame 1Symbol 3 MovieClip
"xup"Frame 1Symbol 6 Button
"xdown"Frame 1Symbol 6 Button
"yright"Frame 1Symbol 6 Button
"yleft"Frame 1Symbol 6 Button
"xminbox"Frame 1Symbol 9 EditableText
"xmaxbox"Frame 1Symbol 10 EditableText
"yminbox"Frame 1Symbol 11 EditableText
"ymaxbox"Frame 1Symbol 12 EditableText
"dispzminbox"Frame 1Symbol 13 EditableText
"dispzmaxbox"Frame 1Symbol 14 EditableText
"graphbut"Frame 1Symbol 29 Button
"inputbox"Frame 1Symbol 30 EditableText
"zminbox"Frame 1Symbol 34 EditableText
"zmaxbox"Frame 1Symbol 35 EditableText
"boxxmin"Frame 1Symbol 40 EditableText
"boxymin"Frame 1Symbol 41 EditableText
"boxymax"Frame 1Symbol 42 EditableText
"boxxmax"Frame 1Symbol 43 EditableText
"boxzmin"Frame 1Symbol 44 EditableText
"boxzmax"Frame 1Symbol 45 EditableText
"errorbox"Frame 1Symbol 48 EditableText
"resetbut"Frame 1Symbol 54 Button
"dispxbox"Frame 1Symbol 56 EditableText
"dispybox"Frame 1Symbol 57 EditableText
"dispzbox"Frame 1Symbol 58 EditableText
"framebut"Frame 1Symbol 61 Button
"color1"Frame 1Symbol 65 Button
"color2"Frame 1Symbol 67 Button
"color3"Frame 1Symbol 69 Button
"color4"Frame 1Symbol 71 Button
"color5"Frame 1Symbol 73 Button
"color6"Frame 1Symbol 75 Button
"syntax"Frame 1Symbol 80 Button
"example1"Frame 1Symbol 85 Button
"example2"Frame 1Symbol 88 Button
"example3"Frame 1Symbol 90 Button
"gridbut"Frame 1Symbol 98 Button
"meshbox"Frame 1Symbol 100 EditableText
"processing"Frame 1Symbol 101 EditableText
"synexp"Frame 1Symbol 105 MovieClip

Dynamic Text Variables

szminSymbol 9 EditableText""
szmaxSymbol 10 EditableText""
sxminSymbol 11 EditableText""
sxmaxSymbol 12 EditableText""
syminSymbol 13 EditableText""
symaxSymbol 14 EditableText""
inpStringSymbol 30 EditableText""
sentyminSymbol 34 EditableText""
sentymaxSymbol 35 EditableText""
xmindispSymbol 40 EditableText""
ymindispSymbol 41 EditableText""
ymaxdispSymbol 42 EditableText""
xmaxdispSymbol 43 EditableText""
zmindispSymbol 44 EditableText""
zmaxdispSymbol 45 EditableText""
outErrorMesSymbol 48 EditableText""
dispxSymbol 56 EditableText""
dispySymbol 57 EditableText""
dispzSymbol 58 EditableText""
showframeSymbol 62 EditableText""
smeshSymbol 100 EditableText""
procSymbol 101 EditableText""




http://swfchan.com/34/166718/info.shtml
Created: 18/10 -2018 17:44:04 Last modified: 18/10 -2018 17:44:04 Server time: 22/12 -2024 10:45:03