Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 20406f8

Browse files
fixed the 90 degree issue and implemented correct angle calculations (prob more optimized tho tbh)
1 parent e3895da commit 20406f8

File tree

1 file changed

+59
-76
lines changed

1 file changed

+59
-76
lines changed

Prototype_2_Electric_Boogalooo.ipynb

Lines changed: 59 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"colab": {
66
"provenance": [],
77
"mount_file_id": "1YJfEK8zha4PfUk2yP9y-XbO4vtmn83gE",
8-
"authorship_tag": "ABX9TyOoSdmIwcnRtNDwE6FOVEpE",
8+
"authorship_tag": "ABX9TyP54LxKBJts0KXl7EfJYOpo",
99
"include_colab_link": true
1010
},
1111
"kernelspec": {
@@ -41,7 +41,7 @@
4141
"execution_count": 1,
4242
"metadata": {
4343
"id": "gmwahO7oITMz",
44-
"outputId": "110ba097-a5c4-4494-a7c1-aa65c48dcfdc",
44+
"outputId": "0da9dc4e-93dc-42cf-b100-08d7b4c71d37",
4545
"colab": {
4646
"base_uri": "https://localhost:8080/"
4747
}
@@ -51,7 +51,7 @@
5151
"output_type": "stream",
5252
"name": "stdout",
5353
"text": [
54-
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m33.9/33.9 MB\u001b[0m \u001b[31m26.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
54+
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m33.9/33.9 MB\u001b[0m \u001b[31m25.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
5555
"\u001b[?25h"
5656
]
5757
}
@@ -71,7 +71,7 @@
7171
"colab": {
7272
"base_uri": "https://localhost:8080/"
7373
},
74-
"outputId": "c03887ef-25c2-457b-bfaf-0a57168034ae"
74+
"outputId": "da995b40-a76c-4fb6-aa62-053f9857a59f"
7575
},
7676
"execution_count": 2,
7777
"outputs": [
@@ -122,7 +122,7 @@
122122
"metadata": {
123123
"id": "whZwvEdKIksm"
124124
},
125-
"execution_count": 1,
125+
"execution_count": 3,
126126
"outputs": []
127127
},
128128
{
@@ -164,7 +164,7 @@
164164
" pointcz = pointc.z - pointb.z\n",
165165
" lineba = np.sqrt((pointax**2) + (pointay**2) + (pointaz**2))\n",
166166
" linebc = np.sqrt((pointcx**2) + (pointcy**2) + (pointcz**2))\n",
167-
" lineac = np.sqrt((lineba**2) + (linebc**2))\n",
167+
" lineac = np.sqrt(((pointax - pointcx)**2) + ((pointay - pointcy)**2) + ((pointaz - pointcz)**2))\n",
168168
" return np.arccos(((lineba**2) + (linebc**2) - (lineac**2)) / (2 * lineba * linebc)) * 180 / np.pi # use law of cos to find angle\n",
169169
"\n",
170170
" # Feedback function\n",
@@ -246,7 +246,7 @@
246246
"metadata": {
247247
"id": "RHyJwan8acCz"
248248
},
249-
"execution_count": 22,
249+
"execution_count": 9,
250250
"outputs": []
251251
},
252252
{
@@ -463,11 +463,11 @@
463463
"id": "GHzmhoO6Jc50",
464464
"colab": {
465465
"base_uri": "https://localhost:8080/",
466-
"height": 1000
466+
"height": 946
467467
},
468-
"outputId": "097010c7-cdfd-4860-d1b6-cb01c4b68245"
468+
"outputId": "1e6496c0-a400-42f6-c3e7-32bc40138807"
469469
},
470-
"execution_count": 23,
470+
"execution_count": 10,
471471
"outputs": [
472472
{
473473
"name": "stdout",
@@ -598,73 +598,56 @@
598598
"output_type": "stream",
599599
"name": "stdout",
600600
"text": [
601-
"90.0\n",
601+
"151.74670426095005\n",
602+
"Try Straightening Your Legs More\n",
603+
"145.63584187183648\n",
604+
"Try Straightening Your Hip Somewhat\n",
605+
"125.48940335322602\n",
606+
"Try Straightening Your Arm Somewhat\n",
607+
"119.90699298115345\n",
608+
"131.5003810391885\n",
609+
"Try Straightening Your Hip Somewhat\n",
610+
"144.48894921799766\n",
611+
"148.0784247451263\n",
612+
"142.3273248196901\n",
613+
"151.00213414568185\n",
614+
"143.7034300667958\n",
615+
"151.03920238505685\n",
616+
"140.1864742235204\n",
617+
"151.03631684921675\n",
618+
"137.69514306790325\n",
619+
"Good Form\n",
620+
"136.23460516244432\n",
621+
"145.3138472669328\n",
622+
"64.77438320935693\n",
623+
"Try Straightening Your Arm Somewhat\n",
624+
"132.3635310195223\n",
625+
"Good Form\n",
626+
"162.21729692070457\n",
627+
"Try Straightening Your Hip Somewhat\n",
628+
"160.55587511041517\n",
629+
"113.46127060312281\n",
630+
"Try Straightening Your Arm Somewhat\n",
631+
"144.24639824297526\n",
632+
"Try Straightening Your Hip Somewhat\n",
633+
"142.63812073569318\n",
634+
"73.9877011177219\n",
635+
"Try Straightening Your Arm Somewhat\n",
636+
"111.79160583383167\n",
637+
"96.26150067712139\n",
638+
"161.21508426527072\n",
639+
"Try Straightening Your Hip Somewhat\n",
640+
"49.27067916017131\n",
602641
"Try Straightening Your Arm Somewhat\n",
603-
"90.00000000000001\n",
604-
"90.0\n",
605-
"90.0\n",
606-
"90.0\n",
607-
"90.00000000000001\n",
608-
"90.0\n",
609-
"90.0\n",
610-
"90.0\n",
611-
"90.0\n",
612-
"90.0\n",
613-
"90.0\n",
614-
"90.0\n",
615-
"90.0\n",
616-
"90.0\n",
617-
"90.0\n",
618-
"90.00000000000001\n",
619-
"90.0\n",
620-
"90.0\n",
621-
"90.0\n",
622-
"90.0\n",
623-
"90.0\n",
624-
"90.0\n",
625-
"90.0\n",
626-
"90.0\n",
627-
"90.00000000000001\n",
628-
"89.99999999999999\n",
629-
"90.0\n",
630-
"90.0\n",
631-
"89.99999999999999\n",
632-
"90.0\n",
633-
"89.99999999999999\n",
634-
"90.00000000000001\n",
635-
"90.0\n",
636-
"89.99999999999999\n",
637-
"90.0\n",
638-
"90.0\n",
639-
"90.00000000000001\n",
640-
"90.00000000000001\n",
641-
"89.99999999999999\n",
642-
"90.0\n",
643-
"90.00000000000001\n",
644-
"90.00000000000001\n",
645-
"90.00000000000001\n",
646-
"90.0\n",
647-
"90.00000000000001\n",
648-
"90.0\n",
649-
"90.00000000000001\n",
650-
"90.0\n",
651-
"90.0\n",
652-
"90.00000000000001\n",
653-
"90.0\n",
654-
"90.0\n",
655-
"90.0\n",
656-
"90.0\n",
657-
"90.0\n",
658-
"90.0\n",
659-
"90.0\n",
660-
"90.0\n",
661-
"90.0\n",
662-
"90.00000000000001\n",
663-
"90.0\n",
664-
"90.0\n",
665-
"90.00000000000001\n",
666-
"90.0\n",
667-
"90.00000000000001\n"
642+
"127.23101723124641\n",
643+
"135.6345074470225\n",
644+
"Try Straightening Your Legs More\n",
645+
"160.15049269556965\n",
646+
"Try Straightening Your Hip Somewhat\n",
647+
"155.35445283586643\n",
648+
"168.57687558518435\n",
649+
"164.40498506301168\n",
650+
"135.97759158323575\n"
668651
]
669652
}
670653
]

0 commit comments

Comments
 (0)