Skip to content
Snippets Groups Projects
Topology Optimization 3D.ipynb 972 KiB
Newer Older
Amira Abdel-Rahman's avatar
Amira Abdel-Rahman committed
3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000
      " Change Stable for 966 iterations\n",
      " Change Stable for 967 iterations\n",
      " Change Stable for 968 iterations\n",
      " Change Stable for 969 iterations\n",
      " Change Stable for 970 iterations\n",
      " Change Stable for 971 iterations\n",
      " Change Stable for 972 iterations\n",
      " Change Stable for 973 iterations\n",
      " Change Stable for 974 iterations\n",
      " Change Stable for 975 iterations\n",
      " Change Stable for 976 iterations\n",
      " Change Stable for 977 iterations\n",
      " Change Stable for 978 iterations\n",
      " Change Stable for 979 iterations\n",
      " Change Stable for 980 iterations\n",
      " Change Stable for 981 iterations\n",
      " Change Stable for 982 iterations\n",
      " Change Stable for 983 iterations\n",
      " Change Stable for 984 iterations\n",
      " Change Stable for 985 iterations\n",
      " Penalty: 4.0\n",
      " Change Stable for 986 iterations\n",
      " Change Stable for 987 iterations\n",
      " Change Stable for 988 iterations\n",
      " Change Stable for 989 iterations\n",
      " Change Stable for 990 iterations\n",
      " Change Stable for 991 iterations\n",
      " Change Stable for 992 iterations\n",
      " Change Stable for 993 iterations\n",
      " Change Stable for 994 iterations\n",
      " Change Stable for 995 iterations\n",
      " Change Stable for 996 iterations\n",
      " Change Stable for 997 iterations\n",
      " Change Stable for 998 iterations\n",
      " Change Stable for 999 iterations\n",
      " Change Stable for 1000 iterations\n",
      " Change Stable for 1001 iterations\n",
      " Change Stable for 1002 iterations\n",
      " Change Stable for 1003 iterations\n",
      " Change Stable for 1004 iterations\n",
      " Change Stable for 1005 iterations\n",
      " Change Stable for 1006 iterations\n",
      " Change Stable for 1007 iterations\n",
      " Change Stable for 1008 iterations\n",
      " Change Stable for 1009 iterations\n",
      " Change Stable for 1010 iterations\n",
      " Change Stable for 1011 iterations\n",
      " Change Stable for 1012 iterations\n",
      " Change Stable for 1013 iterations\n",
      " Change Stable for 1014 iterations\n",
      " Change Stable for 1015 iterations\n",
      " Change Stable for 1016 iterations\n",
      " Change Stable for 1017 iterations\n",
      " Change Stable for 1018 iterations\n",
      " Change Stable for 1019 iterations\n",
      " Change Stable for 1020 iterations\n",
      " Change Stable for 1021 iterations\n",
      " Change Stable for 1022 iterations\n",
      " Change Stable for 1023 iterations\n",
      " Change Stable for 1024 iterations\n",
      " Change Stable for 1025 iterations\n",
      " Change Stable for 1026 iterations\n",
      " Change Stable for 1027 iterations\n",
      " Change Stable for 1028 iterations\n",
      " Change Stable for 1029 iterations\n",
      " Change Stable for 1030 iterations\n",
      " Change Stable for 1031 iterations\n",
      " Change Stable for 1032 iterations\n",
      " Change Stable for 1033 iterations\n",
      " Change Stable for 1034 iterations\n",
      " Change Stable for 1035 iterations\n",
      " Change Stable for 1036 iterations\n",
      " Change Stable for 1037 iterations\n",
      " Change Stable for 1038 iterations\n",
      " Change Stable for 1039 iterations\n",
      " Change Stable for 1040 iterations\n",
      " Change Stable for 1041 iterations\n",
      " Change Stable for 1042 iterations\n",
      " Change Stable for 1043 iterations\n",
      " Change Stable for 1044 iterations\n",
      " Change Stable for 1045 iterations\n",
      " Change Stable for 1046 iterations\n",
      " Change Stable for 1047 iterations\n",
      " Change Stable for 1048 iterations\n",
      " Change Stable for 1049 iterations\n",
      " Change Stable for 1050 iterations\n",
      " Change Stable for 1051 iterations\n",
      " Change Stable for 1052 iterations\n",
      " Change Stable for 1053 iterations\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " Change Stable for 1054 iterations\n",
      " Change Stable for 1055 iterations\n",
      " Change Stable for 1056 iterations\n",
      " Change Stable for 1057 iterations\n",
      " Change Stable for 1058 iterations\n",
      " Change Stable for 1059 iterations\n",
      " Change Stable for 1060 iterations\n",
      " Change Stable for 1061 iterations\n",
      " Change Stable for 1062 iterations\n",
      " Change Stable for 1063 iterations\n",
      " Change Stable for 1064 iterations\n",
      " Change Stable for 1065 iterations\n",
      " Change Stable for 1066 iterations\n",
      " Change Stable for 1067 iterations\n",
      " Change Stable for 1068 iterations\n",
      " Change Stable for 1069 iterations\n",
      " Change Stable for 1070 iterations\n",
      " Change Stable for 1071 iterations\n",
      " Change Stable for 1072 iterations\n",
      " Change Stable for 1073 iterations\n",
      " Change Stable for 1074 iterations\n",
      " Change Stable for 1075 iterations\n",
      " Change Stable for 1076 iterations\n",
      " Change Stable for 1077 iterations\n",
      " Change Stable for 1078 iterations\n",
      " Change Stable for 1079 iterations\n",
      " Change Stable for 1080 iterations\n",
      " Change Stable for 1081 iterations\n",
      " Change Stable for 1082 iterations\n",
      " Change Stable for 1083 iterations\n",
      " Change Stable for 1084 iterations\n",
      " Change Stable for 1085 iterations\n",
      " Change Stable for 1086 iterations\n",
      " Change Stable for 1087 iterations\n",
      " Change Stable for 1088 iterations\n",
      " Change Stable for 1089 iterations\n",
      " Change Stable for 1090 iterations\n",
      " Change Stable for 1091 iterations\n",
      " Change Stable for 1092 iterations\n",
      " Change Stable for 1093 iterations\n",
      " Change Stable for 1094 iterations\n",
      " Change Stable for 1095 iterations\n",
      " Change Stable for 1096 iterations\n",
      " Change Stable for 1097 iterations\n",
      " Change Stable for 1098 iterations\n",
      " Change Stable for 1099 iterations\n",
      " Change Stable for 1100 iterations\n",
      " Change Stable for 1101 iterations\n",
      " Change Stable for 1102 iterations\n",
      " Change Stable for 1103 iterations\n",
      " Change Stable for 1104 iterations\n",
      " Change Stable for 1105 iterations\n",
      " Change Stable for 1106 iterations\n",
      " Change Stable for 1107 iterations\n",
      " Change Stable for 1108 iterations\n",
      " Change Stable for 1109 iterations\n",
      " Change Stable for 1110 iterations\n",
      " Change Stable for 1111 iterations\n",
      " Change Stable for 1112 iterations\n",
      " Change Stable for 1113 iterations\n",
      " Change Stable for 1114 iterations\n",
      " Change Stable for 1115 iterations\n",
      " Change Stable for 1116 iterations\n",
      " Change Stable for 1117 iterations\n",
      " Change Stable for 1118 iterations\n",
      " Change Stable for 1119 iterations\n",
      " Change Stable for 1120 iterations\n",
      " Change Stable for 1121 iterations\n",
      " Change Stable for 1122 iterations\n",
      " Change Stable for 1123 iterations\n",
      " Change Stable for 1124 iterations\n",
      " Change Stable for 1125 iterations\n",
      " Change Stable for 1126 iterations\n",
      " Change Stable for 1127 iterations\n",
      " Change Stable for 1128 iterations\n",
      " Change Stable for 1129 iterations\n",
      " Change Stable for 1130 iterations\n",
      " Change Stable for 1131 iterations\n",
      " Change Stable for 1132 iterations\n",
      " Change Stable for 1133 iterations\n",
      " Change Stable for 1134 iterations\n",
      " Change Stable for 1135 iterations\n",
      " Change Stable for 1136 iterations\n",
      " Change Stable for 1137 iterations\n",
      " Change Stable for 1138 iterations\n",
      " Change Stable for 1139 iterations\n",
      " Change Stable for 1140 iterations\n",
      " Change Stable for 1141 iterations\n",
      " Change Stable for 1142 iterations\n",
      " Change Stable for 1143 iterations\n",
      " Change Stable for 1144 iterations\n",
      " Change Stable for 1145 iterations\n",
      " Change Stable for 1146 iterations\n",
      " Change Stable for 1147 iterations\n",
      " Change Stable for 1148 iterations\n",
      " Change Stable for 1149 iterations\n",
      " Change Stable for 1150 iterations\n",
      " Change Stable for 1151 iterations\n",
      " Change Stable for 1152 iterations\n",
      " Change Stable for 1153 iterations\n",
      " Change Stable for 1154 iterations\n",
      " Change Stable for 1155 iterations\n",
      " Change Stable for 1156 iterations\n",
      " Change Stable for 1157 iterations\n",
      " Change Stable for 1158 iterations\n",
      " Change Stable for 1159 iterations\n",
      " Change Stable for 1160 iterations\n",
      " Change Stable for 1161 iterations\n",
      " Change Stable for 1162 iterations\n",
      " Change Stable for 1163 iterations\n",
      " Change Stable for 1164 iterations\n",
      " Change Stable for 1165 iterations\n",
      " Change Stable for 1166 iterations\n",
      " Change Stable for 1167 iterations\n",
      " Change Stable for 1168 iterations\n",
      " Change Stable for 1169 iterations\n",
      " Change Stable for 1170 iterations\n",
      " Change Stable for 1171 iterations\n",
      " Change Stable for 1172 iterations\n",
      " Change Stable for 1173 iterations\n",
      " Change Stable for 1174 iterations\n",
      " Change Stable for 1175 iterations\n",
      " Change Stable for 1176 iterations\n",
      " Change Stable for 1177 iterations\n",
      " Change Stable for 1178 iterations\n",
      " Change Stable for 1179 iterations\n",
      " Change Stable for 1180 iterations\n",
      " Change Stable for 1181 iterations\n",
      " Change Stable for 1182 iterations\n",
      " Change Stable for 1183 iterations\n",
      " Change Stable for 1184 iterations\n",
      " Change Stable for 1185 iterations\n",
      " Change Stable for 1186 iterations\n",
      " Change Stable for 1187 iterations\n",
      " Change Stable for 1188 iterations\n",
      " Change Stable for 1189 iterations\n",
      " Change Stable for 1190 iterations\n",
      " Change Stable for 1191 iterations\n",
      " Change Stable for 1192 iterations\n",
      " Change Stable for 1193 iterations\n",
      " Change Stable for 1194 iterations\n",
      " Change Stable for 1195 iterations\n",
      " Change Stable for 1196 iterations\n",
      " Change Stable for 1197 iterations\n",
      " Change Stable for 1198 iterations\n",
      " Change Stable for 1199 iterations\n",
      " Change Stable for 1200 iterations\n",
      " Change Stable for 1201 iterations\n",
      " Change Stable for 1202 iterations\n",
      " Change Stable for 1203 iterations\n",
      " Change Stable for 1204 iterations\n",
      " Change Stable for 1205 iterations\n",
      " Change Stable for 1206 iterations\n",
      " Change Stable for 1207 iterations\n",
      " Change Stable for 1208 iterations\n",
      " Change Stable for 1209 iterations\n",
      " Change Stable for 1210 iterations\n",
      " Change Stable for 1211 iterations\n",
      " Change Stable for 1212 iterations\n",
      " Change Stable for 1213 iterations\n",
      " Change Stable for 1214 iterations\n",
      " Change Stable for 1215 iterations\n",
      " Change Stable for 1216 iterations\n",
      " Change Stable for 1217 iterations\n",
      " Change Stable for 1218 iterations\n",
      " Change Stable for 1219 iterations\n",
      " Change Stable for 1220 iterations\n",
      " Change Stable for 1221 iterations\n",
      " Change Stable for 1222 iterations\n",
      " Change Stable for 1223 iterations\n",
      " Change Stable for 1224 iterations\n",
      " Change Stable for 1225 iterations\n",
      " Change Stable for 1226 iterations\n",
      " Change Stable for 1227 iterations\n",
      " Change Stable for 1228 iterations\n",
      " Change Stable for 1229 iterations\n",
      " Change Stable for 1230 iterations\n",
      " Change Stable for 1231 iterations\n",
      " Change Stable for 1232 iterations\n",
      " Change Stable for 1233 iterations\n",
      " Change Stable for 1234 iterations\n",
      " Change Stable for 1235 iterations\n",
      " Change Stable for 1236 iterations\n",
      " Change Stable for 1237 iterations\n",
      " Change Stable for 1238 iterations\n",
      " Change Stable for 1239 iterations\n",
      " Change Stable for 1240 iterations\n",
      " Change Stable for 1241 iterations\n",
      " Change Stable for 1242 iterations\n",
      " Change Stable for 1243 iterations\n",
      " Change Stable for 1244 iterations\n",
      " Change Stable for 1245 iterations\n",
      " Change Stable for 1246 iterations\n",
      " Change Stable for 1247 iterations\n",
      " Change Stable for 1248 iterations\n",
      " Change Stable for 1249 iterations\n",
      " Change Stable for 1250 iterations\n",
      " Change Stable for 1251 iterations\n",
      " Change Stable for 1252 iterations\n",
      " Change Stable for 1253 iterations\n",
      " Change Stable for 1254 iterations\n",
      " Change Stable for 1255 iterations\n",
      " Change Stable for 1256 iterations\n",
      " Change Stable for 1257 iterations\n",
      " Change Stable for 1258 iterations\n",
      " Change Stable for 1259 iterations\n",
      " Change Stable for 1260 iterations\n",
      " Change Stable for 1261 iterations\n",
      " Change Stable for 1262 iterations\n",
      " Change Stable for 1263 iterations\n",
      " Change Stable for 1264 iterations\n",
      " Change Stable for 1265 iterations\n",
      " Change Stable for 1266 iterations\n",
      " Change Stable for 1267 iterations\n",
      " Change Stable for 1268 iterations\n",
      " Change Stable for 1269 iterations\n",
      " Change Stable for 1270 iterations\n",
      " Change Stable for 1271 iterations\n",
      " Change Stable for 1272 iterations\n",
      " Change Stable for 1273 iterations\n",
      " Change Stable for 1274 iterations\n",
      " Change Stable for 1275 iterations\n",
      " Change Stable for 1276 iterations\n",
      " Change Stable for 1277 iterations\n",
      " Change Stable for 1278 iterations\n",
      " Change Stable for 1279 iterations\n",
      " Change Stable for 1280 iterations\n",
      " Change Stable for 1281 iterations\n",
      " Change Stable for 1282 iterations\n",
      " Change Stable for 1283 iterations\n",
      " Change Stable for 1284 iterations\n",
      " Change Stable for 1285 iterations\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPAAAAB4CAAAAADp3SD7AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAALSSURBVHja7Zw9b9UwFIZfo0qFARVVYmJAYmBiYKuqqlLH7ox3ROI/MTDSv8AMQqwMVadKd7sLS6tOVSUIQ66bL3/eOE58znmWtqmT+PUTO4mTe1UFH8pbYin4swBP5q5kbkgFVgEHI6nAIUhg6uz5CpQzRofBzrAEpo4Epo4Epg6xwP6raWKB/Uhg6khg6khg6ij3TF+Jd8PuROwMS2DqOOe0SuzBPtgZlsDUIRjYfU9MMLAbxyhNcYwWww00/SoxvIWi3zqTGC4f8/2wPmbFME2aMYmdYQlMHQlMHcMoTfEqq4GdYQV0r01K9+u+zmJouNeH3+Ap7ueuU3IuW7/zNKwej/w16r9LQ9f/yPC/bhp2hh/jH+PXcGERxD3h5mu43VIlGR76fYWNI4cYHixeNKb+6647O8OWOa2qCMchnzXsI4Y1uvVKMN3GV18x3Ge5vXmXHszQcEvfJ3wOKLgE43a3/rpxNhzTK+a17Ju3ciGGd1w1G2PsAgwNd87DX/AxYtUljNc1MfXgbXgTuXKFnD15bO+tYWd4xCht2chEpPErhjUXWA2WBW8mOansAmK45gaHnUI/cBq7qWTYjrBd98bZsG7La7w1FPyDl7EbHM2Y+14bfA3r1rzCO2vhnziJ2+gIprALcDXcns3yt1+OM3PqsbmBo+GqvyCA9/gdt5NgXMdPirGBn+Fuiz5gP2LlmLurEDtT2wUYGu49W1pFrawA3OIgqKx/dmSqM28X7obDrpfbvMBz3AWWtc9z5ui9NewMD76pZZf2PMe38B0aluXpvTXsDI/6ZNo+PuBr5DrV4O3Wv9ayU8yhsDM86MPfcWYp+hrrRO3TvE3gL5MaMZxlp9ufOUdnjRjOtFtMOavhgp3hmT4hbruqnv45pBjOhWlmJcdzZnaGZxqlDRXJtB92hmf8Ho9nuAeg8C/r+17sDM/Yh+d5j4+dYQlMHQlMnf+HulqJlMh51AAAAABJRU5ErkJggg==",
      "text/plain": [
       "60×120 Array{Gray{Float64},2} with eltype Gray{Float64}:\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(1.0)\n",
       " ⋮                                       ⋱                    \n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)  …  Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)  …  Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)\n",
       " Gray{Float64}(1.0)  Gray{Float64}(1.0)     Gray{Float64}(0.0)"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Default input parameters\n",
    "volfrac=0.3\n",
    "rmin=5.4\n",
    "penal=3.0\n",
    "ft=1 # ft==0 -> sens, ft==1 -> dens\n",
    "maxIter=300\n",
    "\n",
    "xPhys=CompliantTopologyOptimization(nelx,nely,volfrac,rmin,penal,maxIter,Load,Support,Spring,DOut)\n",
    "Gray.(xPhys)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 219,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAAAAAAcD2kOAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QA/4ePzL8AAANlSURBVGje7Vu9jtNAEP7WiijhQIImHRLVCaRroEBwNa9Ay3vwGEhczzvwBJzorgbpRHMUXINoLiDBUGRt7//feNdOlGmiJDP7zTezXnt3xgIcoXLTjgXMkB0F3gAkykwLzXQpSTWL8ab3vsB9FmMlzNmkOcCkWWdCM4DJNM+CHnJ8Sop8K0p9GQlyyuZDzOBvwiguGbz0x+njK1+gHUSzJ9k7r2u/ogFKCZ0lfTLv+zw6uh3mC0CHTsx0r3brd/DvAKxDLyXenVT64/jvwr0iEcV+S1nJOtB7TyzEiT28nVLlv2ikrMEA4FhL/XOPZlhy1AX1Dj76Mtg8uHbAxjkg59LqBpWv9+RPL4WF6w2wrZgcbyVIrz0ZTF+OzIBHQx10Lv82LxKM5QLyNi14iaKYeBmtth9Xk7HtzXpE4RkjHGrGc3Ms3CFgBmwcehvqMxtRMGENH6zRxgVkIp6ppK1nnClxQ4OtqoGa5I3BVcYVcP1DdilKkyB/F0K9T3cAcF4D0kReA+ojghgXmWoZFgA+PzM86STu5U29mUVE9HR040nPWNTlq9BWOTP2e8XIBKizumSTy5AdPQPZMWDRFth4HuLtMfOJDlD5u61pgI1QN7yi2uXYILWUy6ldrGdjbFGsNbFNoKXk+AA8mVhzae8ZLxi41dq1HMZ1xI7jvjO27wDLYVx7J7M8xgfgicSaOnvPeDnA5iJa7zJe6E6i1bq1HMYVJXB62zLSOnBDXFIPytvh0kwnAoR5ZrVxltlYZgMeJ1fDKQ0AXV8tbXhQvgWWn5eb3JGK5TEAYCWPFR/WLoYM38ZiCOhTTYLbk3+zCKMWNeswHnJ7tdYw1GpqDWRvsaVzKlXANWVlqtWaYtH68aS0A4NtgdU+I1nz5DugFU89pfrZmhN8lhXbMWSO30Sty8XtvWS8npZ0QrPP3E1GALxtVbnxViZzqENp7MG6KzutXviUcru5gmbzts4JAMcjLn44mgVT6tqaTqwRjGR7ZLjlMCniWckR5G/GuDiBSzyNYQk6Lv32LbDy09NHTXTH5Y7pjz6nkuZhD3ztU/jpbHPWkERJ9Xv2xu7mreyDyan6a1Lzvn3NZSxwpW+y9FEtD/MuvqDBeyWFtT8eFx3WPZvBvMCGdyJwQ/SvqB+Zy/jwMl2G/AeLS0fD7gG5pAAAAABJRU5ErkJggg==",
      "text/plain": [
       "120×120 Array{Gray{Float64},2} with eltype Gray{Float64}:\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " ⋮                                       ⋱                    \n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)  …  Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)\n",
       " Gray{Float64}(0.0)  Gray{Float64}(0.0)     Gray{Float64}(1.0)"
      ]
     },
     "execution_count": 219,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Gray.(xPhys) \n",
    "# Gray.(xPhys[end:-1:1,:])\n",
    "xxx=vcat(xPhys[end:-1:1,:],xPhys)\n",
    "Gray.(1 .- xxx)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 175,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Minimum compliance problem with OC\n",
      "ndes: 60 x 20\n",
      "volfrac: 0.4 rmin: 1.5 penal: 3.0\n",
      "43200.0\n",
      "103240\n",
      " It:1 Obj:11962.173009116676 Vol:0.20000000000000004 ch:0.2 \n",
      " It:2 Obj:95697.37360469432 Vol:0.10003192232531125 ch:0.2 \n",
      " It:3 Obj:443324.00864808855 Vol:0.09992310479005387 ch:0.2 \n",
      " It:4 Obj:261711.62634145602 Vol:0.10005840821677169 ch:0.20000000000000007 \n",
      " It:5 Obj:212337.65131232055 Vol:0.0999302797155729 ch:0.19625397260153898 \n",
      " It:6 Obj:173600.36667067034 Vol:0.09997607369868877 ch:0.20000000000000007 \n",
      " It:7 Obj:150410.42135775986 Vol:0.10000424615611908 ch:0.20000000000000004 \n",
      " It:8 Obj:127962.62611283705 Vol:0.10001121054088659 ch:0.20000000000000007 \n",
      " It:9 Obj:115748.95888814985 Vol:0.10001051804635554 ch:0.20000000000000004 \n",
      " It:10 Obj:101896.02980106752 Vol:0.10005930238832814 ch:0.20000000000000007 \n",
      " It:11 Obj:92870.819138467 Vol:0.10000767044190365 ch:0.20000000000000007 \n",
      " It:12 Obj:77333.24862763958 Vol:0.1000313303877065 ch:0.20000000000000007 \n",
      " It:13 Obj:63185.45205754813 Vol:0.10005399943208382 ch:0.20000000000000007 \n",
      " It:14 Obj:44615.46041004278 Vol:0.10002516939486478 ch:0.20000000000000007 \n",
      " It:15 Obj:30026.553522955586 Vol:0.09993984769191196 ch:0.20000000000000007 \n",
      " It:16 Obj:20458.60894323521 Vol:0.1000105041382848 ch:0.20000000000000007 \n",
      " It:17 Obj:14796.9576929131 Vol:0.10004563921285352 ch:0.20000000000000007 \n",
      " It:18 Obj:11689.991348003325 Vol:0.10002412204538359 ch:0.20000000000000007 \n",
      " It:19 Obj:9777.743061585443 Vol:0.09995485236705179 ch:0.19885557573355161 \n",
      " It:20 Obj:8698.735638262868 Vol:0.10001338062693803 ch:0.20000000000000007 \n",
      " It:21 Obj:8018.38620941117 Vol:0.10003446046665654 ch:0.19999999999999996 \n",
      " It:22 Obj:7589.324880715997 Vol:0.10002981514947144 ch:0.20000000000000007 \n",
      " It:23 Obj:7313.995072436354 Vol:0.09997267393797218 ch:0.20000000000000007 \n",
      " It:24 Obj:7150.919750170102 Vol:0.09999780635551031 ch:0.19999999999999996 \n",
      " It:25 Obj:7019.325907819124 Vol:0.10003180964102867 ch:0.2 \n",
      " It:26 Obj:6933.648772862865 Vol:0.1000000107218357 ch:0.20000000000000007 \n",
      " It:27 Obj:6857.248699070812 Vol:0.10002132314453623 ch:0.20000000000000007 \n",
      " It:28 Obj:6785.471205514017 Vol:0.10000878217503993 ch:0.19999999999999996 \n",
      " It:29 Obj:6712.7067632384405 Vol:0.10001545977515192 ch:0.20000000000000007 \n",
      " It:30 Obj:6663.372991530805 Vol:0.09998785153499634 ch:0.20000000000000007 \n",
      " It:31 Obj:6605.298326006589 Vol:0.100002790222736 ch:0.20000000000000007 \n",
      " It:32 Obj:6545.118814467589 Vol:0.09997705394839049 ch:0.19999999999999996 \n",
      " It:33 Obj:6493.163371942648 Vol:0.10000561240420652 ch:0.19999999999999996 \n",
      " It:34 Obj:6462.683787149101 Vol:0.1000199498590172 ch:0.06896591828759169 \n",
      " It:35 Obj:6435.582422822976 Vol:0.09997608734592617 ch:0.06781187294843538 \n",
      " It:36 Obj:6429.968633739874 Vol:0.10001454616197661 ch:0.06207410605698738 \n",
      " It:37 Obj:6409.361380200666 Vol:0.09999510478718628 ch:0.07794262983960704 \n",
      " It:38 Obj:6402.98368285262 Vol:0.09999183549405839 ch:0.1125199390780357 \n",
      " It:39 Obj:6389.438287596747 Vol:0.1000118010975279 ch:0.1389470708708721 \n",
      " It:40 Obj:6376.178848434467 Vol:0.1000214859143916 ch:0.12102927984841105 \n",
      " It:41 Obj:6365.541213080839 Vol:0.10001752253826204 ch:0.07754866991032161 \n",
      " It:42 Obj:6360.367422969659 Vol:0.09999989383035515 ch:0.04558881484770072 \n",
      " It:43 Obj:6356.908542177172 Vol:0.09997466163142618 ch:0.04345603776201157 \n",
      " It:44 Obj:6355.107350969029 Vol:0.10001176128209288 ch:0.03966477535115731 \n",
      " It:45 Obj:6344.77797380835 Vol:0.10000738828057165 ch:0.03896852480838131 \n",
      " It:46 Obj:6340.4823359575375 Vol:0.09998042643384684 ch:0.03659724921934471 \n",
      " It:47 Obj:6339.5312005802625 Vol:0.10001196394488891 ch:0.0360018749154819 \n",
      " It:48 Obj:6329.347883098046 Vol:0.10000531991100053 ch:0.03695694175265418 \n",
      " It:49 Obj:6325.687818154467 Vol:0.10002570817437942 ch:0.03789334425915983 \n",
      " It:50 Obj:6316.564168963778 Vol:0.10002493519245974 ch:0.055393789843103586 \n",
      " It:51 Obj:6311.139053740666 Vol:0.09998800017918325 ch:0.0859321946509031 \n",
      " It:52 Obj:6307.486965388899 Vol:0.1000042836040583 ch:0.14589092337465165 \n",
      " It:53 Obj:6291.833920571402 Vol:0.09998999521241729 ch:0.19999999999999996 \n",
      " It:54 Obj:6274.778086142693 Vol:0.0999745241332703 ch:0.19999999999999996 \n",
      " It:55 Obj:6263.756580464783 Vol:0.10001757139857773 ch:0.12339151198976261 \n",
      " It:56 Obj:6249.590612264951 Vol:0.10001471919823081 ch:0.03393557048493612 \n",
      " It:57 Obj:6246.955077132851 Vol:0.10002026383383009 ch:0.030889175145225378 \n",
      " It:58 Obj:6242.505599081329 Vol:0.10002288265065219 ch:0.03113382883154925 \n",
      " It:59 Obj:6241.418162824504 Vol:0.10000598809542666 ch:0.029794598771932357 \n",
      " It:60 Obj:6241.637660034608 Vol:0.09998886200665405 ch:0.02826848990458941 \n",
      " It:61 Obj:6244.124537024549 Vol:0.09999197470397495 ch:0.02677465046454952 \n",
      " It:62 Obj:6242.062864729367 Vol:0.1000265943738417 ch:0.026892116905973484 \n",
      " It:63 Obj:6238.134972463837 Vol:0.10001452303944443 ch:0.025508996466282907 \n",
      " It:64 Obj:6239.191630903352 Vol:0.10001667649089008 ch:0.024095982280584294 \n",
      " It:65 Obj:6239.815370906206 Vol:0.1000220086127212 ch:0.0227262480236895 \n",
      " It:66 Obj:6238.51903666902 Vol:0.1000141123977851 ch:0.022060040951965232 \n",
      " It:67 Obj:6241.021001945366 Vol:0.09997394732317427 ch:0.026559935404875973 \n",
      " It:68 Obj:6246.20374135815 Vol:0.09999486372093687 ch:0.033082895010146246 \n",
      " It:69 Obj:6244.601007938554 Vol:0.09999249864194229 ch:0.042040665448560416 \n",
      " It:70 Obj:6245.311828949899 Vol:0.1000111458761327 ch:0.05520411256424096 \n",
      " It:71 Obj:6244.884792609323 Vol:0.0999745998760748 ch:0.07414248276700663 \n",
      " It:72 Obj:6250.634463236177 Vol:0.09997552106911871 ch:0.10268620577876214 \n",
      " It:73 Obj:6252.075237073141 Vol:0.10002720012824859 ch:0.14309563640818507 \n",
      " It:74 Obj:6244.9543496194365 Vol:0.10000909904151413 ch:0.18692118160888527 \n",
      " It:75 Obj:6250.07243740379 Vol:0.09998496071360496 ch:0.17556586638831329 \n",
      " It:76 Obj:6254.4760169714955 Vol:0.10002090931055113 ch:0.03288225374296361 \n",
      " It:77 Obj:6247.703135463185 Vol:0.09999838143730506 ch:0.03096925612617074 \n",
      " It:78 Obj:6248.64073562217 Vol:0.09997995134758025 ch:0.03016880464279903 \n",
      " It:79 Obj:6250.331781033963 Vol:0.10001536426257478 ch:0.028039723586798737 \n",
      " It:80 Obj:6243.153179079924 Vol:0.10002010061424182 ch:0.025522694013984437 \n",
      " It:81 Obj:6242.342965019074 Vol:0.10000588661179727 ch:0.024590193343981603 \n",
      " It:82 Obj:6242.525046494369 Vol:0.09998948728141173 ch:0.02388389547815417 \n",
      " It:83 Obj:6244.213674716348 Vol:0.09997815425522781 ch:0.02312526266349535 \n",
      " It:84 Obj:6243.7826260431575 Vol:0.10001365238769758 ch:0.02145658092118008 \n",
      " It:85 Obj:6238.3330756658015 Vol:0.09997513097726052 ch:0.02052166914564746 \n",
      " It:86 Obj:6242.226840002589 Vol:0.09998100988304252 ch:0.020339400576534605 \n",
      " It:87 Obj:6240.627355901734 Vol:0.10001031840741392 ch:0.018809408793178495 \n",
      " It:88 Obj:6235.035716074013 Vol:0.09997392322329453 ch:0.018223260408825714 \n",
      " It:89 Obj:6239.828585690256 Vol:0.09998544163880546 ch:0.018104787241738918 \n",
      " It:90 Obj:6236.402568315815 Vol:0.10000727586949484 ch:0.016937240749467453 \n",
      " It:91 Obj:6233.115703696965 Vol:0.09998489653981422 ch:0.016459403522395666 \n",
      " It:92 Obj:6234.955705718511 Vol:0.09998256313491552 ch:0.016550187000648586 \n",
      " It:93 Obj:6234.732316266455 Vol:0.10002415614644149 ch:0.015588261990220675 \n",
      " It:94 Obj:6227.768624259415 Vol:0.09998292391169454 ch:0.015273145102023655 \n",
      " It:95 Obj:6233.462987867732 Vol:0.10000432790655907 ch:0.015484233579348694 \n",
      " It:96 Obj:6229.015964003502 Vol:0.10002371651380833 ch:0.01472649582899771 \n",
      " It:97 Obj:6226.360898970592 Vol:0.10000884142789236 ch:0.014529243458483443 \n",
      " It:98 Obj:6227.484805740067 Vol:0.10000541323914322 ch:0.014845089429374292 \n",
      " It:99 Obj:6227.644500964738 Vol:0.09999450009012957 ch:0.014897779837103775 \n",
      " It:100 Obj:6228.05844895467 Vol:0.09998423871633567 ch:0.015187766871117059 \n",
      " It:101 Obj:6229.102732495178 Vol:0.09997622352279435 ch:0.015319186311104516 \n",
      " It:102 Obj:6229.065534147116 Vol:0.100020742825454 ch:0.015031871064862257 \n",
      " It:103 Obj:6222.756365927963 Vol:0.09998349235335385 ch:0.01485725363437762 \n",
      " It:104 Obj:6227.286248181783 Vol:0.10000131676890502 ch:0.015343269837616913 \n",
      " It:105 Obj:6224.324756593172 Vol:0.099971968348639 ch:0.015340402636165207 \n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " It:106 Obj:6227.569143028177 Vol:0.0999804520524124 ch:0.015658564061982516 \n",
      " It:107 Obj:6225.8335234054475 Vol:0.10001576076966325 ch:0.015190868230883392 \n",
      " It:108 Obj:6220.334862435072 Vol:0.09998618234804564 ch:0.015098005611570209 \n",
      " It:109 Obj:6224.354236748468 Vol:0.10000172623218913 ch:0.015139128272545432 \n",
      " It:110 Obj:6221.15785045815 Vol:0.0999747790711943 ch:0.014931122688629339 \n",
      " It:111 Obj:6224.605615726193 Vol:0.09998629286356783 ch:0.014703007928933032 \n",
      " It:112 Obj:6221.90827880178 Vol:0.10001940364389035 ch:0.013980046957357828 \n",
      " It:113 Obj:6217.241294856585 Vol:0.09999852464629884 ch:0.013439222926343142 \n",
      " It:114 Obj:6219.612243319665 Vol:0.10000906353432452 ch:0.012962916447419398 \n",
      " It:115 Obj:6217.691957866182 Vol:0.09999403081565213 ch:0.012307985852295505 \n",
      " It:116 Obj:6219.140275861796 Vol:0.0999984196538965 ch:0.011658284706703048 \n",
      " It:117 Obj:6218.041950005164 Vol:0.09998768201256349 ch:0.010918487683398218 \n",
      " It:118 Obj:6218.9100970322725 Vol:0.09998910291446012 ch:0.010194971365736424 \n",
      " It:119 Obj:6218.259918631438 Vol:0.09998159206822199 ch:0.009442670664909378 \n"
     ]
    },
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"\n",
       "     width=\"25mm\" height=\"25mm\" viewBox=\"0 0 1 1\">\n",
       "    <rect width=\"1\" height=\"1\" fill=\"#FFFFFF\" stroke=\"none\"/>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "Gray{Float64}(1.0)"
      ]
     },
     "execution_count": 175,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function topologyOptimization3d(nelx,nely,nelz,volfrac,rmin,penal)\n",
    "    function lk_H8(nu)\n",
    "        A = [32 6 -8 6 -6 4 3 -6 -10 3 -3 -3 -4 -8;\n",
    "            -48 0 0 -24 24 0 0 0 12 -12 0 12 12 12];\n",
    "        k = 1/144*A'*[1; nu];\n",
    "\n",
    "        K1 = [k[1]   k[2]   k[2]   k[3]  k[5]  k[5];\n",
    "              k[2]   k[1]   k[2]   k[4]  k[6]  k[7];\n",
    "              k[2]   k[2]   k[1]   k[4]  k[7]  k[6];\n",
    "              k[3]   k[4]   k[4]   k[1]  k[8]  k[8];\n",
    "              k[5]   k[6]   k[7]   k[8]  k[1]  k[2];\n",
    "              k[5]   k[7]   k[6]   k[8]  k[2]  k[1]];\n",
    "        K2 = [k[9]   k[8]   k[12]  k[6]  k[4]  k[7];\n",
    "              k[8]   k[9]   k[12]  k[5]  k[3]  k[5];\n",
    "              k[10]  k[10]  k[13]  k[7]  k[4]  k[6];\n",
    "              k[6]   k[5]   k[11]  k[9]  k[2]  k[10];\n",
    "              k[4]   k[3]   k[5]   k[2]  k[9]  k[12]\n",
    "              k[11]  k[4]   k[6]   k[12] k[10] k[13]];\n",
    "        K3 = [k[6]   k[7]   k[4]   k[9]  k[12] k[8];\n",
    "              k[7]   k[6]   k[4]   k[10] k[13] k[10];\n",
    "              k[5]   k[5]   k[3]   k[8]  k[12] k[9];\n",
    "              k[9]   k[10]  k[2]   k[6]  k[11] k[5];\n",
    "              k[12]  k[13]  k[10]  k[11] k[6]  k[4];\n",
    "              k[2]   k[12]  k[9]   k[4]  k[5]  k[3]];\n",
    "        K4 = [k[14]  k[11]  k[11]  k[13] k[10] k[10];\n",
    "              k[11]  k[14]  k[11]  k[12] k[9]  k[8];\n",
    "              k[11]  k[11]  k[14]  k[12] k[8]  k[9];\n",
    "              k[13]  k[12]  k[12]  k[14] k[7]  k[7];\n",
    "              k[10]  k[9]   k[8]   k[7]  k[14] k[11];\n",
    "              k[10]  k[8]   k[9]   k[7]  k[11] k[14]];\n",
    "        K5 = [k[1]   k[2]   k[8]   k[3]  k[5]  k[4];\n",
    "              k[2]   k[1]   k[8]   k[4]  k[6]  k[11];\n",
    "              k[8]   k[8]   k[1]   k[5]  k[11] k[6];\n",
    "              k[3]   k[4]   k[5]   k[1]  k[8]  k[2];\n",
    "              k[5]   k[6]   k[11]  k[8]  k[1]  k[8];\n",
    "              k[4]   k[11]  k[6]   k[2]  k[8]  k[1]];\n",
    "        K6 = [k[14]  k[11]  k[7]   k[13] k[10] k[12];\n",
    "              k[11]  k[14]  k[7]   k[12] k[9]  k[2];\n",
    "              k[7]   k[7]   k[14]  k[10] k[2]  k[9];\n",
    "              k[13]  k[12]  k[10]  k[14] k[7]  k[11];\n",
    "              k[10]  k[9]   k[2]   k[7]  k[14] k[7];\n",
    "              k[12]  k[2]   k[9]   k[11] k[7]  k[14]];\n",
    "        KE = 1/((nu+1)*(1-2*nu))*[ K1  K2  K3  K4;K2'  K5  K6  K3';K3' K6  K5' K2';K4  K3  K2  K1'];\n",
    "\n",
    "        return KE\n",
    "    end\n",
    "    println(\"Minimum compliance problem with OC\")\n",
    "    println(\"ndes: $nelx x $nely\")\n",
    "    println(\"volfrac: $volfrac rmin: $rmin penal: $penal\")\n",
    "    # Max and min stiffness\n",
    "    Emin=1e-9\n",
    "    Emax=1.0\n",
    "    nu=0.3\n",
    "    # dofs:\n",
    "    ndof = 3*(nelx+1)*(nely+1)*(nelz+1)\n",
    "    # Allocate design variables (as array), initialize and allocate sens.\n",
    "    x=volfrac * ones(Float64,nely,nelx,nelz)\n",
    "    xold=copy(x)\n",
    "    xPhys=copy(x)\n",
    "    g=0 # must be initialized to use the NGuyen/Paulino OC approach\n",
    "    dc=zeros(Float64,(nely,nelx,nelz))\n",
    "    \n",
    "    # FE: Build the index vectors for the for coo matrix format.\n",
    "    KE=lk_H8(nu)\n",
    "    nele = nelx*nely*nelz\n",
    "    \n",
    "    nodenrs = reshape(1:(1+nelx)*(1+nely)*(1+nelz),1+nely,1+nelx,1+nelz)\n",
    "    edofVec = reshape(3*nodenrs[1:end-1,1:end-1,1:end-1].+1,nelx*nely*nelz,1)\n",
    "    edofMat = repeat(edofVec,1,24).+repeat([0 1 2 3*nely.+[3 4 5 0 1 2] -3 -2 -1 3*(nely+1)*(nelx+1).+[0 1 2 3*nely.+[3 4 5 0 1 2] -3 -2 -1]],nelx*nely*nelz,1)\n",
    "        \n",
    "    iK = convert(Array{Int},reshape(kron(edofMat,ones(24,1))',24*24*nele,1))\n",
    "    jK = convert(Array{Int},reshape(kron(edofMat,ones(1,24))',24*24*nele,1))\n",
    "    \n",
    "    \n",
    "    \n",
    "    \n",
    "    # USER-DEFINED LOAD DOFs\n",
    "    m= Matlab.meshgrid(nelx:nelx, 0:0, 0:nelz)\n",
    "    il=m[1]\n",
    "    jl=m[2]\n",
    "    kl=m[3]\n",
    "    loadnid = kl.*(nelx+1).*(nely+1).+il.*(nely+1).+(nely+1 .-jl)\n",
    "    loaddof = 3 .*loadnid[:] .- 1; \n",
    "    # USER-DEFINED SUPPORT FIXED DOFs\n",
    "    m= Matlab.meshgrid(0:0,0:nely,0:nelz)# Coordinates\n",
    "    iif=m[1]\n",
    "    jf=m[2]\n",
    "    kf=m[3]\n",
    "    fixednid = kf.*(nelx+1).*(nely+1) .+iif .*(nely .+1) .+(nely .+1 .-jf) # Node IDs\n",
    "    fixeddof = [3 .*fixednid[:]; 3 .*fixednid[:].-1; 3 .*fixednid[:].-2] # DOFs\n",
    "    \n",
    "    \n",
    "    # DEFINE LOADS AND SUPPORTS (HALF MBB-BEAM)\n",
    "    F= sparse(loaddof,fill(1,length(loaddof)),fill(-1,length(loaddof)),ndof,1);\n",
    "    U = zeros(ndof,1)\n",
    "    alldofs = 1:ndof\n",
    "    freedofs = setdiff(1:ndof,fixeddof)\n",
    "    \n",
    "    \n",
    "    \n",
    "    # Prepare filter\n",
    "    #iH = ones(convert(Int,nele*(2*(ceil(rmin)-1)+1)^2),1)\n",
    "    #jH = ones(Int,size(iH))\n",
    "    #sH = zeros(size(iH))\n",
    "    iH=[]\n",
    "    jH=[]\n",
    "    sH=[]\n",
    "    k = 0\n",
    "\n",
    "    for k1 = 1:nelz\n",
    "        for i1 = 1:nelx\n",
    "            for j1 = 1:nely\n",
    "                e1 = (k1-1)*nelx*nely + (i1-1)*nely+j1\n",
    "                for k2 = max(k1-(ceil(rmin)-1),1):min(k1+(ceil(rmin)-1),nelz)\n",
    "                    for i2 = max(i1-(ceil(rmin)-1),1):min(i1+(ceil(rmin)-1),nelx)\n",
    "                        for j2 = max(j1-(ceil(rmin)-1),1):min(j1+(ceil(rmin)-1),nely)\n",
    "                            e2 = (k2-1)*nelx*nely + (i2-1)*nely+j2;\n",
    "                            k = k+1;\n",
    "                            append!(iH, e1  )\n",
    "                            append!(jH, e2  )\n",
    "                            append!(sH, max(0.0,rmin-sqrt((i1-i2)^2+(j1-j2)^2+(k1-k2)^2) ))\n",
    "                            \n",
    "                        end\n",
    "                    end\n",
    "                end\n",
    "            end\n",
    "        end\n",
    "    end\n",
    "    iH=reshape(iH,length(iH),1)\n",
    "    jH=reshape(jH,length(jH),1)\n",
    "    sH=reshape(convert(Array{Float64}, sH),length(sH),1)\n",
    "    H = sparse(vec(iH),vec(jH),vec(sH))\n",
    "    Hs = sum(H,dims=2)\n",
    "    ###################################################\n",
    "    loop = 0\n",
    "    change = 1\n",
    "    maxIter=1000\n",
    "    # Start iteration\n",
    "    for i =1:maxIter\n",
    "        if (change > 0.01)\n",
    "            # Start iteration\n",
    "            loop += 1\n",
    "            # FE-ANALYSIS\n",
    "            sK = reshape(KE[:]*(Emin.+xPhys[:]'.^penal*(Emax-Emin)),24*24*nelx*nely*nelz,1)\n",
    "            K = sparse(vec(iK),vec(jK),vec(sK)); K = (K+K')/2\n",
    "            @timed U[freedofs] = K[freedofs,freedofs] \\ Array(F[freedofs])\n",
    "            # Objective function and sensitivity analysis\n",
    "            ce = reshape(sum((U[edofMat]*KE).*U[edofMat],dims=2),nely,nelx,nelz)\n",
    "            c = sum(sum(sum((Emin.+xPhys.^penal*(Emax-Emin)).*ce)))\n",
    "            \n",
    "            dc = -penal*(Emax-Emin)*xPhys.^(penal-1).*ce\n",
    "            dv = ones(nely,nelx,nelz)\n",
    "            dc[:] = H*(dc[:]./Hs)\n",
    "            dv[:] = H*(dv[:]./Hs)\n",
    "            # OPTIMALITY CRITERIA UPDATE OF DESIGN VARIABLES AND PHYSICAL DENSITIES\n",
    "            l1 = 0; l2 = 1e9; move = 0.2; xnew = 0\n",
    "            while (l2-l1)/(l1+l2) > 1e-3\n",
    "                lmid = 0.5*(l2+l1)\n",
    "                xnew = max.(0,max.(x.-move,min.(1,min.(x.+move,x.*sqrt.((0.0.-dc)./dv./lmid)))))\n",
    "                xPhys[:] = (H*xnew[:])./Hs\n",
    "                if sum(xPhys[:]) > volfrac*nelx*nely\n",
    "                    l1 = lmid\n",
    "                else\n",
    "                    l2 = lmid\n",
    "                end\n",
    "            end\n",
    "            change = maximum(abs.(xnew[:].-x[:]))\n",
    "            x = xnew\n",
    "            m=mean(xPhys[:])\n",
    "            println(\" It:$loop Obj:$c Vol:$m ch:$change \")\n",
    "\n",
    "            xPhys = copy(x)\n",
    "        end\n",
    "    end\n",
    "    return xPhys\n",
    "end\n",
    "nelx=60\n",
    "nely=20\n",
    "nelz=4\n",
    "volfrac=0.4\n",
    "rmin=1.5\n",
    "penal=3.0\n",
    "\n",
    "xPhys=topologyOptimization3d(nelx,nely,nelz,volfrac,rmin,penal)\n",
    "Gray.(xPhys[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n",
       "<svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"600\" height=\"400\" viewBox=\"0 0 2400 1600\">\n",
       "<defs>\n",
       "  <clipPath id=\"clip7900\">\n",
       "    <rect x=\"0\" y=\"0\" width=\"2400\" height=\"1600\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<path clip-path=\"url(#clip7900)\" d=\"\n",
       "M0 1600 L2400 1600 L2400 0 L0 0  Z\n",
       "  \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n",
       "<defs>\n",
       "  <clipPath id=\"clip7901\">\n",
       "    <rect x=\"480\" y=\"0\" width=\"1681\" height=\"1600\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<defs>\n",
       "  <clipPath id=\"clip7902\">\n",
       "    <rect x=\"140\" y=\"47\" width=\"2213\" height=\"1441\"/>\n",
       "  </clipPath>\n",
       "</defs>\n",
       "<path clip-path=\"url(#clip7902)\" d=\"\n",
       "M140.517 1294.52 L140.517 626.107 L950.253 47.2441 L2352.76 240.198 L2352.76 908.612 L1543.02 1487.47 L140.517 1294.52  Z\n",
       "  \" fill=\"#ffffff\" fill-rule=\"evenodd\" fill-opacity=\"1\"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  157.785,1296.9 967.52,718.033 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  967.52,718.033 967.52,49.6198 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  382.042,1327.75 1191.78,748.886 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1191.78,748.886 1191.78,80.4727 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  606.299,1358.6 1416.03,779.739 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1416.03,779.739 1416.03,111.326 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  830.556,1389.45 1640.29,810.592 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1640.29,810.592 1640.29,142.179 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1054.81,1420.31 1864.55,841.445 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1864.55,841.445 1864.55,173.032 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1279.07,1451.16 2088.81,872.298 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  2088.81,872.298 2088.81,203.884 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1503.33,1482.01 2313.06,903.151 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  2313.06,903.151 2313.06,234.737 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1699.29,1375.76 296.788,1182.81 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  296.788,1182.81 296.788,514.392 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  1898.17,1233.59 495.665,1040.63 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  495.665,1040.63 495.665,372.219 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  2097.05,1091.41 694.543,898.459 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  694.543,898.459 694.543,230.046 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  2295.92,949.24 893.42,756.286 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  893.42,756.286 893.42,87.8724 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  140.517,1142.85 950.253,563.987 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  950.253,563.987 2352.76,756.941 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  140.517,976.908 950.253,398.045 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  950.253,398.045 2352.76,590.999 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  140.517,810.966 950.253,232.103 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  950.253,232.103 2352.76,425.058 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  140.517,645.024 950.253,66.1615 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7902)\" style=\"stroke:#000000; stroke-width:2; stroke-opacity:0.1; fill:none\" points=\"\n",
       "  950.253,66.1615 2352.76,259.116 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,1294.52 1543.02,1487.47 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1543.02,1487.47 2352.76,908.612 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,1294.52 140.517,626.107 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  157.785,1296.9 167.501,1289.95 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  382.042,1327.75 391.758,1320.8 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  606.299,1358.6 616.015,1351.66 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  830.556,1389.45 840.272,1382.51 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1054.81,1420.31 1064.53,1413.36 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1279.07,1451.16 1288.79,1444.21 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1503.33,1482.01 1513.04,1475.07 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1699.29,1375.76 1682.46,1373.44 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  1898.17,1233.59 1881.34,1231.27 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  2097.05,1091.41 2080.22,1089.1 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  2295.92,949.24 2279.09,946.925 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,1142.85 150.234,1135.9 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,976.908 150.234,969.962 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,810.966 150.234,804.02 \n",
       "  \"/>\n",
       "<polyline clip-path=\"url(#clip7900)\" style=\"stroke:#000000; stroke-width:4; stroke-opacity:1; fill:none\" points=\"\n",
       "  140.517,645.024 150.234,638.078 \n",
       "  \"/>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 133.785, 1350.9)\" x=\"133.785\" y=\"1350.9\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 358.042, 1381.75)\" x=\"358.042\" y=\"1381.75\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 582.299, 1412.6)\" x=\"582.299\" y=\"1412.6\">20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 806.556, 1443.45)\" x=\"806.556\" y=\"1443.45\">30</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1030.81, 1474.31)\" x=\"1030.81\" y=\"1474.31\">40</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1255.07, 1505.16)\" x=\"1255.07\" y=\"1505.16\">50</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1479.33, 1536.01)\" x=\"1479.33\" y=\"1536.01\">60</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1723.29, 1429.76)\" x=\"1723.29\" y=\"1429.76\">-10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 1922.17, 1287.59)\" x=\"1922.17\" y=\"1287.59\">0</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 2121.05, 1145.41)\" x=\"2121.05\" y=\"1145.41\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:middle;\" transform=\"rotate(0, 2319.92, 1003.24)\" x=\"2319.92\" y=\"1003.24\">20</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 116.517, 1160.35)\" x=\"116.517\" y=\"1160.35\">5</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 116.517, 994.408)\" x=\"116.517\" y=\"994.408\">10</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 116.517, 828.466)\" x=\"116.517\" y=\"828.466\">15</text>\n",
       "</g>\n",
       "<g clip-path=\"url(#clip7900)\">\n",
       "<text style=\"fill:#000000; fill-opacity:1; font-family:Arial,Helvetica Neue,Helvetica,sans-serif; font-size:48px; text-anchor:end;\" transform=\"rotate(0, 116.517, 662.524)\" x=\"116.517\" y=\"662.524\">20</text>\n",
       "</g>\n",
       "<path clip-path=\"url(#clip7902)\" d=\"M539.247 996.959 L539.247 1028.96 L571.247 1028.96 L571.247 996.959 L539.247 996.959 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"0.6\" stroke=\"none\"/>\n",
       "<path clip-path=\"url(#clip7902)\" d=\"M559.134 982.741 L559.134 1014.74 L591.134 1014.74 L591.134 982.741 L559.134 982.741 Z\" fill=\"#000000\" fill-rule=\"evenodd\" fill-opacity=\"0.6\" stroke=\"none\"/>\n",