summaryrefslogtreecommitdiffstats
path: root/kig/examples/sine-curve.kig
blob: e20f24d45b8a20d08f168f198fa976f8e43ca9cd (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
<!DOCTYPE KigDocument>
<KigDocument Version="0.5.1" >
 <CoordinateSystem>Euclidean</CoordinateSystem>
 <Objects>
  <Data internal="true" type="double" id="1" >-3.50779</Data>
  <Data internal="true" type="double" id="2" >3.80326</Data>
  <Data internal="true" type="double" id="3" >5.49045</Data>
  <Data internal="true" type="double" id="4" >-0.492505</Data>
  <Data internal="true" type="double" id="5" >0.65293</Data>
  <Data internal="true" type="hierarchy" id="6" >
   <input requirement="any" id="1" />
   <input requirement="string" id="2" />
   <intermediate action="calc" type="PythonCompileType" id="3" >
    <arg>2</arg>
   </intermediate>
   <result action="calc" type="PythonExecuteType" id="4" >
    <arg>3</arg>
    <arg>1</arg>
   </result>
  </Data>
  <Data internal="true" type="string" id="7" >def calc( arg1 ):
	c = arg1.coordinate();
	y = sin( c.x );
	return Point( Coordinate( c.x, y ) )
</Data>
  <Object width="-1" internal="false" shown="true" type="FixedPoint" id="8" color="#0000ff" >
   <Parent id="1" />
   <Parent id="2" />
  </Object>
  <Object width="-1" internal="false" shown="true" type="FixedPoint" id="9" color="#0000ff" >
   <Parent id="3" />
   <Parent id="4" />
  </Object>
  <Object width="-1" internal="true" shown="true" type="PythonCompileType" id="10" color="#0000ff" >
   <Parent id="7" />
  </Object>
  <Object width="-1" internal="false" shown="true" type="LineAB" id="11" color="#0000ff" >
   <Parent id="8" />
   <Parent id="9" />
  </Object>
  <Object width="-1" internal="false" shown="true" type="ConstrainedPoint" id="12" color="#0000ff" >
   <Parent id="11" />
   <Parent id="5" />
  </Object>
  <Object width="-1" internal="false" shown="true" type="Locus" id="13" color="#0000ff" >
   <Parent id="11" />
   <Parent id="6" />
   <Parent id="7" />
  </Object>
  <Object width="-1" internal="false" shown="true" type="PythonExecuteType" id="14" color="#0000ff" >
   <Parent id="10" />
   <Parent id="12" />
  </Object>
 </Objects>
</KigDocument>