Navigation:  Menu Commands > Generate Menu >

X=f(T), Y=g(T) command

JR   Viewer

Print this Topic Previous pageReturn to chapter overviewNext page

Generates X,Y pairs from parametrical equations in which X and Y are both functions of a third independent parameter T. This command is useful for plotting curves in which Y cannot be expressed as a unique function of X. For example a circle may be plotted with X=cos(T), Y=sin(T). You might also find this command useful for generating unevenly-spaced data points. For example if you want your points to be evenly spaced on a logarithmic scale, you can use X=10^(T), Y=some function of (10^(T)).

Available operators are +, -, *, /, ^,>,<, and =. The inequality operators (>, <, and =)  result in 1.0 if the condition is true, 0.0 otherwise.

Function (sin, cos, etc.) arguments must be in parentheses. See the list of available functions.

You can use placeholder codes for certain data parameters. For example “$YMAX(2)” will be replaced with the maximum Y value of the second curve. For more information on placeholder codes click here.

You can create conditional equations with the if function. The if function takes the form if(test,if_true,if_false), where test is the condition you want to check, if_true is the value the equation takes if test is true, and if_false is the value taken if test is false. For example, "if t > 5 then y=t^2, otherwise y=(10-t)^2" can be expressed with if(t<5,t^2,(10-t)^2).

By default, angular input values are in radians. You can set angles to degrees by clicking the degrees option button.

DPlot will automatically substitute the value of pi (3.141592653589793...) for "PI", "pi", or "Pi"

NOTE: Be specific. DPlot does not interpret "2T" as "2*T".

Example:

With radians selected,

X=sin(2*T)

Y=sin(3*T)

from T=0 to 6.28 results in:

This command makes use of the RunicSoft Function Parser from Andreas Hartl (FParser.dll in the DPlot folder).

Prevent divide by zero errors
If this box is unchecked, DPlot will trap divide by zero errors, report the value of T where the error occurred, and will not generate a curve. If this box is checked, when DPlot traps a divide by zero it will shift T by a very small number and attempt the calculation again. This feature might be useful for generating curves of certain functions that would normally fail at specific values of T.

 

 


Page url: http://www.dplot.com/help/index.htm?helpid_f_of_t.htm