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

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

pcjun5finr.swf

This is the info page for
Flash #166719

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


Text
6

Examples

Problems

Click to enter:

Click a problem to display parametric
formulas in the x,y, z boxes.Try to
imagine the appearance of the
corresponding curve. Click GRAPH
to display the curve.

7

9

8

10

1

2

4

3

5

Problem 1

Problem 2

Problem 4

Problem 3

Problem 6

Problem 5

tmin=

tmax=

Parametric Curves in 3D

Copyright 2005  by Barbara Kaskosz

Click arrows to
rotate graph.

xmin=

xmax=

Enter the range for  t.  (Numerical entries and multiples of pi, e.g. 0.5*pi.)

zmin=

zmax=

= ymin

= ymax

y=

z=

x=

Enter formulas for x, y, and z in terms of a parameter t. Use
ordinary syntax. For example:

Displayed values for xmin, xmax , ymin, ymax, zmin, zmax are approximate.

t*sin(t^2+1)-t/8

Mouse over the SYNTAX button for rules and instructions.

Click button to turn scaling
constrained on or off:

After you enter or change any of  the
above settings, click GRAPH button:

GRAPH

START

Choose a color for your curve:

Note: Requires at least 800 MHz
especially with a higher number
of points.

To change number of points
(must be an integer between
100 and 300), type in the
new number and click the
POINTS button.

ON/OFF

RESET

POINTS

In the x, y, and z boxes enter parametric formulas for x, y, and
z in terms of a parameter t. Use the standard syntax. For
example:
t^3+2.7*sin(t^2+1)-cos(t)+t/8-e^(-t+1)
Your parameter must be t.  Always use parentheses around
functions' arguments, and * to denote multiplication. / denotes
division, ^ exponentiation.
Here is the list of functions  and constants that the plotter
recognizes:
--trigonometric functions:
sin( ), cos( ), tan ( ). For example: tan(pi*t/3)
The constant pi is entered as pi.
--inverse trigonometric functions:
asin( ), acos( ), atan ( ).
ln( ) stands for the natural logarithm.
e stands for the natural base.
Hence, the natural exponential is e^t. For example:
e^sin(t+t^3) , e^-t , e^(2-t)
Moreover you can enter:
sqrt( ) for the square root
abs( ) for the absolute value
max( , ) for the maximum of two entries, e.g. max(sin(t),0)

min( , ) for the minimum of two entires.
Also:
floor ( ) for the previous integer
ceil ( ) for the next integer
round( ) for the nearest integer.
The range boxes for t accept numerical entries and multiplies
of pi. For example, you can enter:
-2.34  or 2*pi or pi or -pi or 0.5*pi
but not 2*3 or pi/2 or pi*3 (unlike in the x, y, z boxes).

Click the scaling constrained Off/On button, to choose the
option you want. Scaling constrained on means that units on
each of the axis are going to be the same.  With scaling
constrained off, the plotter will choose units on each axis to
fit your plot exactly into the box. After you enter everything
and to change any of the options, click the GRAPH button.
You can change the number of points plotted along your
curve with the POINTS button, but remember that the more
points, the longer processing time.
The box in the lower right corner contains a few
preprogrammed examples and excercises.

Syntax and Instructions

SYNTAX

START

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 parseRange(str) { var _local1 = str; var front; var numfront; var back; var _local2; var _local3; _local1 = _local1.toLowerCase(); _local2 = _local1.indexOf("*"); if (_local2 == -1) { if (_local1 == "pi") { return(Math.PI); } if (_local1 == "-pi") { return(-3.14159265358979); } _local3 = Number(_local1); if (notLegalValue(_local3)) { outCallError("Check your t- range. Mulitples of pi must be entered as 0.5*pi and not pi/2 or pi*0.5."); return(0); } } else { front = _local1.substring(0, _local2); back = _local1.substring(_local2 + 1, _local1.length); numfront = Number(front); if (notLegalValue(numfront)) { outCallError("Check your t- range. Mulitples of pi must be entered as 0.5*pi and not pi/2 or pi*0.5."); return(0); } if (back != "pi") { outCallError("Check your t- range. Mulitples of pi must be entered as 0.5*pi and not pi/2 or pi*0.5."); return(0); } _local3 = numfront * Math.PI; } return(_local3); } function signum(a, b) { if ((b - a) > 0) { return(1); } if ((b - a) < 0) { return(-1); } return(0); } function prepReset() { var j; var k; outIsError = 0; outErrorMes = ""; errorbox._visible = false; pixArray = []; funArray = []; compiledExpr1 = []; compiledExpr2 = []; compiledExpr3 = []; 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; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; } function drawReset() { j = 0; while (j <= mesh) { board["patch_" + j].clear(); j++; } } function axesReset() { k = 1; while (k <= 12) { board["side" + k].clear(); k++; } } function procInput() { 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; _local1 = 1; while (_local1 <= 12) { board.createEmptyMovieClip("side" + _local1, _local1); _local1++; } _local2 = 0; while (_local2 < mesh) { board.createEmptyMovieClip("patch_" + _local2, _local2 + 14); _local2++; } } function funcToGraph(a) { var _local3; var _local2; var _local1; t = a; _local3 = doEval(compiledExpr1); _local2 = doEval(compiledExpr2); _local1 = doEval(compiledExpr3); return([_local3, _local2, _local1]); } 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; drawReset(); axesReset(); 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; sxmin = ""; sxmax = ""; symin = ""; symax = ""; szmin = ""; szmax = ""; } function prepGraph() { var i; var _local1; var curx; var _local3; var _local2; var curt; var lastymin; var lastymax; var lastxmin; var lastxmax; var lastzmin; var lastzmax; var ourarray1 = []; var ourarray2 = []; var ourarray3 = []; var inipo = []; prepReset(); tmin = parseRange(stmin); if (outIsError == 1) { } else { tmax = parseRange(stmax); if (outIsError == 1) { } else if (((tmax <= tmin) || (notLegalValue(tmax))) || (notLegalValue(tmin))) { outCallError("Check your t- range."); } else if (((inpString1.length == 0) || (inpString2.length == 0)) || (inpString3.length == 0)) { } else { outarray1 = doCompile(inpString1, ["t"]); if (outarray1[2] == 1) { outCallError("Error in formula for y. " + outarray1[1]); } else { compiledExpr1 = outarray1[0]; outarray2 = doCompile(inpString2, ["t"]); if (outarray2[2] == 1) { outCallError("Error in formula for z. " + outarray2[1]); } else { compiledExpr2 = outarray2[0]; outarray3 = doCompile(inpString3, ["t"]); if (outarray3[2] == 1) { outCallError("Error in formula for x. " + outarray3[1]); } else { compiledExpr3 = outarray3[0]; inipo = funcToGraph(tmin); lastymin = inipo[1]; lastymax = lastymin; lastxmin = inipo[0]; lastxmax = lastxmin; lastzmin = inipo[2]; lastzmax = lastzmin; _local1 = 0; while (_local1 <= mesh) { funArray[_local1] = []; curt = tmin + ((_local1 * (tmax - tmin)) / mesh); funArray[_local1] = funcToGraph(curt); curx = funArray[_local1][0]; _local3 = funArray[_local1][1]; _local2 = funArray[_local1][2]; 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; } if (notLegalValue(lastxmin)) { lastxmin = curx; } else if ((curx < lastxmin) && isLegal(curx)) { lastxmin = curx; } else { lastxmin = lastxmin + 0; } if (notLegalValue(lastxmax)) { lastxmax = curx; } else if ((curx > lastxmax) && isLegal(curx)) { lastxmax = curx; } else { lastxmax = lastxmax + 0; } if (notLegalValue(lastzmin)) { lastzmin = _local2; } else if ((_local2 < lastzmin) && isLegal(_local2)) { lastzmin = _local2; } else { lastzmin = lastzmin + 0; } if (notLegalValue(lastzmax)) { lastzmax = _local2; } else if ((_local2 > lastzmax) && isLegal(_local2)) { lastzmax = _local2; } else { lastzmax = lastzmax + 0; } _local1++; } ymin = lastymin; ymax = lastymax; zmin = lastzmin; zmax = lastzmax; xmin = lastxmin; xmax = lastxmax; if (((((notLegalValue(xmin) || (notLegalValue(xmax))) || (notLegalValue(ymin))) || (notLegalValue(ymax))) || (notLegalValue(zmin))) || (notLegalValue(zmax))) { outCallError("Your expressions have too many singularities is the range."); } else { 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); if (zmax == zmin) { zmax = zmax + 0.5; zmin = zmin + -0.5; } szmax = String(Math.round(zmax * 1000) / 1000); szmin = String(Math.round(zmin * 1000) / 1000); if (xmax == xmin) { xmax = xmax + 0.5; xmin = xmin + -0.5; } sxmax = String(Math.round(xmax * 1000) / 1000); sxmin = String(Math.round(xmin * 1000) / 1000); if (constr == "On") { maxLen = Math.max(zmax - zmin, Math.max(ymax - ymin, xmax - xmin)); sxmax = String(Math.round((((xmax + xmin) / 2) + (maxLen / 2)) * 1000) / 1000); sxmin = String(Math.round((((xmax + xmin) / 2) - (maxLen / 2)) * 1000) / 1000); symax = String(Math.round((((ymax + ymin) / 2) + (maxLen / 2)) * 1000) / 1000); symin = String(Math.round((((ymax + ymin) / 2) - (maxLen / 2)) * 1000) / 1000); szmax = String(Math.round((((zmax + zmin) / 2) + (maxLen / 2)) * 1000) / 1000); szmin = String(Math.round((((zmax + zmin) / 2) - (maxLen / 2)) * 1000) / 1000); } _local1 = 0; while (_local1 <= mesh) { pixArray[_local1] = []; pixArray[_local1][0] = xtoPix(funArray[_local1][0]); pixArray[_local1][1] = ytoPix(funArray[_local1][1]); pixArray[_local1][2] = ztoPix(funArray[_local1][2]); if ((isLegal(funArray[_local1][0]) && isLegal(funArray[_local1][1])) && isLegal(funArray[_local1][2])) { funArray[_local1] = [0]; } else { funArray[_local1] = [1]; } _local1++; } } } } } } } } function drawGraph(x, y, z, ang) { var _local1; var _local2 = []; var _local3 = rotMatrix(x, y, z, ang); drawReset(); if (outIsError == 1) { } else { drawAxes(x, y, z, ang); newy = matrixByVector(_local3, newy); if (((inpString1.length == 0) || (inpString2.length == 0)) || (inpString3.length == 0)) { } else { _local1 = 0; while (_local1 <= mesh) { _local2[_local1] = []; pixArray[_local1] = matrixByVector(_local3, pixArray[_local1]); _local2[_local1] = projectPoint(pixArray[_local1]); _local1++; } _local1 = 0; while (_local1 < mesh) { if ((funArray[_local1][0] + funArray[_local1 + 1][0]) == 0) { if (colorchoice == 1) { colo = 16711680 /* 0xFF0000 */; } else if (colorchoice == 2) { colo = 65280; } else if (colorchoice == 3) { colo = 6750207 /* 0x66FFFF */; } else { colo = 16776960 /* 0xFFFF00 */; } board["patch_" + _local1].lineStyle(1, colo, 100); board["patch_" + _local1].moveTo(_local2[_local1][0], _local2[_local1][1]); board["patch_" + _local1].lineTo(_local2[_local1 + 1][0], _local2[_local1 + 1][1]); } _local1++; } } } } 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 = []; axesReset(); 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) + 177; boxymin._x = (_local3[0] + (signum(_local3[0], dp5[0]) * 10)) + 181; boxymin._y = (_local3[1] + (signum(_local3[1], dp5[1]) * 15)) + 177; boxymax._x = (dp5[0] - (signum(_local3[0], dp5[0]) * 10)) + 181; boxymax._y = (dp5[1] - (signum(_local3[1], dp5[1]) * 10)) + 177; dispxbox._x = ((_local3[0] + dp3[0]) / 2) + 181; dispxbox._y = ((_local3[1] + dp3[1]) / 2) + 177; boxxmin._x = (_local3[0] + (signum(_local3[0], dp3[0]) * 10)) + 181; boxxmin._y = (_local3[1] + (signum(_local3[1], dp3[1]) * 10)) + 177; boxxmax._x = (dp3[0] - (signum(_local3[0], dp3[0]) * 10)) + 181; boxxmax._y = (dp3[1] - (signum(_local3[1], dp3[1]) * 10)) + 177; dispzbox._x = ((_local3[0] + dp1[0]) / 2) + 181; dispzbox._y = ((_local3[1] + dp1[1]) / 2) + 177; boxzmin._x = (_local3[0] + (signum(_local3[0], dp1[0]) * 10)) + 181; boxzmin._y = (_local3[1] + (signum(_local3[1], dp1[1]) * 20)) + 177; boxzmax._x = (dp1[0] - (signum(_local3[0], dp1[0]) * 10)) + 181; boxzmax._y = (dp1[1] - (signum(_local3[1], dp1[1]) * 10)) + 177; 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(1001); board.side1.lineStyle(1, 13421772, 100); } else { board.side1.swapDepths(1); board.side1.lineStyle(1, 6710886, 100); } index2 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall4")) { index2 = 1; } _local1++; } if (index2 == 1) { board.side2.swapDepths(1002); board.side2.lineStyle(1, 13421772, 100); } else { board.side2.swapDepths(2); board.side2.lineStyle(1, 6710886, 100); } index3 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall1")) { index3 = 1; } _local1++; } if (index3 == 1) { board.side3.swapDepths(1003); board.side3.lineStyle(1, 13421772, 100); } else { board.side3.swapDepths(3); board.side3.lineStyle(1, 6710886, 100); } index4 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall2")) { index4 = 1; } _local1++; } if (index4 == 1) { board.side4.swapDepths(1004); board.side4.lineStyle(1, 13421772, 100); } else { board.side4.swapDepths(4); board.side4.lineStyle(1, 6710886, 100); } index5 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall6") || (_local2[_local1] == "wall3")) { index5 = 1; } _local1++; } if (index5 == 1) { board.side5.swapDepths(1005); board.side5.lineStyle(1, 13421772, 100); } else { board.side5.swapDepths(5); board.side5.lineStyle(1, 6710886, 100); } index6 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall2") || (_local2[_local1] == "wall3")) { index6 = 1; } _local1++; } if (index6 == 1) { board.side6.swapDepths(1006); board.side6.lineStyle(1, 13421772, 100); } else { board.side6.swapDepths(6); board.side6.lineStyle(1, 6710886, 100); } index7 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall3")) { index7 = 1; } _local1++; } if (index7 == 1) { board.side7.swapDepths(1007); board.side7.lineStyle(1, 13421772, 100); } else { board.side7.swapDepths(7); board.side7.lineStyle(1, 6710886, 100); } index8 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall4")) { index8 = 1; } _local1++; } if (index8 == 1) { board.side8.swapDepths(1008); board.side8.lineStyle(1, 13421772, 100); } else { board.side8.swapDepths(8); board.side8.lineStyle(1, 6710886, 100); } index9 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall1")) { index9 = 1; } _local1++; } if (index9 == 1) { board.side9.swapDepths(1009); board.side9.lineStyle(1, 13421772, 100); } else { board.side9.swapDepths(9); board.side9.lineStyle(1, 6710886, 100); } index10 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall5") || (_local2[_local1] == "wall2")) { index10 = 1; } _local1++; } if (index10 == 1) { board.side10.swapDepths(1010); board.side10.lineStyle(1, 13421772, 100); } else { board.side10.swapDepths(10); board.side10.lineStyle(1, 6710886, 100); } index11 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall1") || (_local2[_local1] == "wall4")) { index11 = 1; } _local1++; } if (index11 == 1) { board.side11.swapDepths(1011); board.side11.lineStyle(1, 13421772, 100); } else { board.side11.swapDepths(11); board.side11.lineStyle(1, 6710886, 100); } index12 = 0; _local1 = 0; while (_local1 < 3) { if ((_local2[_local1] == "wall1") || (_local2[_local1] == "wall2")) { index12 = 1; } _local1++; } if (index12 == 1) { board.side12.swapDepths(1012); board.side12.lineStyle(1, 13421772, 100); } else { board.side12.swapDepths(12); board.side12.lineStyle(1, 6710886, 100); } 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 _local2; var _local1; if (constr == "On") { _local1 = (size * (xmax - xmin)) / maxLen; } else { _local1 = size; } _local2 = (2 * _local1) / (xmax - xmin); return(_local1 - ((xmax - xfun) * _local2)); } function ytoPix(yfun) { var _local2; var _local1; if (constr == "On") { _local1 = (size * (ymax - ymin)) / maxLen; } else { _local1 = size; } _local2 = (2 * _local1) / (ymax - ymin); return(_local1 - ((yfun - ymin) * _local2)); } function ztoPix(zfun) { var _local2; var _local1; if (constr == "On") { _local1 = (size * (zmax - zmin)) / maxLen; } else { _local1 = size; } _local2 = (2 * _local1) / (zmax - zmin); return(_local1 - ((zmax - zfun) * _local2)); } 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 axLen; var _local1 = []; var radtheta = ((Math.PI/180) * theta); var inx = x; var _local3 = y; var _local2 = z; axLen = Math.sqrt(((inx * inx) + (_local3 * _local3)) + (_local2 * _local2)); _local1 = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]; if (axLen > 0.0001) { inx = inx / axLen; _local3 = _local3 / axLen; _local2 = _local2 / axLen; cosT = Math.cos(radtheta); sinT = Math.sin(radtheta); diffT = 1 - cosT; _local1[0][0] = ((diffT * inx) * inx) + cosT; _local1[0][1] = ((diffT * inx) * _local3) - (sinT * _local2); _local1[0][2] = ((diffT * inx) * _local2) + (sinT * _local3); _local1[1][0] = ((diffT * inx) * _local3) + (sinT * _local2); _local1[1][1] = ((diffT * _local3) * _local3) + cosT; _local1[1][2] = ((diffT * _local3) * _local2) - (sinT * inx); _local1[2][0] = ((diffT * inx) * _local2) - (sinT * _local3); _local1[2][1] = ((diffT * _local3) * _local2) + (sinT * inx); _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; _local1 = 1; while (_local1 <= 12) { board["side" + _local1].removeMovieClip(); _local1++; } _local2 = 0; while (_local2 < remmesh) { board["patch_" + _local2].removeMovieClip(); _local2++; } _local3 = Number(smesh); if (notLegalValue(_local3)) { _local3 = 200; smesh = "200"; } _local3 = Math.round(_local3); smesh = String(_local3); if (_local3 < 10) { _local3 = 10; smesh = "10"; } if (_local3 > 300) { _local3 = 300; smesh = "300"; } mesh = _local3; iniClips(); 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 inpString1 = "sin(t)"; var inpString2 = "t"; var inpString3 = "cos(t)"; var xmin; var xmax; var ymin; var ymax; var zmin; var zmax; var tmin; var tmax; var stmin = "0"; var stmax = "10*pi"; var t; 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 = "200"; var mesh = 200; var newy = [0, 1, 0]; var outIsError = 0; var outErrorMes = ""; var compiledExpr1 = []; var compiledExpr2 = []; var compiledExpr3 = []; 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 colorchoice = 1; var colo = 16711680; var proc = "Processing..."; var maxLen; var constr = "Off"; synexp._visible = false; processing._visible = false; errorbox.wordWrap = true; inputbox1.wordWrap = true; inputbox1.borderColor = 26112; inputbox2.wordWrap = true; inputbox2.borderColor = 26112; inputbox3.wordWrap = true; inputbox3.borderColor = 26112; tminbox.wordWrap = true; tmaxbox.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 () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; colorchoice = 1; constr = "Off"; if (smesh != "200") { smesh = "200"; changeGrid(); } else { procInput(); } 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; }; 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; }; color1.onRelease = function () { colorchoice = 1; drawGraph(0, 0, 0, 0); processing._visible = false; }; color2.onRelease = function () { colorchoice = 2; drawGraph(0, 0, 0, 0); processing._visible = false; }; color3.onRelease = function () { colorchoice = 3; drawGraph(0, 0, 0, 0); processing._visible = false; }; color4.onRelease = function () { colorchoice = 4; 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; }; example4.onPress = function () { processing._visible = true; }; example4.onReleaseOutside = function () { processing._visible = false; }; example5.onPress = function () { processing._visible = true; }; example5.onReleaseOutside = function () { processing._visible = false; }; example6.onPress = function () { processing._visible = true; }; example6.onReleaseOutside = function () { processing._visible = false; }; example7.onPress = function () { processing._visible = true; }; example7.onReleaseOutside = function () { processing._visible = false; }; example8.onPress = function () { processing._visible = true; }; example8.onReleaseOutside = function () { processing._visible = false; }; example9.onPress = function () { processing._visible = true; }; example9.onReleaseOutside = function () { processing._visible = false; }; example10.onPress = function () { processing._visible = true; }; example10.onReleaseOutside = function () { processing._visible = false; }; example1.onRelease = function () { inpString3 = "3*cos(t)+cos(10*t)*cos(t)"; inpString1 = "3*sin(t)+cos(10*t)*sin(t)"; inpString2 = "sin(10*t)"; stmin = "0"; stmax = "2*pi"; constr = "On"; procInput(); processing._visible = false; }; example2.onRelease = function () { inpString3 = "t*cos(t)"; inpString1 = "t"; inpString2 = "t*cos(t)"; stmin = "0"; stmax = "10*pi"; constr = "On"; procInput(); processing._visible = false; }; example3.onRelease = function () { inpString3 = "5*cos(t)-cos(5*t)"; inpString1 = "5*sin(t)-sin(5*t)"; inpString2 = "t"; stmin = "0"; stmax = "4*pi"; constr = "Off"; procInput(); processing._visible = false; }; example4.onRelease = function () { inpString3 = "2*sin(3*t)*cos(t)"; inpString1 = "2*sin(3*t)*sin(t)"; inpString2 = "0"; stmin = "0"; stmax = "pi"; constr = "On"; procInput(); processing._visible = false; }; example5.onRelease = function () { inpString3 = "2*sin(3*t)*cos(t)"; inpString1 = "2*sin(3*t)*sin(t)"; inpString2 = "sin(3*t)"; stmin = "0"; stmax = "2*pi"; constr = "On"; procInput(); processing._visible = false; }; example6.onRelease = function () { inpString3 = "t*cos(t)"; inpString1 = "t*sin(t)"; inpString2 = "t"; stmin = "0"; stmax = "10*pi"; constr = "Off"; procInput(); processing._visible = false; }; example7.onRelease = function () { inpString3 = "sin(2*t)"; inpString1 = "cos(t)"; inpString2 = "t"; stmin = "0"; stmax = "4*pi"; constr = "Off"; procInput(); processing._visible = false; }; example8.onRelease = function () { inpString3 = "cos(t)"; inpString1 = "sin(t)"; inpString2 = "t"; stmin = "0"; stmax = "10*pi"; constr = "Off"; procInput(); processing._visible = false; }; example9.onRelease = function () { inpString3 = "t"; inpString1 = "0"; inpString2 = "t"; stmin = "-1"; stmax = "1"; constr = "Off"; procInput(); processing._visible = false; }; example10.onRelease = function () { inpString3 = "t"; inpString1 = "t*cos(t)"; inpString2 = "t*sin(t)"; stmin = "0"; stmax = "10*pi"; constr = "Off"; procInput(); processing._visible = false; }; gridbut.onRelease = function () { changeGrid(); processing._visible = false; }; gridbut.onPress = function () { processing._visible = true; }; gridbut.onReleaseOutside = function () { processing._visible = false; }; constrbut.onRelease = function () { if (constr == "On") { constr = "Off"; } else { constr = "On"; } }; problem1.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "t"; inpString1 = "t"; inpString2 = "t^3"; stmin = "-1"; stmax = "1"; constr = "Off"; processing._visible = false; }; problem2.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "cos(t)"; inpString1 = "sin(t)"; inpString2 = "0"; stmin = "0"; stmax = "2*pi"; constr = "On"; processing._visible = false; }; problem3.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "cos(t)"; inpString1 = "sin(t)"; inpString2 = "t^2"; stmin = "0"; stmax = "10*pi"; constr = "Off"; processing._visible = false; }; problem4.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "t*cos(t)"; inpString1 = "t*sin(t)"; inpString2 = "ln(t+1)"; stmin = "0"; stmax = "10*pi"; constr = "Off"; processing._visible = false; }; problem5.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "-t"; inpString1 = "t"; inpString2 = "t"; stmin = "-1"; stmax = "1"; constr = "On"; processing._visible = false; }; problem6.onRelease = function () { inpString1 = ""; inpString2 = ""; inpString3 = ""; tmin = 0; tmax = 1; stmin = "0"; stmax = "1"; sxmin = "-1"; sxmax = "1"; symin = "-1"; symax = "1"; szmin = "-1"; szmax = "1"; procInput(); inpString3 = "t"; inpString1 = "sin(t)"; inpString2 = "t"; stmin = "0"; stmax = "4*pi"; constr = "Off"; processing._visible = false; }; problem1.onPress = function () { processing._visible = true; }; problem1.onReleaseOutside = function () { processing._visible = false; }; problem2.onPress = function () { processing._visible = true; }; problem2.onReleaseOutside = function () { processing._visible = false; }; problem3.onPress = function () { processing._visible = true; }; problem3.onReleaseOutside = function () { processing._visible = false; }; problem4.onPress = function () { processing._visible = true; }; problem4.onReleaseOutside = function () { processing._visible = false; }; problem5.onPress = function () { processing._visible = true; }; problem5.onReleaseOutside = function () { processing._visible = false; }; problem6.onPress = function () { processing._visible = true; }; problem6.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 FontUsed by:5 6 7 8 9 10 11 12 13 44 45 60 61 62 63 64 65 66 67 68 78 81 84 87 99 102 104 112 113 117 120
Symbol 5 EditableTextUses:4Used by:Timeline
Symbol 6 EditableTextUses:4Used by:Timeline
Symbol 7 EditableTextUses:4Used by:Timeline
Symbol 8 EditableTextUses:4Used by:Timeline
Symbol 9 EditableTextUses:4Used by:Timeline
Symbol 10 EditableTextUses:4Used by:Timeline
Symbol 11 EditableTextUses:4Used by:Timeline
Symbol 12 EditableTextUses:4Used by:Timeline
Symbol 13 EditableTextUses:4Used by:Timeline
Symbol 14 GraphicUsed by:Timeline
Symbol 15 GraphicUsed by:Timeline
Symbol 16 FontUsed by:17 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 46 47 51 55 73 76 77 79 88
Symbol 17 TextUses:16Used by:Timeline
Symbol 18 FontUsed by:19 20
Symbol 19 TextUses:18Used by:Timeline
Symbol 20 TextUses:18Used by:Timeline
Symbol 21 TextUses:16Used by:Timeline
Symbol 22 TextUses:16Used by:Timeline
Symbol 23 TextUses:16Used by:Timeline
Symbol 24 TextUses:16Used by:Timeline
Symbol 25 TextUses:16Used by:Timeline
Symbol 26 TextUses:16Used by:Timeline
Symbol 27 TextUses:16Used by:Timeline
Symbol 28 TextUses:16Used by:Timeline
Symbol 29 TextUses:16Used by:Timeline
Symbol 30 TextUses:16Used by:Timeline
Symbol 31 TextUses:16Used by:Timeline
Symbol 32 TextUses:16Used by:Timeline
Symbol 33 TextUses:16Used by:Timeline
Symbol 34 TextUses:16Used by:Timeline
Symbol 35 TextUses:16Used by:Timeline
Symbol 36 TextUses:16Used by:Timeline
Symbol 37 TextUses:16Used by:Timeline
Symbol 38 GraphicUsed by:39
Symbol 39 ButtonUses:38Used by:Timeline
Symbol 40 GraphicUsed by:Timeline
Symbol 41 GraphicUsed by:42
Symbol 42 ButtonUses:41Used by:Timeline
Symbol 43 GraphicUsed by:Timeline
Symbol 44 EditableTextUses:4Used by:Timeline
Symbol 45 EditableTextUses:4Used by:Timeline
Symbol 46 TextUses:16Used by:Timeline
Symbol 47 TextUses:16Used by:Timeline
Symbol 48 FontUsed by:49 50
Symbol 49 TextUses:48Used by:Timeline
Symbol 50 TextUses:48Used by:Timeline
Symbol 51 TextUses:16Used by:Timeline
Symbol 52 FontUsed by:53 54 56 57 58 59 74 97 98
Symbol 53 TextUses:52Used by:Timeline
Symbol 54 TextUses:52Used by:Timeline
Symbol 55 TextUses:16Used by:Timeline
Symbol 56 TextUses:52Used by:Timeline
Symbol 57 TextUses:52Used by:Timeline
Symbol 58 TextUses:52Used by:Timeline
Symbol 59 TextUses:52Used by:Timeline
Symbol 60 EditableTextUses:4Used by:Timeline
Symbol 61 EditableTextUses:4Used by:Timeline
Symbol 62 EditableTextUses:4Used by:Timeline
Symbol 63 EditableTextUses:4Used by:Timeline
Symbol 64 EditableTextUses:4Used by:Timeline
Symbol 65 EditableTextUses:4Used by:Timeline
Symbol 66 EditableTextUses:4Used by:Timeline
Symbol 67 EditableTextUses:4Used by:Timeline
Symbol 68 EditableTextUses:4Used by:Timeline
Symbol 69 FontUsed by:70 71 72 75 107
Symbol 70 TextUses:69Used by:Timeline
Symbol 71 TextUses:69Used by:Timeline
Symbol 72 TextUses:69Used by:Timeline
Symbol 73 TextUses:16Used by:Timeline
Symbol 74 TextUses:52Used by:Timeline
Symbol 75 TextUses:69Used by:Timeline
Symbol 76 TextUses:16Used by:Timeline
Symbol 77 TextUses:16Used by:Timeline
Symbol 78 EditableTextUses:4Used by:Timeline
Symbol 79 TextUses:16Used by:Timeline
Symbol 80 GraphicUsed by:85 103 105
Symbol 81 TextUses:4Used by:85
Symbol 82 GraphicUsed by:85 103 105
Symbol 83 GraphicUsed by:85 103 105
Symbol 84 TextUses:4Used by:85 103 105
Symbol 85 ButtonUses:80 81 82 83 84Used by:Timeline
Symbol 86 GraphicUsed by:Timeline
Symbol 87 EditableTextUses:4Used by:Timeline
Symbol 88 TextUses:16Used by:Timeline
Symbol 89 GraphicUsed by:90
Symbol 90 ButtonUses:89Used by:Timeline
Symbol 91 GraphicUsed by:92
Symbol 92 ButtonUses:91Used by:Timeline
Symbol 93 GraphicUsed by:94
Symbol 94 ButtonUses:93Used by:Timeline
Symbol 95 GraphicUsed by:96
Symbol 96 ButtonUses:95Used by:Timeline
Symbol 97 TextUses:52Used by:Timeline
Symbol 98 TextUses:52Used by:Timeline
Symbol 99 EditableTextUses:4Used by:Timeline
Symbol 100 FontUsed by:101 114
Symbol 101 EditableTextUses:100Used by:Timeline
Symbol 102 TextUses:4Used by:103
Symbol 103 ButtonUses:80 102 82 83 84Used by:Timeline
Symbol 104 TextUses:4Used by:105
Symbol 105 ButtonUses:80 104 82 83 84Used by:Timeline
Symbol 106 GraphicUsed by:110
Symbol 107 TextUses:69Used by:110
Symbol 108 GraphicUsed by:110
Symbol 109 GraphicUsed by:110
Symbol 110 ButtonUses:106 107 108 109Used by:Timeline
Symbol 111 GraphicUsed by:115
Symbol 112 TextUses:4Used by:115
Symbol 113 TextUses:4Used by:115
Symbol 114 TextUses:100Used by:115
Symbol 115 MovieClipUses:111 112 113 114Used by:Timeline
Symbol 116 GraphicUsed by:121
Symbol 117 TextUses:4Used by:121
Symbol 118 GraphicUsed by:121
Symbol 119 GraphicUsed by:121
Symbol 120 TextUses:4Used by:121
Symbol 121 ButtonUses:116 117 118 119 120Used by:Timeline

Instance Names

"board"Frame 1Symbol 3 MovieClip
"boxxmin"Frame 1Symbol 5 EditableText
"boxymin"Frame 1Symbol 6 EditableText
"boxymax"Frame 1Symbol 7 EditableText
"boxxmax"Frame 1Symbol 8 EditableText
"boxzmin"Frame 1Symbol 9 EditableText
"dispxbox"Frame 1Symbol 10 EditableText
"dispybox"Frame 1Symbol 11 EditableText
"dispzbox"Frame 1Symbol 12 EditableText
"boxzmax"Frame 1Symbol 13 EditableText
"example1"Frame 1Symbol 39 Button
"example2"Frame 1Symbol 39 Button
"example3"Frame 1Symbol 39 Button
"example4"Frame 1Symbol 39 Button
"example5"Frame 1Symbol 39 Button
"example6"Frame 1Symbol 39 Button
"example7"Frame 1Symbol 39 Button
"example8"Frame 1Symbol 39 Button
"example9"Frame 1Symbol 39 Button
"example10"Frame 1Symbol 39 Button
"problem1"Frame 1Symbol 39 Button
"problem2"Frame 1Symbol 39 Button
"problem4"Frame 1Symbol 39 Button
"problem3"Frame 1Symbol 39 Button
"problem6"Frame 1Symbol 39 Button
"problem5"Frame 1Symbol 39 Button
"xup"Frame 1Symbol 42 Button
"xdown"Frame 1Symbol 42 Button
"yright"Frame 1Symbol 42 Button
"yleft"Frame 1Symbol 42 Button
"tminbox"Frame 1Symbol 44 EditableText
"tmaxbox"Frame 1Symbol 45 EditableText
"inputbox1"Frame 1Symbol 66 EditableText
"inputbox2"Frame 1Symbol 67 EditableText
"inputbox3"Frame 1Symbol 68 EditableText
"graphbut"Frame 1Symbol 85 Button
"errorbox"Frame 1Symbol 87 EditableText
"color1"Frame 1Symbol 90 Button
"color2"Frame 1Symbol 92 Button
"color3"Frame 1Symbol 94 Button
"color4"Frame 1Symbol 96 Button
"meshbox"Frame 1Symbol 99 EditableText
"processing"Frame 1Symbol 101 EditableText
"constrbut"Frame 1Symbol 103 Button
"resetbut"Frame 1Symbol 105 Button
"gridbut"Frame 1Symbol 110 Button
"synexp"Frame 1Symbol 115 MovieClip
"syntax"Frame 1Symbol 121 Button

Dynamic Text Variables

xmindispSymbol 5 EditableText""
ymindispSymbol 6 EditableText""
ymaxdispSymbol 7 EditableText""
xmaxdispSymbol 8 EditableText""
zmindispSymbol 9 EditableText""
dispxSymbol 10 EditableText""
dispySymbol 11 EditableText""
dispzSymbol 12 EditableText""
zmaxdispSymbol 13 EditableText""
stminSymbol 44 EditableText""
stmaxSymbol 45 EditableText""
szminSymbol 60 EditableText""
szmaxSymbol 61 EditableText""
sxminSymbol 62 EditableText""
sxmaxSymbol 63 EditableText""
syminSymbol 64 EditableText""
symaxSymbol 65 EditableText""
inpString1Symbol 66 EditableText""
inpString2Symbol 67 EditableText""
inpString3Symbol 68 EditableText""
constrSymbol 78 EditableText""
outErrorMesSymbol 87 EditableText""
smeshSymbol 99 EditableText""
procSymbol 101 EditableText""




http://swfchan.com/34/166719/info.shtml
Created: 18/10 -2018 17:43:46 Last modified: 18/10 -2018 17:43:46 Server time: 25/04 -2024 07:55:48