-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.dsh
1256 lines (1050 loc) · 23.5 KB
/
test.dsh
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
deck
canvas 792 612
mid=50
ty=90
titleX=50
titleY=92
titleSize=4
// title, fonts
slide
ctext "decksh tests" mid mid 10
ctext "version" mid 20 2
ctext deckshVersion mid 15 2
eslide
slide
ctext "Empty" titleX titleY titleSize
eslide
slide "orange"
ctext "Background color only" titleX titleY titleSize
eslide
slide "blue" "white"
ctext "Background and Foreground" titleX titleY titleSize
eslide
slide "blue/white/10"
ctext "Gradiant only" titleX titleY titleSize
eslide
slide "purple/orange/10" "white"
ctext "Gradient and Foreground" titleX titleY titleSize
rect 50 60 50 15 "black/white/60"
rect 50 40 50 15 "red"
ctext "60" 50 60 3
ctext "40" 50 40 3
eslide
accentcolor="#800000"
objcolor="#7f7f7f"
hlcolor="#0000aa"
hlop=10
// colors, fonts, opacity
slide
hline 5 72 85 4 hlcolor hlop
ctext "Colors, fonts, opacity" titleX titleY titleSize
text "Colors" 6 70 3 "sans" objcolor
text "Fonts" 35 70 3 "sans" objcolor
text "Opacity (0-100)" 68 70 3 "sans" objcolor
list 6 60 2.5 "mono" "steelblue" 100 1.5
li `"steelblue"`
li `"#4682b4"`
li `"rgb(70,130,180)"`
li `"hsv(207,61,71)"`
li "maroon/blue/90"
elist
list 35 60 2.5 "mono" "" 100 1.5
li `"sans"`
li `"serif"`
li `"mono"`
li `"symbol"`
elist
list 50 60 2.5 "mono" "" 100 1.5
li "Sans Serif"
li "Serif" "serif"
li "Monospace" "mono"
li "abcde" "symbol"
elist
list 68 60 2.5 "mono" "" 100 1.5
li "100"
li "50"
li "20"
elist
hline 80 61 6 2 "maroon"
hline 80 56 6 2 "maroon" 50
hline 80 51 6 2 "maroon" 20
rect 30 42 4 3 "maroon/blue/90"
vline 33 25 50 0.1
vline 66 25 50 0.1
vline 5 25 50 0.1
vline 90 25 50 0.1
hline 5 25 85 0.1
list 6 20 2 "mono"
li "maroon"
li "#800000"
li "rgb(128,0,0)"
li "hsv(0,100,50)"
elist
square 30 20 2 "maroon"
square 30 15 2 "#800000"
square 30 10 2 "rgb(128,0,0)"
square 30 5 2 "hsv(0,100,50)"
eslide
// function
slide
import "redcircle.dsh"
ctext "Functions" titleX titleY titleSize
for y=20 80 20
func "coord.dsh" 20 y 2 3 "gray" "red"
func "coord.dsh" 40 y 2 3 "gray" "green"
func "coord.dsh" 60 y 2 3 "gray" "blue"
func "coord.dsh" 80 y 2 3 "gray" "gray"
efor
redcircle 50 10
eslide
// if
slide
ctext "Conditionals" titleX titleY titleSize
xv=random 0 50
rv=random 0 50
bv=random 0 50
xval=format "x=%.2f" xv
rval=format "r=%.2f" rv
bval=format "b=%.2f" bv
condx=10
condy=70
text rval 45 condy 3 "mono"
text xval 60 condy 3 "mono"
text bval 75 condy 3 "mono"
ts=3
incr=ts*1.5
c1=condx
condx+=35
condy=60
text "equal to" c1 condy ts "serif"
text "r == x" condx condy ts "mono"
condy-=incr
text "not equal to" c1 condy ts "serif"
text "r != x" condx condy ts "mono"
condy-=incr
text "greater than" c1 condy ts "serif"
text "r > x" condx condy ts "mono"
condy-=incr
text "less than" c1 condy ts "serif"
text "r < x" condx condy ts "mono"
condy-=incr
text "greater than or equal to" c1 condy ts "serif"
text "r >= x" condx condy ts "mono"
condy-=incr
text "less than or equal to" c1 condy ts "serif"
text "r <= x" condx condy ts "mono"
condy-=incr
text "between" c1 condy ts "serif"
text "r >< x b" condx condy ts "mono"
condy=60
condx+=20
if rv == xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv != xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv > xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv < xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv >= xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv <= xv
ctext "YES" condx condy 2
eif
condy-=incr
if rv >< xv bv
ctext "YES" condx condy 2
eif
eslide
slide
ctext "Conditionals (if -- else -- eif)" titleX titleY titleSize
rv=random 0 100
xv=random 0 100
textfile "ifelse.dsh" 5 65 3 "mono"
xval=format "x=%.2f" xv
rval=format "r=%.2f" rv
include "ifelse.dsh"
eslide
slide
ctext "String Conditionals" titleX titleY titleSize
ccolor1="red"
ccolor2="blue"
if ccolor1 == ccolor2
ctext "strings are equal" 50 50 3
else
ctext "strings are not equal" 50 50 3
eif
circle 20 50 5 ccolor1
circle 80 50 5 ccolor2
eslide
// coordinate assignments
slide
ctext "Coordinates" titleX titleY titleSize
a=40
b=40
c=20
p1=(a,b)
p2=(a+c,b)
p3=(a+c,b+c)
p4=(a,b+c)
line p1_x p1_y p2_x p2_y 0.2 "blue"
line p2_x p2_y p3_x p3_y 0.2 "red"
line p3_x p3_y p4_x p4_y 0.2 "green"
line p4_x p4_y p1_x p1_y 0.2 "orange"
polygon "p1_x p2_x p3_x p4_x" "p1_y p2_y p3_y p4_y" "black" 10
rx=random p1_x p2_x
ry=random p1_y p4_y
rp=(rx,ry)
circle rp_x rp_y 5 "red" 50
circle rp_x rp_y 1
ctext "p1 (a,b)" p1_x p1_y 2
ctext "p2 (a+c,b)" p2_x p2_y 2
ctext "p3 (a+c,b+c)" p3_x p3_y 2
ctext "p4 (a,b+c)" p4_x p4_y 2
eslide
// include
include "insertme.dsh"
// content
slide
ctext "Content (see test.md.pdf)" titleX titleY titleSize
content "markdown://test.md" 50 50 2
eslide
// Grid
slide
gx=10
gy=80
xint=10
yint=12
limit=35
ctext "Grid" titleX titleY titleSize
grid "grid.d" gx gy xint yint limit
gx+=limit
textfile "grid.d" gx gy 1.5 "mono"
eslide
// Text Functions
tx1=5
tx2=35
tx3=65
tx4=85
ty=92
tb="Now is the time for all good men to come to the aid of the party & 'do it now'"
slide
tw=20
textblock tb tx1 ty tw 2
tw-=5
textblock tb tx2 ty tw 2 "serif"
tw-=5
textblock tb tx3 ty tw 2 "mono" "red"
textblockfile "tb.txt" tx4 ty tw 2
textfile "AAPL.d" tx1 50 2
textfile "AAPL.d" tx2 50 2 "serif"
textfile "AAPL.d" tx3 50 2 "mono" "red"
textcode "code/hw.go" tx1 75 20 1
textcode "code/hw.go" tx2 75 20 1 "red"
eslide
// Text and Alignment
tlskip=25
l1=10
l2=l1+tlskip
l3=l2+tlskip
l4=l3+tlskip
op1=80
op2=60
op3=40
op4=20
ts1=3
slide
ctext "Text and Alignment" titleX titleY titleSize
line l1 0 l1 100 0.1
line l2 0 l2 100 0.1
line l3 0 l3 100 0.1
line l4 0 l4 100 0.1
text "one" l1 80 ts1
text "two" l1 70 ts1 "serif"
btext "three" l1 60 ts1 "mono" "red"
btext "four" l1 50 ts1 "sans" "blue" op1
ctext "one" l2 80 ts1
ctext "two" l2 70 ts1 "serif"
ctext "three" l2 60 ts1 "mono" "red"
ctext "four" l2 50 ts1 "sans" "blue" op2
etext "one" l3 80 ts1
etext "two" l3 70 ts1 "serif"
etext "three" l3 60 ts1 "mono" "red"
etext "four" l3 50 ts1 "sans" "blue" op3
rtext "one (0)" l4 60 0 ts1
rtext "two (90)" l4 60 90 ts1 "serif"
rtext "three (180)" l4 60 180 ts1 "mono" "red"
rtext "four (270)" l4 60 270 ts1 "sans" "blue" op4
arctext "moving on up" l1 20 7 180 90 2 "mono"
arctext "hello there world" l2 20 10 180 0 2 "mono" "red"
arctext "this is only a test" l3 20 10 180 360 2 "mono" "blue"
arctext "coming down" l4 20 10 90 0 2 "mono" "blue" op3
eslide
// binary and assignment ops
slide
ctext "Binary and Assignment Operators" titleX titleY titleSize
ty=10
a=10
b=40
tx=a+b
ty+=60
ctext "a+b (y+=60)" tx ty 3
a=60
b=10
tx=a-b
ty-=10
ctext "a-b (y-=10)" tx ty 3
a=5
b=10
tx=a*b
ty/=3
ctext "a*b (y/=3) " tx ty 3
a=100
b=2
tx=a/b
ty*=1.5
ctext "a/b (y*-1.5)" tx ty 3
a=100
b=35
tx=a%b
ty+=10
ctext "a%b" tx ty 3
eslide
// Lists
lsize=2
lx1=20
lx2=40
lx3=60
ly1=90
ly2=70
ly3=50
ly4=30
ly5=10
slide
ctext "Lists" titleX titleY titleSize
list lx1 ly1 lsize
li "one"
li "two"
li "three"
elist
lx1+=20
blist lx1 ly1 lsize
li "one"
li "two"
li "three"
elist
lx1+=20
nlist lx1 ly1 lsize
li "one"
li "two"
li "three"
elist
lx1=20
list lx1 ly2 lsize "sans"
li "one"
li "two"
li "three"
elist
blist lx2 ly2 lsize "serif"
li "one"
li "two"
li "three"
elist
nlist lx3 ly2 lsize "mono"
li "one"
li "two"
li "three"
elist
list lx1 ly3 lsize "sans" "red"
li "one"
li "two"
li "three"
elist
blist lx2 ly3 lsize "serif" "green"
li "one"
li "two"
li "three"
elist
nlist lx3 ly3 lsize "mono" "blue"
li "one"
li "two"
li "three"
elist
list lx1 ly4 lsize "sans" "red" op1
li "one"
li "two"
li "three"
elist
blist lx2 ly4 lsize "serif" "green" op2
li "one"
li "two"
li "three"
elist
nlist lx3 ly4 lsize "mono" "blue" op3
li "one"
li "two"
li "three"
elist
list lx1 ly5 lsize "sans" "red" op1 1
li "one"
li "two"
li "three"
elist
blist lx2 ly5 lsize "serif" "green" op2 1
li "one"
li "two"
li "three"
elist
nlist lx3 ly5 lsize "mono" "blue" op3 1
li "one"
li "two"
li "three"
elist
eslide
// centered list
slide
ctext "Centered List" titleX titleY titleSize
vline 50 0 100 0.1
clist 50 80 3
li "one"
li "two"
li "three"
li "four"
elist
clist 50 40 3 "" "" 100 1.2
li "one"
li "two"
li "three"
li "four"
elist
eslide
// Loops for grid
slide
ctext "Loops" titleX titleY titleSize
for v=0 100 5
line 100 v 0 v 0.1 "blue"
line v 100 v 0 0.1 "red"
efor
eslide
// Random
slide
ctext "Random" titleX titleY titleSize
randmin=10
randmax=90
rx1=random randmin randmax
rx2=random randmin randmax
rx3=random randmin randmax
ry1=random randmin randmax
ry2=random randmin randmax
ry3=random randmin randmax
circle rx1 ry1 10 "red" ry1
circle rx2 ry2 10 "green" ry2
circle rx3 ry3 10 "blue" ry3
eslide
// Square Root
slide
ss0 = 8
ss2 = 6
sqr0 = sqrt ss0
sqr1 = sqrt ss0 + ss2
sqr2 = sqrt ss0 - ss2
sqr3 = sqrt ss0 * ss2
sqr4 = sqrt ss0 / ss2
sm0 = format "sqrt 8 = %g" sqr0
sm1 = format "sqrt 8 + 6 = %g" sqr1
sm2 = format "sqrt 8 - 6 = %g" sqr2
sm3 = format "sqrt 8 * 6 = %g" sqr3
sm4 = format "sqrt 8 / 6 = %g" sqr4
ctext sm0 50 80 3
ctext sm1 50 70 3
ctext sm2 50 60 3
ctext sm3 50 50 3
ctext sm4 50 40 3
ctext "Square Root" titleX titleY titleSize
eslide
// sine
slide
str0 = 3.1415926
str2 = 0.707
trig0 = sine str0
trig1 = sine str0 + str2
trig2 = sine str0 - str2
trig3 = sine str0 * str2
trig4 = sine str0 / str2
st0 = format "sine 3.1415926 = %g" trig0
st1 = format "sine 3.1415926 + 0.707 = %g" trig1
st2 = format "sine 3.1415926 - 0.707 = %g" trig2
st3 = format "sine 3.1415926 * 0.707 = %g" trig3
st4 = format "sine 3.1415926 / 0.707 = %g" trig4
ctext st0 50 80 3
ctext st1 50 70 3
ctext st2 50 60 3
ctext st3 50 50 3
ctext st4 50 40 3
ctext "Sine" titleX titleY titleSize
eslide
// cosine
slide
str0 = 3.1415926
str2 = 0.707
trig0 = cosine str0
trig1 = cosine str0 + str2
trig2 = cosine str0 - str2
trig3 = cosine str0 * str2
trig4 = cosine str0 / str2
st0 = format "cosine 3.1415926 = %g" trig0
st1 = format "cosine 3.1415926 + 0.707 = %g" trig1
st2 = format "cosine 3.1415926 - 0.707 = %g" trig2
st3 = format "cosine 3.1415926 * 0.707 = %g" trig3
st4 = format "cosine 3.1415926 / 0.707 = %g" trig4
ctext st0 50 80 3
ctext st1 50 70 3
ctext st2 50 60 3
ctext st3 50 50 3
ctext st4 50 40 3
ctext "Cosine" titleX titleY titleSize
eslide
// tangent
slide
str0 = 3.1415926
str2 = 0.707
trig0 = tangent str0
trig1 = tangent str0 + str2
trig2 = tangent str0 - str2
trig3 = tangent str0 * str2
trig4 = tangent str0 / str2
st0 = format "tangent 3.1415926 = %g" trig0
st1 = format "tangent 3.1415926 + 0.707 = %g" trig1
st2 = format "tangent 3.1415926 - 0.707 = %g" trig2
st3 = format "tangent 3.1415926 * 0.707 = %g" trig3
st4 = format "tangent 3.1415926 / 0.707 = %g" trig4
ctext st0 50 80 3
ctext st1 50 70 3
ctext st2 50 60 3
ctext st3 50 50 3
ctext st4 50 40 3
ctext "Tangent" titleX titleY titleSize
eslide
// format
slide
ctext "Format" titleX titleY titleSize
sp0=10
sp1=20+100
s0=format "Widget 1: %.2f" sp0
s1=format "Widget 2: %.3f" sp1
st=format "Total Widgets: %v" sp0+sp1
ctext s0 50 60 3
ctext s1 50 50 3
ctext st 50 40 3
ctext ss 50 70 3
eslide
slide
ctext "Format (2)" titleX titleY titleSize
include "testfmt.dsh"
eslide
// Polar coordinates
slide
ctext "Polar Coordinates" titleX titleY titleSize
a1=0
a2=45
a3=90
a4=135
a5=180
a6=225
a7=270
a8=325
px=polarx 50 50 20 a1
py=polary 50 50 20 a1
ctext "0" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a2
py=polary 50 50 20 a2
ctext "π/4 (45°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a3
py=polary 50 50 20 a3
ctext "π/2 (90°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a4
py=polary 50 50 20 a4
ctext "3π/4 (135°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a5
py=polary 50 50 20 a5
ctext "π (180°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a6
py=polary 50 50 20 a6
ctext "5π/4 (225°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a7
py=polary 50 50 20 a7
ctext "3π/2 (270°)" px py 2
line 50 50 px py 0.1
px=polarx 50 50 20 a8
py=polary 50 50 20 a8
ctext "7π/4 (325°)" px py 2
line 50 50 px py 0.1
point=polar 50 50 10 a2
line 50 50 point_x point_y 0.5 "red" 30
circle point_x point_y 2 "red"
circle 50 50 40 "gray" 20
eslide
// vmap
slide
ctext "Map Ranges" titleX titleY titleSize
bx=10
ex=90
begyr=1958
endyr=2020
x0=vmap 1958 1958 2020 10 90
x1=vmap 1980 1958 2020 10 90
x2=vmap 1990 1958 2020 10 90
xend=vmap 2020 begyr endyr bx ex
y0=vmap 1958 1958 2020 90 40
y1=vmap 1980 1958 2020 90 40
y2=vmap 1990 1958 2020 90 40
yend=vmap 2010 1958 2020 90 40
text "1958" x0 20 2
text "1978" x1 20 2
text "1980" x2 20 2
text "end" xend 20 2
text "1958" 10 y0 2
text "1980" 10 y1 2
text "1990" 10 y2 2
text "2020" 10 yend 2
eslide
// area
slide
ctext "Areas" titleX titleY titleSize
nya=vmap 8.399 0 100 0 1000
cca=vmap 2.024 0 100 0 1000
cda=vmap 0.129106 0 100 0 1000
acircle 50 50 nya "gray"
acircle 60 50 cca "orange"
acircle 67 50 cda "red"
nyd=area nya
ccd=area cca
cdd=area cda
cplus=area nya+cca
circle 50 30 nyd
circle 60 30 ccd
circle 67 30 cdd
circle 80 30 cplus
eslide
slide
ctext "substr" titleX titleY titleSize
s="hello, world"
a=substr s - - // a="hello, world"
b=substr s - 4 // b="hello"
c=substr s 7 - // c="world"
d=substr s 3 8 // d="lo, wo"
e=substr "This is a test" 5 8 // e="is a"
text `s="hello, world"` 5 80 3 "mono"
text "substr s - -" 5 70 3 "mono"
text "substr s - 4" 5 60 3 "mono"
text "substr s 7 -" 5 50 3 "mono"
text "substr s 3 8" 5 40 3 "mono"
text `substr "This is a test" 5 8` 5 30 3 "mono"
text a 60 70 3
text b 60 60 3
text c 60 50 3
text d 60 40 3
text e 60 30 3
eslide
// Lines
slide
ctext "Lines" titleX titleY titleSize
hline 50 50 20
hline 50 55 25 0.5
hline 50 60 30 1 "red"
hline 50 65 35 1.5 "blue"
hline 50 70 40 2 "green" 50
vline 10 50 20
vline 15 50 25 0.5
vline 20 50 30 1 "red"
vline 25 50 35 1.5 "blue"
vline 30 50 40 2 "green" 50
for v=10 40 5
vline v 10 30 0.1 "red"
hline 10 v 30 0.1 "blue"
efor
for v=50 80 5
vline v 10 30 0.1 "blue"
efor
for v=10 40 5
hline 50 v 30 0.1 "red"
efor
eslide
// Stars
slide
ctext "Stars" titleX titleY titleSize
star 20 50 5 5 15
star 50 50 5 5 15 "red"
star 80 50 5 5 15 "red" 20
eslide
// Rounded Rectangles
slide
ctext "Pill/Rounded Rectangles" titleX titleY titleSize
rrect 30 50 30 30 10
rrect 70 50 20 30 5 "red"
rrect 50 15 50 10 5 "blue"
pill 30 80 10 5
pill 70 80 10 5 "red"
eslide
// Shapes
c1="red"
c2="blue"
c3="green"
shapeop=30
slide
ctext "Shapes" 50 5 5
l1=20
polygon "15 20 25" "90 95 90"
polygon "35 40 45" "90 95 90" c1
polygon "55 60 65" "90 95 90" c2 shapeop
rect l1 80 10 5
rect 40 80 10 5 c1
rect 60 80 10 5 c2 shapeop
square l1 70 5
square 40 70 5 c1
square 60 70 5 c2 shapeop
ellipse l1 60 10 5
ellipse 40 60 10 5 c1
ellipse 60 60 10 5 c2 shapeop
circle l1 50 5
circle 40 50 5 c1
circle 60 50 5 c2 shapeop
line 15 35 25 40
line 35 35 45 40 1 c1
line 55 35 65 40 1 c2
line 75 35 85 40 1 c3 shapeop
arc 20 25 10 5 0 180
arc 40 25 10 5 0 180 1 c1
arc 60 25 10 5 0 180 1 c2
arc 80 25 10 5 0 180 1 c3 shapeop
curve 15 15 10 25 25 15
curve 35 15 30 25 45 15 1
curve 55 15 45 25 65 15 1 c2
curve 75 15 65 25 85 15 1 c3 shapeop
eslide
// polygon eval
slide
ctext "Polygon Eval" 50 90 5
x1=10
x2=15
x3=20
y1=50
y2=70
y3=50
polygon "10 15 20" "80 90 80"
polygon "x1 x2 x3" "y1 y2 y3"
x1+=20
x2+=20
x3+=20
polygon "x1 x2 x3" "y1 y2 y3" "red"
x1+=20
x2+=20
x3+=20
polygon "x1 x2 x3" "y1 y2 y3" "red" 20
x1+=20
x2+=20
x3+=20
polygon "x1 75 x3" "y1 90 y3"
eslide
// polyline eval
slide
ctext "Polyline Eval" 50 90 5
x1=10
x2=15
x3=20
y1=50
y2=70
y3=50
polyline "10 15 20" "80 90 80"
polyline "x1 x2 x3" "y1 y2 y3"
x1+=20
x2+=20
x3+=20
polyline "x1 x2 x3" "y1 y2 y3" 0.2 "red"
x1+=20
x2+=20
x3+=20
polyline "x1 x2 x3" "y1 y2 y3" 0.2 "red" 20
x1+=20
x2+=20
x3+=20
polyline "x1 75 x3" "y1 90 y3"
eslide
// Arrows
slide
arrow 50 45 30 45
arrow 50 55 25 55 0.4
arrow 50 65 20 65 0.5 4
arrow 50 75 15 75 0.6 5 8
arrow 50 85 10 85 0.7 6 9 "red"
arrow 50 95 05 95 0.8 8 10 "blue" 20
arrow 50 45 70 45
arrow 50 55 75 55 0.4
arrow 50 65 80 65 0.5 4
arrow 50 75 85 75 0.6 5 8
arrow 50 85 90 85 0.7 6 9 "red"
arrow 50 95 95 95 0.8 8 10 "blue" 20
arrow 05 5 05 40
arrow 15 5 15 35 0.4
arrow 25 5 25 30 0.5 4
arrow 35 5 35 25 0.6 5 8
arrow 45 5 45 20 0.7 6 9 "red"
arrow 55 5 55 15 0.8 5 8 "blue" 20
arrow 95 40 95 05
arrow 85 40 85 10 0.4
arrow 75 40 75 15 0.5 4
arrow 65 40 65 20 0.6 5 8
arrow 55 40 55 25 0.7 6 9 "red"
arrow 45 40 45 30 0.8 5 8 "blue" 20
for lcx=45 95 10
circle 50 lcx 1.5 "gray"
efor
for lcx=5 55 10
circle lcx 5 1.5 "gray"
efor
for lcx=45 95 10
circle lcx 40 1.5 "gray"
efor
eslide
// Arrows
slide
circle 50 50 2 "blue"
arrow 50 50 90 50 // right
arrow 50 50 10 50 // left
arrow 50 50 50 90 // up