summaryrefslogtreecommitdiffstats
path: root/share/extensions/param_curves.inx
blob: 85f7c32e805ecaf545eeb2daca527e1ef232ae36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
    <name>Parametric Curves</name>
    <id>org.inkscape.effect.param_curves</id>
    <param name="tab" type="notebook">
        <page name="sampling"  gui-text="Range and Sampling">
            <param name="t_start"  type="float" min="-1000.0" max="1000.0" gui-text="Start t-value:">0.0</param>
            <param name="t_end"    type="float" min="-1000.0" max="1000.0" gui-text="End t-value:">1.0</param>
            <param name="times2pi" type="bool"                          gui-text="Multiply t-range by 2*pi">true</param>
            <param name="xleft"    type="float" min="-1000.0" max="1000.0" gui-text="X-value of rectangle's left:">-1.0</param>
            <param name="xright"   type="float" min="-1000.0" max="1000.0" gui-text="X-value of rectangle's right:">1.0</param>
            <param name="ybottom"  type="float" min="-1000.0" max="1000.0" gui-text="Y-value of rectangle's bottom:">-1.0</param>
            <param name="ytop"     type="float" min="-1000.0" max="1000.0" gui-text="Y-value of rectangle's top:">1.0</param>
            <param name="samples"  type="int"   min="2"       max="1000"   gui-text="Samples:">30</param>
            <param name="isoscale" type="bool" gui-text="Isotropic scaling">false</param>
            <label>When set, Isotropic scaling uses smallest of width/xrange or height/yrange</label>
        </page>
        <page name="use" gui-text="Use">
            <label xml:space="preserve">Select a rectangle before calling the extension, it will determine X and Y scales.
First derivatives are always determined numerically.</label>
        </page>
        <page name="desc" gui-text="Functions">
            <label>Standard Python math functions are available:</label>
            <label xml:space="preserve" translatable="no">
ceil(x); copysign(x, y); fabs(x); floor(x); fmod(x,y); frexp(x); ldexp(x,i); modf(x); remainder(x, y); trunc(x); 

exp(x); expm1(x); log(x [, base]); log1p(x); log2(x); log10(x); pow(x,y); sqrt(x); 

cos(x); sin(x); tan(x); acos(x); asin(x); atan(x); atan2(y,x); dist(p, q); hypot(x,y); 

degrees(x); radians(x); 

cosh(x); sinh(x); tanh(x); acosh(x); asinh(x); atanh(x);

erf(x); erfc(x); gamma(x); lgamma(x).
            </label>
            <label>The constants pi, e and tau are also available.</label>

            <label>Functions from the random library may also be used, 
            eg. random(); randint(a, b); uniform(a, b).</label>
        </page>
        <page name="Help" gui-text="Help">
            <label>This extension creates a parametric plot of a vector valued function (in variable t).</label>
            
            <label>In order to use the extension, select a rectangle first. The rectangle will serve as bounding box of the plot.</label>
        </page>
    </param>
    <param name="fofx"     type="string"  gui-text="X-Function:">cos(3*t)</param>
    <param name="fofy"     type="string"  gui-text="Y-Function:">sin(5*t)</param>
    <param name="remove"   type="bool" gui-text="Remove rectangle">true</param>
    <param name="drawaxis" type="bool" gui-text="Draw Axes">false</param>
    <effect>
        <object-type>rect</object-type>
        <effects-menu>
            <submenu name="Render"/>
        </effects-menu>
    </effect>
    <script>
        <command location="inx" interpreter="python">param_curves.py</command>
    </script>
</inkscape-extension>