forked from edizquierdo/CE_locomotion
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathviz.nb
executable file
·698 lines (676 loc) · 30.4 KB
/
viz.nb
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
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 12.1' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 30927, 690]
NotebookOptionsPosition[ 29299, 656]
NotebookOutlinePosition[ 29698, 672]
CellTagsIndexPosition[ 29655, 669]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
RowBox[{
RowBox[{"SetDirectory", "[",
RowBox[{"NotebookDirectory", "[", "]"}], "]"}], ";"}]], "Input",
CellChangeTimes->{3.8111557664093027`*^9, 3.812804751522169*^9},
CellLabel->"In[1]:=",ExpressionUUID->"f283e1d8-dbb8-424e-bb98-092ea85d3b35"],
Cell[CellGroupData[{
Cell["Behavior ", "Section",
CellChangeTimes->{{3.6363760436040707`*^9, 3.636376055015086*^9}, {
3.644842813206921*^9, 3.644842814238235*^9}, {3.649594627680064*^9,
3.64959462828686*^9}, {3.652103009470049*^9, 3.652103045572576*^9}, {
3.652268513122839*^9, 3.6522685190651073`*^9}, {3.652455817092622*^9,
3.6524558177071342`*^9}, 3.708773687100161*^9, {3.7087737498531103`*^9,
3.7087737510672903`*^9},
3.7386598887007637`*^9},ExpressionUUID->"d7a18c6a-9dcf-46de-bdc5-\
c2cd8633570c"],
Cell[BoxData[
RowBox[{
RowBox[{"cd", "=",
RowBox[{"ColorData", "[",
RowBox[{"97", ",", "\"\<ColorList\>\""}], "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.702722226338874*^9, 3.702722238592771*^9},
3.702722278763084*^9, 3.706272398992626*^9},
CellLabel->"In[2]:=",ExpressionUUID->"98136792-ead2-4986-a972-2312439fc53c"],
Cell[CellGroupData[{
Cell["Definitions", "Subsection",
CellChangeTimes->{{3.6363760436040707`*^9, 3.636376055015086*^9}, {
3.644842813206921*^9, 3.644842814238235*^9}, {3.652103056317782*^9,
3.6521030572924767`*^9}},ExpressionUUID->"4ac51072-d806-4554-bb7d-\
45ac6a861e33"],
Cell[BoxData[
RowBox[{" ",
RowBox[{
RowBox[{"Needs", "[", "\"\<Notation`\>\"", "]"}], ";"}]}]], "Input",
CellChangeTimes->{3.6428722446792793`*^9},
CellLabel->"In[3]:=",ExpressionUUID->"c51b0922-d9b0-47ed-b2c4-d50af61dee27"],
Cell[BoxData[{
RowBox[{
RowBox[{
SubscriptBox["N", "Segments"], "=", "50"}], " ",
RowBox[{"(*", " ",
RowBox[{"Number", " ", "of", " ", "segments"}], " ", "*)"}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
SubscriptBox["R", "Min"], "=",
RowBox[{"40.0", "\[Times]",
SuperscriptBox["10",
RowBox[{"-", "6"}]]}]}], " ",
RowBox[{"(*", " ",
RowBox[{
"Minor", " ", "radius", " ", "of", " ", "prolate", " ", "ellipse", " ",
"body", " ", "in", " ", "m"}], " ", "*)"}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{
SubscriptBox["L", "worm"], "=",
RowBox[{"1.0", "\[Times]",
SuperscriptBox["10",
RowBox[{"-", "3"}]]}]}], " ",
RowBox[{"(*", " ",
RowBox[{"Length", " ", "of", " ", "worm", " ", "in", " ", "m"}], " ",
"*)"}], ";"}]}], "Input",
CellChangeTimes->{
3.6120935104195957`*^9, {3.612094683208576*^9, 3.612094695287305*^9}, {
3.6121011844081717`*^9, 3.612101184647451*^9}, {3.612101455876511*^9,
3.612101497330614*^9}, {3.6121018127520323`*^9, 3.6121018175021973`*^9}, {
3.612104744258704*^9, 3.61210475971802*^9}, {3.612169664637744*^9,
3.61216971634881*^9}, {3.6121697566852217`*^9, 3.6121697771885767`*^9}, {
3.612170492264575*^9, 3.61217049653522*^9}, 3.612170647222743*^9, {
3.612170778596305*^9, 3.6121707827299843`*^9}, {3.6121708288902617`*^9,
3.612170856232869*^9}, 3.612171016503467*^9, {3.6121714972000837`*^9,
3.612171525829959*^9}, 3.61217370534028*^9, {3.6121737391481333`*^9,
3.612173839016618*^9}, {3.6121738748249493`*^9, 3.612173917887559*^9}, {
3.612174339785514*^9, 3.612174383695878*^9}, {3.612174462975484*^9,
3.6121744814942427`*^9}, {3.612174513384672*^9, 3.612174533087356*^9}, {
3.6121746664441223`*^9, 3.61217485125732*^9}, {3.612174900377*^9,
3.612174917544838*^9}, {3.612176827452029*^9, 3.6121768305458803`*^9}, {
3.612179242921607*^9, 3.612179278033615*^9}, {3.612179461737273*^9,
3.6121794660873537`*^9}, {3.612179556787369*^9, 3.6121795572226553`*^9},
3.612179587787429*^9, 3.6121839973437138`*^9, {3.6122600636260843`*^9,
3.612260112021222*^9}, {3.612265186197609*^9, 3.612265186652052*^9},
3.612265277325097*^9, 3.612265794897365*^9, {3.612609058946312*^9,
3.612609118802149*^9}, {3.6126202315247583`*^9, 3.6126202319828787`*^9},
3.612626004258614*^9, 3.6126261630874987`*^9, 3.6126975879083557`*^9, {
3.612697818311639*^9, 3.6126978190795517`*^9}, 3.6127896670396347`*^9, {
3.6331149934901867`*^9, 3.633114997528371*^9}, {3.633174504087892*^9,
3.633174504432541*^9}, {3.6553944874451714`*^9, 3.6553944875313272`*^9}},
Background->RGBColor[0.87, 0.94, 1],
CellLabel->"In[4]:=",ExpressionUUID->"c5c71da9-4b05-44a6-9962-6bcc58b58da9"],
Cell[BoxData[
RowBox[{
RowBox[{"R", "[", "i_", "]"}], ":=",
RowBox[{
SubscriptBox["R", "Min"], " ",
RowBox[{"Abs", "[",
RowBox[{"Sin", "[",
RowBox[{"ArcCos", "[",
FractionBox[
RowBox[{"i", "-",
RowBox[{"(",
RowBox[{
RowBox[{
SubscriptBox["N", "Segments"], "/", "2"}], "+", "1"}], ")"}]}],
RowBox[{
RowBox[{
SubscriptBox["N", "Segments"], "/", "2"}], "+", "0.2"}]], "]"}],
"]"}], "]"}]}]}]], "Input",
CellChangeTimes->{{3.612093316393784*^9, 3.612093379430567*^9}, {
3.612093433532014*^9, 3.612093435072153*^9}, {3.6120947057294407`*^9,
3.612094707721127*^9}, {3.6120986016976557`*^9, 3.6120986022084513`*^9}, {
3.612099044170473*^9, 3.612099045105218*^9}, {3.6121053268759117`*^9,
3.6121053356276503`*^9}, {3.6121053700596447`*^9, 3.612105373322989*^9}, {
3.612105412683432*^9, 3.6121054210740843`*^9}, {3.61217092312087*^9,
3.612170925632032*^9}, {3.6121709873024406`*^9, 3.612171004038233*^9}, {
3.612171591790807*^9, 3.612171600661212*^9}, 3.6122651951566753`*^9},
Background->RGBColor[0.87, 0.94, 1],
CellLabel->"In[7]:=",ExpressionUUID->"563b8098-f1ae-4c89-9e40-64dcb5d13645"],
Cell[BoxData[
RowBox[{
RowBox[{"(*", " ",
RowBox[{
"Display", " ", "the", " ", "worm", " ", "model", " ", "given", " ", "a",
" ", "vector", " ", "of", " ", "segment", " ", "state", " ", "vectors"}],
" ", "*)"}], "\[IndentingNewLine]", "\[IndentingNewLine]",
RowBox[{
RowBox[{"DisplayWormModelB", "[",
RowBox[{"Ss_", ",", "Color_", ",",
RowBox[{"opts", ":",
RowBox[{"OptionsPattern", "[", "Graphics", "]"}]}]}], "]"}], ":=",
"\[IndentingNewLine]",
RowBox[{"Module", "[",
RowBox[{
RowBox[{"{",
RowBox[{
"AllPDs", ",", "HeadPDs", ",", " ", "VNC1PDs", ",", "OtherPDs", ",",
"AllPVs", ",", "HeadPVs", ",", "VNC1PVs", ",", "OtherPVs"}], "}"}],
",", "\[IndentingNewLine]",
RowBox[{
RowBox[{"AllPDs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",",
RowBox[{
SubscriptBox["N", "Segments"], "+", "1"}]}], "}"}]}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"HeadPDs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "8"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"VNC1PDs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "9", ",", "16"}], "}"}]}], "]"}]}], ";",
RowBox[{"OtherPDs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "+",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "17", ",",
RowBox[{
SubscriptBox["N", "Segments"], "+", "1"}]}], "}"}]}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"AllPVs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",",
RowBox[{
SubscriptBox["N", "Segments"], "+", "1"}]}], "}"}]}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"HeadPVs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "1", ",", "8"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"VNC1PVs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "9", ",", "16"}], "}"}]}], "]"}]}], ";",
"\[IndentingNewLine]",
RowBox[{"OtherPVs", "=",
RowBox[{"Table", "[",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "1"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Cos", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}], "]"}]}]}],
",",
RowBox[{
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "2"}], "\[RightDoubleBracket]"}], "-",
RowBox[{
RowBox[{"R", "[", "i", "]"}],
RowBox[{"Sin", "[",
RowBox[{"Ss", "\[LeftDoubleBracket]",
RowBox[{"i", ",", "3"}], "\[RightDoubleBracket]"}],
"]"}]}]}]}], "}"}], ",",
RowBox[{"{",
RowBox[{"i", ",", "17", ",",
RowBox[{
SubscriptBox["N", "Segments"], "+", "1"}]}], "}"}]}], "]"}]}],
";", "\[IndentingNewLine]",
RowBox[{"Graphics", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"{",
RowBox[{"Gray", ",",
RowBox[{"Thickness", "[", "0.003", "]"}], ",",
RowBox[{"MapThread", "[",
RowBox[{
RowBox[{
RowBox[{"Line", "[",
RowBox[{"{",
RowBox[{"#1", ",", "#2"}], "}"}], "]"}], "&"}], ",",
RowBox[{"{",
RowBox[{"AllPDs", ",", "AllPVs"}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]", "LightGray", ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"MapThread", "[",
RowBox[{
RowBox[{
RowBox[{"Line", "[",
RowBox[{"{",
RowBox[{"#1", ",", "#2"}], "}"}], "]"}], "&"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"Drop", "[",
RowBox[{"AllPDs", ",",
RowBox[{"-", "1"}]}], "]"}], ",",
RowBox[{"Drop", "[",
RowBox[{"AllPVs", ",", "1"}], "]"}]}], "}"}]}], "]"}], ",",
RowBox[{"MapThread", "[",
RowBox[{
RowBox[{
RowBox[{"Line", "[",
RowBox[{"{",
RowBox[{"#1", ",", "#2"}], "}"}], "]"}], "&"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{"Drop", "[",
RowBox[{"AllPDs", ",", "1"}], "]"}], ",",
RowBox[{"Drop", "[",
RowBox[{"AllPVs", ",",
RowBox[{"-", "1"}]}], "]"}]}], "}"}]}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"cd", "[",
RowBox[{"[", "1", "]"}], "]"}], ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "HeadPDs", "]"}], ",",
RowBox[{"cd", "[",
RowBox[{"[", "2", "]"}], "]"}], ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "HeadPVs", "]"}], ",", "\[IndentingNewLine]",
RowBox[{"cd", "[",
RowBox[{"[", "3", "]"}], "]"}], ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "VNC1PDs", "]"}], ",",
RowBox[{"cd", "[",
RowBox[{"[", "4", "]"}], "]"}], ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "VNC1PVs", "]"}], ",", "\[IndentingNewLine]",
"Gray", ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "OtherPDs", "]"}], ",", "Gray", ",",
RowBox[{"Thickness", "[", "0.002", "]"}], ",",
RowBox[{"Line", "[", "OtherPVs", "]"}]}], "\[IndentingNewLine]",
RowBox[{"(*",
RowBox[{",", "LightGray", ",",
RowBox[{"PointSize", "[", "0.004", "]"}], ",",
RowBox[{"Map", "[",
RowBox[{"Point", ",",
RowBox[{"Join", "[",
RowBox[{"PDs", ",", "PVs"}], "]"}]}], "]"}]}], "*)"}],
"\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", "opts"}],
"]"}]}]}], "]"}]}]}]], "Input",
CellChangeTimes->{{3.61209385036558*^9, 3.612093914531852*^9}, {
3.612093946660372*^9, 3.61209412410618*^9}, {3.6120941946176233`*^9,
3.612094215024151*^9}, {3.612094343591776*^9, 3.612094381798026*^9}, {
3.612094429662516*^9, 3.612094451093137*^9}, {3.6120944931490192`*^9,
3.612094493604109*^9}, {3.612094709234321*^9, 3.612094710570571*^9}, {
3.61209845068547*^9, 3.6120984536122026`*^9}, {3.612098506012271*^9,
3.612098510979486*^9}, {3.61209854434798*^9, 3.612098550603086*^9}, {
3.6120986965851183`*^9, 3.612098739330936*^9}, {3.612098890014902*^9,
3.612098902942367*^9}, {3.612099154794537*^9, 3.612099180056911*^9}, {
3.612099455701776*^9, 3.612099482804134*^9}, {3.612099842854961*^9,
3.612099844507049*^9}, {3.612099992628017*^9, 3.61209999289953*^9}, {
3.612100676793664*^9, 3.612100790112575*^9}, {3.6121009125749493`*^9,
3.612100950813691*^9}, {3.612170937642611*^9, 3.6121709535302353`*^9}, {
3.6121893854988117`*^9, 3.612189406625792*^9}, {3.6121894453790483`*^9,
3.612189448729302*^9}, {3.612189786820183*^9, 3.612189789908036*^9}, {
3.612264368932317*^9, 3.6122643713390303`*^9}, {3.612609609854208*^9,
3.612609671124361*^9}, {3.612609719435824*^9, 3.61260977062072*^9}, {
3.612610084622863*^9, 3.612610093101453*^9}, {3.6126102531166067`*^9,
3.61261025405131*^9}, {3.612610308221407*^9, 3.6126103510342827`*^9}, {
3.6126104915298653`*^9, 3.612610544984125*^9}, 3.612610662462099*^9, {
3.612610715637082*^9, 3.6126107718509197`*^9}, {3.612610894441608*^9,
3.6126108949930267`*^9}, {3.612611018194948*^9, 3.612611043542315*^9}, {
3.612620448775284*^9, 3.61262068185067*^9}, {3.612620718090631*^9,
3.612620736082204*^9}, {3.61262085304065*^9, 3.612620886208384*^9}, {
3.612621165146649*^9, 3.6126211657058153`*^9}, {3.612621204748137*^9,
3.612621259473522*^9}, {3.647618115136801*^9, 3.647618128588313*^9}, {
3.65209505546931*^9, 3.6520950835541887`*^9}, {3.6520951484346323`*^9,
3.6520951496411743`*^9}, {3.652100002551538*^9, 3.65210000469473*^9}, {
3.652100169117325*^9, 3.652100176564788*^9}, {3.652100319941227*^9,
3.6521004374319067`*^9}, {3.652100592322397*^9, 3.652100598073718*^9}, {
3.652100630058091*^9, 3.652100649036985*^9}, {3.7057597969639397`*^9,
3.705759819919786*^9}, {3.705759902885413*^9, 3.705759906757141*^9}, {
3.70575994667124*^9, 3.7057599805778637`*^9}, {3.705760023306038*^9,
3.705760061486415*^9}, {3.705760117829177*^9, 3.705760118707068*^9}, {
3.705760291555111*^9, 3.705760296098023*^9}, {3.70584981187255*^9,
3.705849985270472*^9}, {3.7058500164007473`*^9, 3.7058501596429234`*^9}, {
3.705850252800541*^9, 3.705850259684588*^9}},
Background->RGBColor[0.87, 0.94, 1],
CellLabel->"In[8]:=",ExpressionUUID->"c97a6e30-d713-4fcd-b27a-89df62768341"]
}, Open ]],
Cell[CellGroupData[{
Cell["Agar", "Subsection",
CellChangeTimes->{{3.6363760436040707`*^9, 3.636376055015086*^9}, {
3.6363760874911623`*^9, 3.6363760906829967`*^9}, {3.636376320770589*^9,
3.63637632250568*^9}, {3.636377131347089*^9, 3.636377146033326*^9}, {
3.647348146094062*^9, 3.6473481765648327`*^9}, {3.647619579890566*^9,
3.6476195924733667`*^9}, {3.647619644137146*^9, 3.647619646745109*^9}, {
3.651850579003076*^9, 3.651850586114089*^9}, {3.6518506586906424`*^9,
3.651850661017672*^9}, {3.6520960085128508`*^9, 3.652096074539793*^9},
3.6521028891898327`*^9, {3.652268540281636*^9,
3.652268540752191*^9}},ExpressionUUID->"9936bc72-a3d9-45b8-b7f4-\
f8d051dcbef6"],
Cell[BoxData[
RowBox[{
RowBox[{"data", "=",
RowBox[{"Import", "[", "\"\<body.dat\>\"", "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.651850541493863*^9, 3.651850573258546*^9}, {
3.652096577869535*^9, 3.652096582085082*^9}, {3.652268552692807*^9,
3.652268578518952*^9}, {3.652268612771185*^9, 3.6522686131172037`*^9}, {
3.6523438628141108`*^9, 3.652343862913394*^9}, {3.652344754968321*^9,
3.652344776895814*^9}, 3.652867147535836*^9, {3.65528768565234*^9,
3.65528768737498*^9}, {3.655296558965714*^9, 3.655296559988014*^9}, {
3.655629891611617*^9, 3.655629893108409*^9}, {3.655653475715605*^9,
3.65565347586587*^9}, {3.655808650488316*^9, 3.65580865216356*^9},
3.6558088298596478`*^9, {3.6558318994561234`*^9, 3.655831902822143*^9},
3.6558973741303167`*^9, 3.705764746584244*^9, {3.706271001752743*^9,
3.70627100380543*^9}, {3.7062723353622026`*^9, 3.706272351515992*^9}, {
3.706365327663602*^9, 3.706365332272806*^9}, 3.707744222867066*^9, {
3.707744329260084*^9, 3.7077443299786654`*^9}, 3.738659922990468*^9, {
3.848583900206749*^9, 3.848583900903659*^9}, 3.848657328483863*^9, {
3.848657375089081*^9, 3.8486573934134817`*^9}, 3.848657472631353*^9,
3.864908621817727*^9},
CellLabel->"In[9]:=",ExpressionUUID->"474a15bf-9a14-42a7-ad79-a9ac4baae226"],
Cell[BoxData[
RowBox[{
RowBox[{
RowBox[{"w", "=", "0.002"}], ";"}], " "}]], "Input",
CellChangeTimes->{{3.6379548634331627`*^9, 3.637954886773179*^9}, {
3.639777670431731*^9, 3.6397776715800343`*^9}, 3.639837526068467*^9, {
3.6399223356113863`*^9, 3.63992233923307*^9}, 3.640967522958989*^9,
3.641049594560718*^9, {3.641742262088154*^9, 3.641742264935089*^9},
3.6447557198835373`*^9, {3.6520951791437902`*^9, 3.652095201103105*^9}, {
3.6520992225322657`*^9, 3.652099239637767*^9}, 3.8485792285117683`*^9, {
3.84865734986834*^9, 3.848657355828998*^9}, 3.8486574762561693`*^9},
CellLabel->"In[10]:=",ExpressionUUID->"ee6ef83a-eb55-41a9-b853-1a8a7e377f2e"],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Manipulate", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"Show", "[", "\[IndentingNewLine]",
RowBox[{
RowBox[{"DisplayWormModelB", "[",
RowBox[{
RowBox[{"Partition", "[",
RowBox[{
RowBox[{"Rest", "[",
RowBox[{
"data", "\[LeftDoubleBracket]", "t", "\[RightDoubleBracket]"}],
"]"}], ",", "3"}], "]"}], ",", "Gray"}], "]"}], ",",
"\[IndentingNewLine]",
RowBox[{"Axes", "\[Rule]", "False"}], ",",
RowBox[{"PlotRange", "\[Rule]",
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "3"}],
RowBox[{"w", "/", "2"}]}], ",",
RowBox[{"w", "/", "2"}]}], "}"}], ",",
RowBox[{"{",
RowBox[{
RowBox[{
RowBox[{"-", "w"}], "/", "3"}], ",",
RowBox[{"w", "/", "3"}]}], "}"}]}], "}"}]}], ",",
RowBox[{"AspectRatio", "\[Rule]",
RowBox[{"1", "/", "3"}]}], ",",
RowBox[{"ImageSize", "\[Rule]", "700"}]}], "\[IndentingNewLine]", "]"}],
",", "\[IndentingNewLine]",
RowBox[{"{",
RowBox[{"t", ",", "1", ",",
RowBox[{"Length", "[", "data", "]"}], ",", "1"}], "}"}]}],
"]"}]], "Input",
CellChangeTimes->{
3.6379523010643806`*^9, {3.637954839723337*^9, 3.637954871726061*^9}, {
3.63922700585076*^9, 3.6392270081539173`*^9}, {3.639227039130702*^9,
3.639227039289637*^9}, {3.639301713257555*^9, 3.639301728229589*^9},
3.639752601574432*^9, {3.639837596772039*^9, 3.639837598618907*^9},
3.641049598280257*^9, {3.6424328486729603`*^9, 3.642432849031575*^9}, {
3.642872208392552*^9, 3.6428722123072567`*^9}, 3.642880853262698*^9,
3.647616000911242*^9, {3.6476163519443827`*^9, 3.647616352406719*^9},
3.647617703953719*^9, {3.647617810177947*^9, 3.6476178123779163`*^9}, {
3.647617985833967*^9, 3.6476180272482357`*^9}, {3.647618106819203*^9,
3.647618108975947*^9}, {3.647618141552731*^9, 3.6476181455837297`*^9}, {
3.647619731501054*^9, 3.64761973860498*^9}, {3.651850296207011*^9,
3.6518502977112494`*^9}, 3.651850575567534*^9, {3.652095116705406*^9,
3.652095133720656*^9}, {3.652095691816142*^9, 3.652095705240759*^9}, {
3.652095830556691*^9, 3.652095864003832*^9}, {3.65209591704475*^9,
3.652095974176141*^9}, {3.6520965724298687`*^9, 3.6520965801736317`*^9}, {
3.6520966996589518`*^9, 3.652096707449771*^9}, 3.6520970160812483`*^9, {
3.652097060784092*^9, 3.652097061823122*^9}, {3.652097111000476*^9,
3.652097112807701*^9}, {3.652099168749013*^9, 3.652099227692267*^9}, {
3.6521004947501507`*^9, 3.652100500185996*^9}, {3.652111145095788*^9,
3.65211114880553*^9}, {3.652181244270027*^9, 3.652181247564686*^9},
3.65218758792272*^9, 3.652188208538278*^9, {3.652268563051075*^9,
3.6522685767752132`*^9}, 3.652272803753347*^9, 3.652272844797305*^9, {
3.6522796689093113`*^9, 3.6522796733629017`*^9}, 3.705850301204688*^9,
3.707744231956897*^9, {3.7386599699313383`*^9, 3.738659972840706*^9}, {
3.8485839158667717`*^9, 3.8485840018089857`*^9}},
CellLabel->"In[11]:=",ExpressionUUID->"652b6981-94cb-48f1-86b0-44f5985c8a1a"],
Cell[BoxData[
TagBox[
StyleBox[
DynamicModuleBox[{$CellContext`t$$ = 1, Typeset`show$$ = True,
Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu",
Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ =
"\"untitled\"", Typeset`specs$$ = {{
Hold[$CellContext`t$$], 1, 1521, 1}}, Typeset`size$$ = {
700., {114., 119.}}, Typeset`update$$ = 0, Typeset`initDone$$,
Typeset`skipInitDone$$ = True},
DynamicBox[Manipulate`ManipulateBoxes[
1, StandardForm, "Variables" :> {$CellContext`t$$ = 1},
"ControllerVariables" :> {},
"OtherVariables" :> {
Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$,
Typeset`animator$$, Typeset`animvar$$, Typeset`name$$,
Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$,
Typeset`skipInitDone$$}, "Body" :> Show[
$CellContext`DisplayWormModelB[
Partition[
Rest[
Part[$CellContext`data, $CellContext`t$$]], 3], Gray], Axes ->
False, PlotRange -> {{(-3) ($CellContext`w/2), $CellContext`w/
2}, {(-$CellContext`w)/3, $CellContext`w/3}}, AspectRatio -> 1/3,
ImageSize -> 700],
"Specifications" :> {{$CellContext`t$$, 1, 1521, 1}}, "Options" :> {},
"DefaultOptions" :> {}],
ImageSizeCache->{744., {159., 165.}},
SingleEvaluation->True],
Deinitialization:>None,
DynamicModuleValues:>{},
SynchronousInitialization->True,
UndoTrackedVariables:>{Typeset`show$$, Typeset`bookmarkMode$$},
UnsavedVariables:>{Typeset`initDone$$},
UntrackedVariables:>{Typeset`size$$}], "Manipulate",
Deployed->True,
StripOnInput->False],
Manipulate`InterpretManipulate[1]]], "Output",
CellChangeTimes->{3.864909031642405*^9},
CellLabel->"Out[11]=",ExpressionUUID->"7523f083-ccc8-43c7-af0c-ed942148a26f"]
}, Open ]]
}, Open ]]
}, Open ]]
},
WindowSize->{1109, 834},
WindowMargins->{{662, Automatic}, {Automatic, 213}},
FrontEndVersion->"13.0 for Mac OS X x86 (64-bit) (December 2, 2021)",
StyleDefinitions->"Default.nb",
ExpressionUUID->"da09cbbc-f163-495e-89d0-c70342bc9712"
]
(* End of Notebook Content *)
(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 267, 5, 30, "Input",ExpressionUUID->"f283e1d8-dbb8-424e-bb98-092ea85d3b35"],
Cell[CellGroupData[{
Cell[850, 29, 506, 8, 67, "Section",ExpressionUUID->"d7a18c6a-9dcf-46de-bdc5-c2cd8633570c"],
Cell[1359, 39, 339, 7, 30, "Input",ExpressionUUID->"98136792-ead2-4986-a972-2312439fc53c"],
Cell[CellGroupData[{
Cell[1723, 50, 258, 4, 54, "Subsection",ExpressionUUID->"4ac51072-d806-4554-bb7d-45ac6a861e33"],
Cell[1984, 56, 233, 5, 30, "Input",ExpressionUUID->"c51b0922-d9b0-47ed-b2c4-d50af61dee27"],
Cell[2220, 63, 2772, 53, 91, "Input",ExpressionUUID->"c5c71da9-4b05-44a6-9962-6bcc58b58da9"],
Cell[4995, 118, 1217, 27, 73, "Input",ExpressionUUID->"563b8098-f1ae-4c89-9e40-64dcb5d13645"],
Cell[6215, 147, 15254, 346, 500, "Input",ExpressionUUID->"c97a6e30-d713-4fcd-b27a-89df62768341"]
}, Open ]],
Cell[CellGroupData[{
Cell[21506, 498, 678, 10, 54, "Subsection",ExpressionUUID->"9936bc72-a3d9-45b8-b7f4-f8d051dcbef6"],
Cell[22187, 510, 1314, 20, 30, "Input",ExpressionUUID->"474a15bf-9a14-42a7-ad79-a9ac4baae226"],
Cell[23504, 532, 681, 11, 30, "Input",ExpressionUUID->"ee6ef83a-eb55-41a9-b853-1a8a7e377f2e"],
Cell[CellGroupData[{
Cell[24210, 547, 3183, 63, 136, "Input",ExpressionUUID->"652b6981-94cb-48f1-86b0-44f5985c8a1a"],
Cell[27396, 612, 1863, 39, 366, "Output",ExpressionUUID->"7523f083-ccc8-43c7-af0c-ed942148a26f"]
}, Open ]]
}, Open ]]
}, Open ]]
}
]
*)