Function Analyzer
Copyright 1999, Konstantin Tretyakov (kt_ee@hotmail.com)
http://smartsite.cjb.net
------------------------------------------------------
You may use this code for free if you give me credit.
If you modify it or make your own program with it,
I would VERY APPRECIATE, if you mailed it to me.
On the whole - just do not stamp your name on what you haven't
done quite alone.
------------------------------------------------------
This project was my last one in VB :(, 'cause I switched
to Delphi :) later (the date is 24.6.1999).
I rewrote it in Delphi and I found
quite a lot of 'undocumented features' (bugs :-) in it and many 
ways to improve it.
I must confess, I was too lazy to correct this old file,
because these bugs are not very BIG and quite easy to remove.
Anyway, this code still seems to me rather unique and excellent (I'm proud of me ;-)

Maybe you will be interested in how you can improve it?
Well, you can: 
1) Improve this stupid syntax error checking!
2) Add more functions
3) Make support for string functions (like MsgBox:) and for functions 
with different number of arguments.
4) Make support for variables and constants
  (I mean there must be some Sub like 'SetVariable(VarName as String,Value as Double)' 
5) Many more..

All these improvements will take you about several
 hours, and then just use your imagination:
  for example: create your own script language :)
 
__________________________________________________
Yours Sincerely, Konstantin Tretyakov (kt_ee@hotmail.com)

PS. Maybe this Function Analyzer is too slow, then I should
mention, that, written in Delphi, it works ~15 times faster.





	Readme File for Function Analyzer
------------------------------------------------

************************************************
     Function Analyzer, Pre-Release Version

	Copyright  1999
		Konstantin Tretyakov
		Fishel Mark
	All Rights Reserved
************************************************

The Program is designed to analyse function graphs
and tangents to them.

The program requires:
	a high-speed CPU
	Windows 95, 98, NT
	MSVBVM50.dll
	COMDLG32.OCX
	"Arial" Font Installed
	Screen resolution of at least 800x600

----------------How to work----------------------
Enter the function formula in the text box to the
 right of the Y letter (press Alt+Y to switch to 
this text box).
Press "Draw Graph" (or press
Alt+D or press ENTER).
Wait until the Red "WAIT" word disappears

There is another Text box Labeled "X="
IT IS MADE ONLY FOR SOME ADVANCED USERS WHO
UNDERSTAND HOW DOES IT WORK, THE REST SHOULD
JUST LEAVE "K" IN IT.
if you wish to draw a function you should leave 
only "K" in it.
But in fact you may draw some interesting curves 
thanks to this box.
In the "X" text box you may use not only the X
variable but also a previously calculated "Y" 

How does it work ?:
the program runs the variable named K from the
left X coordinate of the screen to the right
(it depends on the Zoom). Then it Calculates
the Y using the expression given in the "Y"
Text Box and then calculates "X" variable
and sets a poin on the screen at 
coordinates (X,Y)
Example:
	Y=Sin(K)
	X=Cos(K) - will draw a circle
--------------------------------------------------
The formula may contain:
	-Numbers, both point and comma are 
		recognized as a decimal separator
	-Operation signs (+, -, *, /, ^) and 
			brackets -  '(' and ')'
	-Functions (ABS, ATN, COS, EXP, FIX, INT,
		    LOG, RND, SGN, SIN, SQR, TAN,
		    SEC, COSEC, COTAN, ARCSIN,
		    ARCCOS, ARCSEC, ARCCOSEC,
		    ARCCOTAN, HSIN, HCOS, HTAN,
		    HSEC, HCOSEC, HCOTAN, HARCSIN
		    HARCCOS, HARCTAN, HARCSEC,
		    HARCCOSEC, HARCCOTAN
		    TIMER, YEAR, MONTH, DAY, HOUR,
		    MINUTE, SECOND, PI, E)
	 a function must be followed by a bracketed 
	expression (example - Sin(2^3*k))
	WARNING: EVEN IF A FUNCTION DOESN'T NEED ANY
	ARGUMENT (These are:  TIMER, YEAR, MONTH, 
		DAY, HOUR, MINUTE, SECOND, PI, E)
	YOU MUST SPECIFY A BRACKETED EXPRESSION AFTER
	IT (for example Zero: PI(0))
	-the A letter for the argument
	 and the Y letter in the second
	 text box for the previously calculated Y


Examples (when the second text box contains "X"):
	K^2   	- will draw a parabol
	Sin(K)	- will draw a sinusoid
	10*Rnd(10) - will draw your heartbeat graph
		when you understand how cool the 
		program is.
	Abs(K)^(Sin(K)+Rnd(K)) - will draw something
					 	else

Operation Priority
	1) Bracketed Expressions
	2) Functions
	3) Raising to Power Operations (^)
	4) Multiplication and Division (*,/)
	5) Addition and Subtraction (+,-)

WARNING: the program will not calculate the 
	expressions of a kind - X^Y^Z, you must 
	specify brackets (for example X^(Y^Z) )
THE FUNCTION EXPRESSION YOU ENTER IN THE TEXT BOX
IS NOT CASE-SENSITIVE (there is no difference whether
you type SIN or sIn, K or k)

----------------Drawing the Tangent-------------------
When the function is drawn, press and hold the LEFT 
mouse button over some place of the function: 
the program will draw a tangent to the last drawn 
function at the specified X-coordinate.
The tangent will disappear when you release the
button
WARNING: the tangent may ONLY be drawn to FUNCTION
GRAPHS, that is when
Y=F(K)
X=K	,i.e. X is not modified and each X references
	only one Y

------Changing the Base of the Coordinate system-------
You may change the Centre of the Coordinate system by
Right-Clicking with a mouse in the desired place.
----------------Changing the Settings------------------
Colors:
	You may change the colors by choosing
		Settings|Colors
Zoom:
	You may change the Magnification Factor
	by Choosing Setting|Zoom and entering
	a valid number in the range [1 - 1000]
	The more is the number, the larger are
	the grid cells
-------------------Saving the Picture------------------
You may save your current picture on the output by
choosing FILE|Save as Bitmap...
_______________________________________________________
_______________________________________________________
_______________________________________________________
Neither the Readme file nor the program are to be 
modified without the explicit permission of the authors
_______________________________________________________
<_________________ReadMe.TXT END______________________>