95,06,13,23,44
Javascript support the following math functions
[[
Math.E 2.718281828459045091 Euler's constant
Math.LN2 0.6931471805599452862 Natural log of 2
Math.LN10 2.302585092994045901 Natural log of 10
Math.LOG2E 1.442695040888963387 Log base-2 of E
Math.LOG10E 0.4342944819032518167 Log base-10 of E
Math.PI 3.141592653589793116 PI
Math.SQRT1_2 0.7071067811865475 Square root of 0.5
Math.SQRT2 1.414213562373095145 Square root of 2
Math.random() method takes no parameters
Math.abs(val) Absolute value of val
Math.acos(val) Arc cosine (in radians) of val
Math.asin(val) Arc sine (in radians) of val
Math.atan(val) Arc tangent (in radians) of val
Math.atan2(val1, val2) Angle of polar coordinates
Math.ceil(val) Next integer greater than or equal
Math.cos(val) Cosine of val
Math.exp(val) Euler's constant to the power of val
Math.floor(val) Next integer less than or equal to
Math.log(val) Natural logarithm (base e) of val
Math.max(val1, val2) The greater of val1 or val2
Math.min(val1, val2) The lesser of val1 or val2
Math.pow(val1, val2) Val1 to the val2 power
Math.random() Random number between 0 and 1
Math.round(val) N+1 when val >= n.5; otherwise N
Math.sin(val) Sine (in radians) of val
Math.sqrt(val) Square root of val
Math.tan(val) Tangent (in radians) of val
]]
for
hyperbolic cosine, use
0.5*(Math.exp(x)+Math.exp(-x))
hyperbolic sine, use
0.5*(Math.exp(x)-Math.exp(-x))
Step function: stepf(a,b)
If a<b return 0 (close)
otherwise return 1 (open)
Any number multiply by 0 get 0
that is to close.
Any number multiply by 1 get itself
that is to open.
Above is to multiply stepf()
If add or subtract stepf() then it
is shift curve up/down.
One of a,b must be variable. If
both a and b are constant, then
stepf() has no meaning. 9507211227
Gamma function gamma(t)
If t is an integer gamma(t) is (t-1)!
gamma(t) let factorial become
continuous.
gamma(t) is searched from Internet.
9507211232
2006-06-23-12-41 start
This program is received on 2006-06-12
2006-06-12-18-14
http://www.bigwebmaster.com/3051.html
2006-06-12-18-21
http://www.structura.info/XYGraph/XYGraph.zip
=====
2006-10-23-09-08 start
Start from 2006-10-17 write this program.
Its URL is
http://freeman2.com/graph09e.htm
This file has same source as previous
http://freeman2.com/graph03e.htm
Both from XYGraph v2.3
http://www.structura.info/XYGraph/XYGraphDemo.htm
Freeman take their source code write a
better version.
graph03e.htm is mainly introduction
All graph use one drawing board.
graph09e.htm is for application. Each
graph has its own drawing board.
"has its own drawing board" is Freeman's
need. This function allow user to draw
multiple graph in one web page. Now
upload this program to Internet let
everyone use. Please click "Draw 606"
to see how to use.
graph09e.htm can dynamically create input
form and also one more change
graph03e.htm must use "Math.cos(t)"
Where "Math." can not drop.
graph09e.htm allow to use cos(t)
"Math." can be dropped.
Because graph09e.htm add
[[
9510222211 use 'with(Math){' and '}'
]]
graph03e.htm follow XYGraph v2.3
must use "Math."
graph09e.htm modified by Freeman
no need to use "Math."
graph09e.htm still has limitation.
Curve allow maximum 5.
Arrow allow maximum 1.
Label allow maximum 1.
Equation can not be modified
Especially equation constant and
number of terms.
graph03e.htm allow variable constant
'a', 'b' to have five
different values. (one
equation family five
members)
graph09e.htm broader this property to
five arbitrary functions.
If you need function exceed above
limitation, you must write code for it.
Examples can be found at
http://freeman2.com/graph03e.htm
find function Calculate0(PlotID){.....}
five examples.
Expect graph09e.htm will be used in
http://freeman2.com/tutc0004.htm
This is Freeman's tutor page in Chinese.
Welcome visit Freeman site often.
Freeman 2006-10-24-18-01
=====
9510242029
Out side of table [Draw 601] button
and inside of table [Draw] button
are different. They both draw curve,
but
[Draw 601] button create input form
NOT open input form. carry out
plot curve, then close form to
save system resources.
[Draw] button NOT create input form
because already exist. Carry
out plot curve, then let form
remain open.
Out side of table [Wipe 601] button
delete both graph and input form.
Inside of table [Wipe] button delete
graph only.
9510242039
9510251736
If you want drop arrow temporary.
click "delArrow" delete ALL arrow
data, then no arrow drawn. But
if you want to reuse arrow, you
have to fill back all arrow data.
If you clear "arrow x" box, then
no arrow drawn, reuse arrow is
much simpler. All data (but one)
are in place.
Clear "label x" box is same for
label.
9510251740
9510281051
2006-10-28-10-51 start
One caution:
If you input
function 1 x(t) [ sin(x) ]
this equation look like
x(t) = sin(x)
This is confuse, because left hand side
independent variable is 't' [x(t)]
right hand side independent variable is
x [sin(x)]
This different variable 'equation' has
no meaning.
graph09e.htm use 't' as independent
variable. In many case x=t identically
graph09e.htm convert 'x' to 't' let
user free to use y(x) = 2*sin(x+3.14)
Please be understand that
x(t) = sin(x)
has no meaning,
and
x = sin(x)
is to find solution, NOT to plot curve.
To find solution of
x = sin(x)
please construct
x(t) = t
y(t) = t
and
x(t) = t
y(t) = sin(t)
input the following
function 1 x(t) t
function 1 y(t) t
function 2 x(t) t
function 2 y(t) sin(t)
One point is common to both red and
blue lines, that is solution at (0,0)
*** Please use 't' as independent
*** variable
*** 'x' behave as if it were 't'
*** side effect
*** x(t) = sin(x)
*** has no meaning.
2006-10-28-11-05 stop
9510281105
|