-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloops.xml
More file actions
25 lines (23 loc) · 791 Bytes
/
loops.xml
File metadata and controls
25 lines (23 loc) · 791 Bytes
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
<svg>
<defs>
<g id="cube">
<polygon points="0 0 0 10 10 5 10 -5" class="d-fill-lightyellow"/>
<polygon points="10 -5 20 0 20 10 10 5" class="d-fill-silver"/>
<polygon points="0 10 10 15 20 10 10 5" class="d-fill-lightgrey"/>
</g>
</defs>
<var i="0" cube_wh="20 20"/>
<loop while="lt($i, 10)">
<var i="{{$i + 1}}"/>
<loop count="5" var="j">
<use href="#cube" wh="$cube_wh" xy="{{$i * 20}} {{$j * 30 + 40}}" />
<use href="#cube" wh="$cube_wh" xy="{{$i * 20 + 10}} {{$j * 30 + 55}}" />
</loop>
</loop>
<var x="0" oldx="0" oldy="0"/>
<loop count="100">
<var y="{{30 * sin($x * 7)}}" x="{{$x + 2}}"/>
<line xy1="$oldx $oldy" xy2="$x $y" dxy="20 110" class="d-thick d-red"/>
<var oldx="$x" oldy="$y"/>
</loop>
</svg>