summaryrefslogtreecommitdiffstats
path: root/ksvg/test/physics-motor.svg
blob: 9956ad8ef1dc2d18610a1a5f8bb412c49f930fb1 (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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"   "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">  

<!--  Copyright 2002 Nikolas Zimmermann <wildfox@kde.org>               -->
<!--  "Der Gleichstrommotor"											-->
	
<svg width="650" height="850">
	<title>physics-motor</title>
	<desc>Der Gleichstrommotor</desc>

	<defs>
		<!-- Rotor Parts -->
		<g id="rotor-p1">
			<path d="M 300 350 C 300 320 400 320 400 350 z"/>
			<rect x="320" y="350" width="60" height="74"/>

		</g>

		<g id="rotor-p2">
			<path d="M 300 500 C 300 530 400 530 400 500 z"/>
			<rect x="320" y="424" width="60" height="76"/>
		</g>

		<!-- Stator -->
		<g id="stator">
			<rect x="310" y="300" width="100" height="30" style="fill:red"/>
			<rect x="310" y="540" width="100" height="30" style="fill:green"/>
		</g>

		<!-- Rotor -->
		<g id="rotor">
			<use x="10" y="10" xlink:href="#rotor-p2" style="fill:green;stroke:black"/>
			<use x="10" y="10" xlink:href="#rotor-p1" style="fill:red;stroke:black"/>

			<circle cx="360" cy="435" r="6" style="fill:black"/>
		</g>
	</defs>

	<use xlink:href="#stator"/>
	<use id="animate" xlink:href="#rotor"/>

	<animateTransform xlink:href="#animate" begin="2s" dur="3s" attributeName="transform" type="rotate" from="0, 360, 435" to="360, 360, 435" repeatDur="indefinite"/>
</svg>