summaryrefslogtreecommitdiffstats
path: root/kig/macros
diff options
context:
space:
mode:
Diffstat (limited to 'kig/macros')
-rw-r--r--kig/macros/Makefile.am11
-rw-r--r--kig/macros/circle_by_center_and_line.kigt31
-rw-r--r--kig/macros/circle_by_point_and_diameter.kigt36
-rw-r--r--kig/macros/circle_by_point_and_segment.kigt26
-rw-r--r--kig/macros/equitriangle.kigt32
-rw-r--r--kig/macros/evolute.kigt28
-rw-r--r--kig/macros/osculating_circle.kigt27
-rw-r--r--kig/macros/segment_axis.kigt25
-rw-r--r--kig/macros/square.kigt44
-rw-r--r--kig/macros/vector_difference.kigt31
10 files changed, 291 insertions, 0 deletions
diff --git a/kig/macros/Makefile.am b/kig/macros/Makefile.am
new file mode 100644
index 00000000..f03caaa0
--- /dev/null
+++ b/kig/macros/Makefile.am
@@ -0,0 +1,11 @@
+builtinmacrodir = $(kde_datadir)/kig/builtin-macros
+builtinmacro_DATA = \
+ circle_by_center_and_line.kigt \
+ circle_by_point_and_diameter.kigt \
+ circle_by_point_and_segment.kigt \
+ equitriangle.kigt \
+ evolute.kigt \
+ osculating_circle.kigt \
+ segment_axis.kigt \
+ square.kigt \
+ vector_difference.kigt
diff --git a/kig/macros/circle_by_center_and_line.kigt b/kig/macros/circle_by_center_and_line.kigt
new file mode 100644
index 00000000..2a02210a
--- /dev/null
+++ b/kig/macros/circle_by_center_and_line.kigt
@@ -0,0 +1,31 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.7.1" >
+ <Macro>
+ <Name>Circle by Center &amp;&amp; Line</Name>
+ <Description>A circle constructed by its center and tangent to a given line</Description>
+ <ActionName>objects_new_circlebcl</ActionName>
+ <IconFileName>circlebcl</IconFileName>
+ <Construction>
+ <input requirement="line" id="1">
+ <UseText>Construct a circle tangent to this line</UseText>
+ <SelectStatement>Select the line that the new circle should be tangent to...</SelectStatement>
+ </input>
+ <input requirement="point" id="2">
+ <UseText>Construct a circle with this center</UseText>
+ <SelectStatement>Select the center of the new circle...</SelectStatement>
+ </input>
+ <intermediate action="calc" type="LinePerpend" id="3" >
+ <arg>1</arg>
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="calc" type="LineLineIntersection" id="4" >
+ <arg>1</arg>
+ <arg>3</arg>
+ </intermediate>
+ <result action="calc" type="CircleBCP" id="5" >
+ <arg>2</arg>
+ <arg>4</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/circle_by_point_and_diameter.kigt b/kig/macros/circle_by_point_and_diameter.kigt
new file mode 100644
index 00000000..afe73a61
--- /dev/null
+++ b/kig/macros/circle_by_point_and_diameter.kigt
@@ -0,0 +1,36 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Circle by Point &amp;&amp; Segment (as the Diameter)</Name>
+ <Description>A circle defined by its center and the length of a segment as the diameter</Description>
+ <ActionName>objects_new_circlebpd</ActionName>
+ <IconFileName>circlebpd</IconFileName>
+ <Construction>
+ <input requirement="point" id="1">
+ <UseText>Construct a circle with this center</UseText>
+ <SelectStatement>Select the center of the new circle...</SelectStatement>
+ </input>
+ <input requirement="segment" id="2">
+ <UseText>Construct a circle with the diameter given by the length of this segment</UseText>
+ <SelectStatement>Select the segment whose length gives the diameter of the new circle...</SelectStatement>
+ </input>
+ <intermediate action="fetch-property" property="end-point-A" id="3" >
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="fetch-property" property="mid-point" id="4" >
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="calc" type="SegmentAB" id="5" >
+ <arg>3</arg>
+ <arg>4</arg>
+ </intermediate>
+ <intermediate action="fetch-property" property="length" id="6" >
+ <arg>5</arg>
+ </intermediate>
+ <result action="calc" type="CircleBPR" id="7" >
+ <arg>1</arg>
+ <arg>6</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/circle_by_point_and_segment.kigt b/kig/macros/circle_by_point_and_segment.kigt
new file mode 100644
index 00000000..2f72eeb6
--- /dev/null
+++ b/kig/macros/circle_by_point_and_segment.kigt
@@ -0,0 +1,26 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.4.0" >
+ <Macro>
+ <Name>Circle by Point &amp;&amp; Segment (as the Radius)</Name>
+ <Description>A circle defined by its center and the length of a segment as the radius</Description>
+ <ActionName>objects_new_circlebps</ActionName>
+ <IconFileName>circlebps</IconFileName>
+ <Construction>
+ <input requirement="point" id="1">
+ <UseText>Construct a circle with this center</UseText>
+ <SelectStatement>Select the center of the new circle...</SelectStatement>
+ </input>
+ <input requirement="segment" id="2">
+ <UseText>Construct a circle with the radius given by the length of this segment</UseText>
+ <SelectStatement>Select the segment whose length gives the radius of the new circle...</SelectStatement>
+ </input>
+ <intermediate action="fetch-property" property="length" id="3" >
+ <arg>2</arg>
+ </intermediate>
+ <result action="calc" type="CircleBPR" id="4" >
+ <arg>1</arg>
+ <arg>3</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/equitriangle.kigt b/kig/macros/equitriangle.kigt
new file mode 100644
index 00000000..efbb702b
--- /dev/null
+++ b/kig/macros/equitriangle.kigt
@@ -0,0 +1,32 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Equilateral Triangle</Name>
+ <Description>Equilateral triangle with given two vertices</Description>
+ <ActionName>objects_new_equitriangle</ActionName>
+ <IconFileName>equitriangle.png</IconFileName>
+ <Construction>
+ <input requirement="point" id="1" />
+ <input requirement="point" id="2" />
+ <intermediate action="calc" type="CircleBCP" id="3" >
+ <arg>1</arg>
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="calc" type="CircleBCP" id="4" >
+ <arg>2</arg>
+ <arg>1</arg>
+ </intermediate>
+ <intermediate action="push" type="int" id="5" >-1</intermediate>
+ <intermediate action="calc" type="CircleCircleIntersection" id="6" >
+ <arg>3</arg>
+ <arg>4</arg>
+ <arg>5</arg>
+ </intermediate>
+ <result action="calc" type="TriangleB3P" id="7" >
+ <arg>1</arg>
+ <arg>2</arg>
+ <arg>6</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/evolute.kigt b/kig/macros/evolute.kigt
new file mode 100644
index 00000000..aa15296e
--- /dev/null
+++ b/kig/macros/evolute.kigt
@@ -0,0 +1,28 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Evolute</Name>
+ <Description>Evolute of a curve</Description>
+ <ActionName>objects_new_evolute</ActionName>
+ <IconFileName>evolute</IconFileName>
+ <Construction>
+ <input requirement="curve" id="1">
+ <UseText>Evolute of this curve</UseText>
+ <SelectStatement>Select the curve...</SelectStatement>
+ </input>
+ <intermediate action="push" type="hierarchy" id="2" >
+ <input requirement="point" id="1" />
+ <input requirement="curve" id="2" />
+ <result action="calc" type="CocCurve" id="3" >
+ <arg>2</arg>
+ <arg>1</arg>
+ </result>
+ </intermediate>
+ <result action="calc" type="Locus" id="3" >
+ <arg>2</arg>
+ <arg>1</arg>
+ <arg>1</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/osculating_circle.kigt b/kig/macros/osculating_circle.kigt
new file mode 100644
index 00000000..59ba450a
--- /dev/null
+++ b/kig/macros/osculating_circle.kigt
@@ -0,0 +1,27 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Osculating Circle</Name>
+ <Description>Osculating circle of a curve at a point</Description>
+ <ActionName>objects_new_osculatingcircle</ActionName>
+ <IconFileName>osculatingcircle</IconFileName>
+ <Construction>
+ <input requirement="curve" id="1">
+ <UseText>Osculating circle of this curve</UseText>
+ <SelectStatement>Select the curve...</SelectStatement>
+ </input>
+ <input requirement="point" id="2">
+ <UseText>Osculating circle at this point</UseText>
+ <SelectStatement>Select the point...</SelectStatement>
+ </input>
+ <intermediate action="calc" type="CocCurve" id="3" >
+ <arg>1</arg>
+ <arg>2</arg>
+ </intermediate>
+ <result action="calc" type="CircleBCP" id="4" >
+ <arg>3</arg>
+ <arg>2</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/segment_axis.kigt b/kig/macros/segment_axis.kigt
new file mode 100644
index 00000000..e86b90cf
--- /dev/null
+++ b/kig/macros/segment_axis.kigt
@@ -0,0 +1,25 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.6.1" >
+ <Macro>
+ <Name>Segment Axis</Name>
+ <Description>The perpendicular line through a given segment's mid point.</Description>
+ <ActionName>objects_new_segment_axis</ActionName>
+ <IconFileName>segmentaxis</IconFileName>
+ <Construction>
+ <input requirement="segment" id="1">
+ <UseText>Construct the axis of this segment</UseText>
+ <SelectStatement>Select the segment of which you want to draw the axis...</SelectStatement>
+ </input>
+ <intermediate action="fetch-property" property="mid-point" id="2" >
+ <arg>1</arg>
+ </intermediate>
+ <intermediate action="calc" type="Copy" id="3" >
+ <arg>2</arg>
+ </intermediate>
+ <result action="calc" type="LinePerpend" id="4" >
+ <arg>1</arg>
+ <arg>3</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/square.kigt b/kig/macros/square.kigt
new file mode 100644
index 00000000..09c500e0
--- /dev/null
+++ b/kig/macros/square.kigt
@@ -0,0 +1,44 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Square</Name>
+ <Description>Square with two given adjacent vertices</Description>
+ <ActionName>objects_new_square</ActionName>
+ <IconFileName>square.png</IconFileName>
+ <Construction>
+ <input requirement="point" id="1" />
+ <input requirement="point" id="2" />
+ <intermediate action="calc" type="SegmentAB" id="3" >
+ <arg>1</arg>
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="fetch-property" property="mid-point" id="4" >
+ <arg>3</arg>
+ </intermediate>
+ <intermediate action="calc" type="CircleBCP" id="5" >
+ <arg>4</arg>
+ <arg>1</arg>
+ </intermediate>
+ <intermediate action="calc" type="SegmentAB" id="6" >
+ <arg>1</arg>
+ <arg>2</arg>
+ </intermediate>
+ <intermediate action="calc" type="LinePerpend" id="7" >
+ <arg>6</arg>
+ <arg>4</arg>
+ </intermediate>
+ <intermediate action="push" type="int" id="8" >-1</intermediate>
+ <intermediate action="calc" type="ConicLineIntersection" id="9" >
+ <arg>5</arg>
+ <arg>7</arg>
+ <arg>8</arg>
+ </intermediate>
+ <intermediate action="push" type="int" id="10" >4</intermediate>
+ <result action="calc" type="PoligonBCV" id="11" >
+ <arg>9</arg>
+ <arg>1</arg>
+ <arg>10</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>
diff --git a/kig/macros/vector_difference.kigt b/kig/macros/vector_difference.kigt
new file mode 100644
index 00000000..c1b3be4b
--- /dev/null
+++ b/kig/macros/vector_difference.kigt
@@ -0,0 +1,31 @@
+<!DOCTYPE KigMacroFile>
+<KigMacroFile Number="1" Version="0.9.0" >
+ <Macro>
+ <Name>Vector Difference</Name>
+ <Description>Construct the vector difference of two vectors.</Description>
+ <ActionName>objects_new_vectordifference</ActionName>
+ <IconFileName>vectordifference</IconFileName>
+ <Construction>
+ <input requirement="vector" id="1">
+ <UseText>Construct the vector difference of this vector and another one.</UseText>
+ <SelectStatement>Select the first of the two vectors of which you want to construct the difference...</SelectStatement>
+ </input>
+ <input requirement="vector" id="2">
+ <UseText>Construct the vector difference of the other vector and this one.</UseText>
+ <SelectStatement>Select the other of the two vectors of which you want to construct the difference...</SelectStatement>
+ </input>
+ <input requirement="point" id="3">
+ <UseText>Construct the vector difference starting at this point.</UseText>
+ <SelectStatement>Select the point to construct the difference vector in...</SelectStatement>
+ </input>
+ <intermediate action="fetch-property" property="vector-opposite" id="4" >
+ <arg>2</arg>
+ </intermediate>
+ <result action="calc" type="VectorSum" id="5" >
+ <arg>1</arg>
+ <arg>4</arg>
+ <arg>3</arg>
+ </result>
+ </Construction>
+ </Macro>
+</KigMacroFile>