{"id":51,"date":"2019-08-15T22:58:19","date_gmt":"2019-08-15T13:58:19","guid":{"rendered":"https:\/\/junk-box.net\/kuyo\/?p=51"},"modified":"2019-08-17T18:21:41","modified_gmt":"2019-08-17T09:21:41","slug":"diamond","status":"publish","type":"post","link":"https:\/\/junk-box.net\/kuyo\/index.php\/2019\/08\/15\/diamond\/","title":{"rendered":"Diamond"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-1024x576.png\" alt=\"\" class=\"wp-image-55\" srcset=\"https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-1024x576.png 1024w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-150x84.png 150w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-300x169.png 300w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-768x432.png 768w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3-50x28.png 50w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond1-3.png 1920w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p><em>\u3061\u3087\u3063\u3068\u304f\u3060\u3089\u306a\u3044\u7406\u7531\u3067\u5143\u753a\u306e\u30b8\u30e5\u30a8\u30ea\u30fc\u5e97\u306b\u884c\u3063\u3066\u304d\u307e\u3057\u305f\u3002<\/em><br><em>\u3075\u3068\u898b\u308b\u3068\u30ab\u30e9\u30c3\u30c8\u7d1a\u306e\u5927\u7c92\u30c0\u30a4\u30e4\u304c\u3042\u308a\u307e\u3059\u3002<\/em><br><em>\u898b\u3064\u3081\u3066\u3044\u308b\u3068\u9b42\u3092\u5438\u3044\u8fbc\u307e\u308c\u3066\u3044\u304d\u305d\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/em><br><em>\u5024\u6bb5\u3092\u898b\u307e\u3059\u3002<\/em><br><em>\u3075\u3080\u3001\u8cb7\u3048\u306a\u304f\u3082\u306a\u3044\u3002<\/em><br><em>\u672a\u3060\u30dc\u30fc\u30ca\u30b9\u306f\u624b\u4ed8\u304b\u305a\u3060\u3063\u305f\u306a\u2026\u2026\u3002<\/em><br>\u3053\u308c\u3001\u3044\u305f\u3060\u304d\u307e\u3059\u2026\u2026\u3002<br><em>\u306f\u3063\uff01 \u79c1\u306f\u4f55\u3092\u8003\u3048\u3066\u3044\u308b\u306e\u3060\uff1f<\/em><br><em>\u30c0\u30a4\u30e4\u306b\u8a98\u60d1\u3055\u308c\u3066\u3044\u308b\u81ea\u5206\u3092\u5fc5\u6b7b\u306b\u6291\u3048\u307e\u3059\u3002<\/em><\/p>\n\n\n\n<p>  \u3053\u308c\u307b\u3069\u307e\u3067\u306b\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u306f\u79c1\u306e\u5fc3\u3092\u9b45\u4e86\u3057\u307e\u3059\u3002<br> \u30e9\u30a6\u30f3\u30c9\u30fb\u30d6\u30ea\u30ea\u30a2\u30f3\u30c8\u30ab\u30c3\u30c8 \u306e\u5927\u7c92\u306e\u30c0\u30a4\u30e4\u3001\u305a\u3063\u3068\u305a\u3063\u3068\u773a\u3081\u3066\u3044\u305f\u3044\u3002 <br>\u8eca\u306e\u30c7\u30a3\u30fc\u30e9\u30fc\u3082\u305d\u3046\u306a\u306e\u3067\u3059\u304c\u3001\u30b8\u30e5\u30a8\u30ea\u30fc\u5e97\u306b\u306f\u884c\u3063\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u306d\u3002<br>\u6b32\u3057\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u3002<br>\u6c17\u304c\u4ed8\u3044\u305f\u3089\u8cb7\u3046\u524d\u63d0\u3067\u5e97\u54e1\u3068\u8a71\u3092\u3057\u3066\u3044\u305f\u308a\u3057\u307e\u3059\u3002<br>\u5371\u967a\u6975\u307e\u308a\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u6211\u306b\u8fd4\u3063\u3066\u30b8\u30e5\u30a8\u30ea\u30fc\u5e97\u3092\u5f8c\u306b\u3057\u305f\u306e\u3067\u3059\u304c\u30c0\u30a4\u30e4\u30e2\u30f3\u30c9\u304c\u8133\u88cf\u304b\u3089\u96e2\u308c\u307e\u305b\u3093\u3002<br>\u6b32\u3057\u3044\u3001\u6b32\u3057\u3044\u3001\u624b\u5143\u306b\u7f6e\u3044\u3066\u773a\u3081\u3066\u3044\u305f\u3044\u3002<br>\u3057\u304b\u3057\u8cb7\u3046\u308f\u3051\u306b\u306f\u3044\u304b\u306a\u3044\u306e\u3067\u3059\u3002<br>\u5b50\u4f9b\u306e\u587e\u4ee3\u3082\u3042\u308b\u3057\u3001\u5bb6\u306e\u30ed\u30fc\u30f3\u3060\u3063\u3066\u3042\u308b\u306e\u3067\u3059\u3002<br>\u3068\u3044\u3046\u3053\u3068\u3067\uff13D\u30e2\u30c7\u30eb\u3067\u6211\u6162\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<br>\u3069\u3046\u305b\u306a\u3089\u3070\u4f5c\u308a\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<p>\u30e9\u30a6\u30f3\u30c9\u30d6\u30ea\u30ea\u30a2\u30f3\u30c8\u30ab\u30c3\u30c8\u306f\u5bf8\u6cd5\u6bd4\u3084\u89d2\u5ea6\u304c\u7cbe\u5bc6\u306b\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u3082\u306e\u3060\u3068\u3070\u304b\u308a\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u3002<br>\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u6bd4\u8f03\u7684\u3086\u308b\u3044\u30eb\u30fc\u30eb\u3057\u304b\u306a\u3044\u3093\u3067\u3059\u306d\u3002<br>\u307e\u3042\u60f3\u50cf\u3059\u308b\u306b\u76f8\u624b\u306f\u81ea\u7136\u304b\u3089\u767a\u6398\u3055\u308c\u308b\u77f3\u3053\u308d\u306a\u306e\u3060\u304b\u3089\u3001\u53d6\u308c\u305f\u539f\u77f3\u306b\u5408\u308f\u305b\u3066\u30ab\u30c3\u30c8\u3059\u308b\u81ea\u7531\u5ea6\u3092\u6b8b\u3059\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3057\u3087\u3046\u306d\u3002<br>\u3068\u306f\u8a00\u3048\u3001\u5e7e\u4f55\u5b66\u56f3\u5f62\u306a\u306e\u3067\u3060\u3044\u305f\u3044\u306e\u5f62\u306f\u30b9\u30af\u30ea\u30d7\u30c8\u751f\u6210\u3067\u304d\u307e\u3059\u3002<br>\u4ee5\u4e0b\u30e9\u30a6\u30f3\u30c9\u30d6\u30ea\u30ea\u30a2\u30f3\u30c8\u30ab\u30c3\u30c8\u306e\uff13\uff24\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308bpython\u30b9\u30af\u30ea\u30d7\u30c8\u3067\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: python; title: ; notranslate\" title=\"\">\n# -*- coding: utf-8 -*-\nfrom mpl_toolkits.mplot3d import axes3d\nimport math\nimport matplotlib.pyplot as plt\nimport numpy as np\n\ndef rot_z(r, P):\n    # z\u8ef8\u3067\u56de\u8ee2\u884c\u5217\u3092\u8a08\u7b97\u3059\u308b\n    Rz = np.array(&#x5B;&#x5B; np.cos(r),  np.sin(r),    0.0       ],\n                   &#x5B;-np.sin(r),  np.cos(r),    0.0       ],\n                   &#x5B; 0.0,        0.0,          1.0       ]])\n    R = Rz.dot(P.T)\n    return R.T\n\ndef rot_y(r, P):\n    # y\u8ef8\u3067\u56de\u8ee2\u884c\u5217\u3092\u8a08\u7b97\u3059\u308b\n\n    Ry = np.array(&#x5B;&#x5B; np.cos(py),  0.0,        -np.sin(py)],\n                   &#x5B; 0.0,         1.0,         0.0       ],\n                   &#x5B; np.sin(py),  0.0,         np.cos(py)]])\n    R = Rz.dot(P.T)\n    return R.T\n\ndef rot_x(r, P):\n    # x\u8ef8\u3067\u56de\u8ee2\u884c\u5217\u3092\u8a08\u7b97\u3059\u308b\n    Rx = np.array(&#x5B;&#x5B; 1.0,         0.0,         0.0       ],\n                   &#x5B; 0.0,         np.cos(px), -np.sin(px)],\n                   &#x5B; 0.0,         np.sin(px),  np.cos(px)]])\n    R = Rz.dot(P.T)\n    return R.T\n\ndef mid_point(P , Q, par):\n    pp = par \/ 100.0\n    pq = (100.0 - par) \/ 100.0\n    PP = np.array(&#x5B;pp, pp, pp])\n    PQ = np.array(&#x5B;pq, pq, pq])\n    P = P * PP\n    Q = Q * PQ\n    R = P + Q\n    return R\n\ndef push_index(R):\n    global x\n    global y\n    global z\n    x.append(R&#x5B;0])\n    y.append(R&#x5B;1])\n    z.append(R&#x5B;2])\n\ndef print_v(s, P):\n    global v_num\n    v_num += 1\n    sr = s + &#039; &#039;\n    sr += &#039; {:.6f}&#039;.format(P&#x5B;0])\n    sr += &#039; {:.6f}&#039;.format(P&#x5B;1])\n    sr += &#039; {:.6f}&#039;.format(P&#x5B;2])\n    sr += &#039;\\n&#039;\n    return(sr)\n\n#\u5b9a\u6570\ntable_r = 0.55 \/ 2.0\ngirdle_r = 1.0 \/ 2.0\ncrown_height = 0.162\npavilion_height = 0.431\ngirdle_height = 0.025\nstar_ratio = 60.0\npavilion_ratio = 40.0\nculet_ratio = 2.5\ncenter = 50.0\nt = math.tan(math.pi\/8.0)\n\nx = &#x5B;]\ny = &#x5B;]\nz = &#x5B;]\nv_num = 0\n\n# table(auxiliary point)\nP_TA = np.array(&#x5B;])\nP_TA = np.empty((0,3), float)\nS = np.array(&#x5B;table_r, t * table_r, crown_height])\nfor num in range(0, 8):\n    R = rot_z(math.pi \/ 4 * num, S)\n    P_TA = np.append(P_TA, np.array(&#x5B;R]), axis=0)\n\n# table\nP_TB = np.array(&#x5B;])\nP_TB = np.empty((0,3), float)\nS = mid_point(P_TA&#x5B;0] , P_TA&#x5B;1], 50.0)\nfor num in range(0, 8):\n    R = rot_z(math.pi \/ 4 * num, S)\n    push_index(R)\n    P_TB = np.append(P_TB, np.array(&#x5B;R]), axis=0)\n\n# upper girdle(auxiliary point)\nP_UGA = np.array(&#x5B;])\nP_UGA = np.empty((0,3), float)\nS = np.array(&#x5B;girdle_r, t * girdle_r, 0])\nfor num in range(0, 8):\n    R = rot_z(math.pi \/ 4 * num, S)\n#    push_index(R)\n    P_UGA = np.append(P_UGA, np.array(&#x5B;R]), axis=0)\n\n# upper girdle\nP_UG = np.array(&#x5B;])\nP_UG = np.empty((0,3), float)\nS = mid_point(P_UGA&#x5B;0] , P_UGA&#x5B;1], center)\nfor num in range(0, 16):\n    R = rot_z(math.pi \/ 8 * num, S)\n    push_index(R)\n    P_UG = np.append(P_UG, np.array(&#x5B;R]), axis=0)\n\n# star facet\nP_SF = np.array(&#x5B;])\nP_SF = np.empty((0,3), float)\nfor num in range(0, 8):\n    R = mid_point(P_TA&#x5B;num] , P_UGA&#x5B;num], star_ratio)\n    push_index(R)\n    P_SF = np.append(P_SF, np.array(&#x5B;R]), axis=0)\n\n# culet\nP_CU = np.array(&#x5B;0, 0, -pavilion_height - girdle_height])\n\n# lower girdle(auxiliary point)\nP_LGA = np.array(&#x5B;])\nP_LGA = np.empty((0,3), float)\nS = np.array(&#x5B;girdle_r, t * girdle_r, -girdle_height])\nfor num in range(0, 8):\n    R = rot_z(math.pi \/ 4 * num, S)\n#    push_index(R)\n    P_LGA = np.append(P_LGA, np.array(&#x5B;R]), axis=0)\n\n# lower girdle\nP_LG = np.array(&#x5B;])\nP_LG = np.empty((0,3), float)\nS = mid_point(P_LGA&#x5B;0] , P_LGA&#x5B;1], center)\nfor num in range(0, 16):\n    R = rot_z(math.pi \/ 8 * num, S)\n    push_index(R)\n    P_LG = np.append(P_LG, np.array(&#x5B;R]), axis=0)\n\n# pavilion facet\nP_PF = np.array(&#x5B;])\nP_PF = np.empty((0,3), float)\nfor num in range(0, 8):\n    R = mid_point(P_LGA&#x5B;num] , P_CU, pavilion_ratio)\n    push_index(R)\n    P_PF = np.append(P_PF, np.array(&#x5B;R]), axis=0)\n\n# culet table\nP_QT = np.array(&#x5B;])\nP_QT = np.empty((0,3), float)\nfor num in range(0, 8):\n    R = mid_point(P_LGA&#x5B;num] , P_CU, culet_ratio)\n    push_index(R)\n    P_QT = np.append(P_QT, np.array(&#x5B;R]), axis=0)\n\n#make obj file\npath_w = &#039;.\/test_diamond.obj&#039;\ns = &#039;New file&#039;\nwith open(path_w, mode=&#039;w&#039;) as f:\n    f.write(&#039;g diamond\\n&#039;)\n    for num in range(0, 8):\n        f.write(print_v(&#039;v&#039;, P_TB&#x5B;num]))\n    for num in range(0, 8):\n        f.write(print_v(&#039;v&#039;, P_SF&#x5B;num]))\n    for num in range(0, 16):\n        f.write(print_v(&#039;v&#039;, P_UG&#x5B;num]))\n    for num in range(0, 16):\n        f.write(print_v(&#039;v&#039;, P_LG&#x5B;num]))\n    for num in range(0, 8):\n        f.write(print_v(&#039;v&#039;, P_PF&#x5B;num]))\n    for num in range(0, 8):\n        f.write(print_v(&#039;v&#039;, P_QT&#x5B;num]))\n\n    t_base = 0\n    s_base = 8\n    ug_base = 16\n    lg_base = 32\n    p_base = 48\n    c_base = 56\n\n    #Table Facet: 1\n    f.write(&#039;#Table Facet: num = 1\\n&#039;)\n    f.write(&#039;f 1 2 3 4 5 6 7 8\\n&#039;)\n\n    #Bezel Facet: 8\n    f.write(&#039;#Bezel Facet: num = 8\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 1 , s_base + 1, ug_base +  1, s_base + 2))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 2 , s_base + 2, ug_base +  3, s_base + 3))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 3 , s_base + 3, ug_base +  5, s_base + 4))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 4 , s_base + 4, ug_base +  7, s_base + 5))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 5 , s_base + 5, ug_base +  9, s_base + 6))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 6 , s_base + 6, ug_base + 11, s_base + 7))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 7 , s_base + 7, ug_base + 13, s_base + 8))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(t_base + 8 , s_base + 8, ug_base + 15, s_base + 1))\n\n    #Star Facet: 8\n    f.write(&#039;#Star Facet: num = 8\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 1 , s_base + 2, t_base + 2))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 2 , s_base + 3, t_base + 3))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 3 , s_base + 4, t_base + 4))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 4 , s_base + 5, t_base + 5))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 5 , s_base + 6, t_base + 6))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 6 , s_base + 7, t_base + 7))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 7 , s_base + 8, t_base + 8))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(t_base + 8 , s_base + 1, t_base + 1))\n\n    #Upper-Girdle Facet: 16\n    f.write(&#039;#Upper-Girdle Facet: num = 16\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 2 , ug_base +  1, ug_base +  2))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 2 , ug_base +  2, ug_base +  3))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 3 , ug_base +  3, ug_base +  4))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 3 , ug_base +  4, ug_base +  5))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 4 , ug_base +  5, ug_base +  6))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 4 , ug_base +  6, ug_base +  7))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 5 , ug_base +  7, ug_base +  8))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 5 , ug_base +  8, ug_base +  9))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 6 , ug_base +  9, ug_base + 10))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 6 , ug_base + 10, ug_base + 11))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 7 , ug_base + 11, ug_base + 12))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 7 , ug_base + 12, ug_base + 13))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 8 , ug_base + 13, ug_base + 14))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 8 , ug_base + 14, ug_base + 15))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 1 , ug_base + 15, ug_base + 16))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(s_base + 1 , ug_base + 16, ug_base +  1))\n\n    #Girdle: 16\n    f.write(&#039;#Girdle: num = 16\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  1, lg_base +  1 , lg_base +  2 , ug_base +  2))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  2, lg_base +  2 , lg_base +  3 , ug_base +  3))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  3, lg_base +  3 , lg_base +  4 , ug_base +  4))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  4, lg_base +  4 , lg_base +  5 , ug_base +  5))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  5, lg_base +  5 , lg_base +  6 , ug_base +  6))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  6, lg_base +  6 , lg_base +  7 , ug_base +  7))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  7, lg_base +  7 , lg_base +  8 , ug_base +  8))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  8, lg_base +  8 , lg_base +  9 , ug_base +  9))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base +  9, lg_base +  9 , lg_base + 10 , ug_base + 10))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 10, lg_base + 10 , lg_base + 11 , ug_base + 11))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 11, lg_base + 11 , lg_base + 12 , ug_base + 12))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 12, lg_base + 12 , lg_base + 13 , ug_base + 13))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 13, lg_base + 13 , lg_base + 14 , ug_base + 14))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 14, lg_base + 14 , lg_base + 15 , ug_base + 15))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 15, lg_base + 15 , lg_base + 16 , ug_base + 16))\n    f.write(&#039;f {:d} {:d} {:d} {:d}\\n&#039;.format(ug_base + 16, lg_base + 16 , lg_base +  1 , ug_base +  1))\n\n    #Lower-Girdle Facet: 16\n    f.write(&#039;#Lower-Girdle Facet: num = 16\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 2 , lg_base +  1, lg_base +  2))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 2 , lg_base +  2, lg_base +  3))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 3 , lg_base +  3, lg_base +  4))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 3 , lg_base +  4, lg_base +  5))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 4 , lg_base +  5, lg_base +  6))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 4 , lg_base +  6, lg_base +  7))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 5 , lg_base +  7, lg_base +  8))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 5 , lg_base +  8, lg_base +  9))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 6 , lg_base +  9, lg_base + 10))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 6 , lg_base + 10, lg_base + 11))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 7 , lg_base + 11, lg_base + 12))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 7 , lg_base + 12, lg_base + 13))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 8 , lg_base + 13, lg_base + 14))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 8 , lg_base + 14, lg_base + 15))\n\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 1 , lg_base + 15, lg_base + 16))\n    f.write(&#039;f {:d} {:d} {:d}\\n&#039;.format(p_base + 1 , lg_base + 16, lg_base +  1))\n\n    #Pavilion Facet: 8\n    f.write(&#039;#Pavilion Facet: num = 8\\n&#039;)\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base +  1 , p_base + 1, c_base + 1, c_base + 2, p_base + 2))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base +  3 , p_base + 2, c_base + 2, c_base + 3, p_base + 3))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base +  5 , p_base + 3, c_base + 3, c_base + 4, p_base + 4))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base +  7 , p_base + 4, c_base + 4, c_base + 5, p_base + 5))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base +  9 , p_base + 5, c_base + 5, c_base + 6, p_base + 6))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base + 11 , p_base + 6, c_base + 6, c_base + 7, p_base + 7))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base + 13 , p_base + 7, c_base + 7, c_base + 8, p_base + 8))\n    f.write(&#039;f {:d} {:d} {:d} {:d} {:d}\\n&#039;.format(lg_base + 15 , p_base + 8, c_base + 8, c_base + 1, p_base + 1))\n\n    #Culet: 1\n    f.write(&#039;#Culet: num = 1\\n&#039;)\n    f.write(&#039;f 57 58 59 60 61 62 63 64\\n&#039;)\n\n# plot\nfig = plt.figure()\nax = fig.add_subplot(111, projection=&#039;3d&#039;)\n\nax.set_xlabel(&quot;x&quot;)\nax.set_ylabel(&quot;y&quot;)\nax.set_zlabel(&quot;z&quot;)\n\nax.scatter(x, y, z)\n#ax.plot(x, y, z)\nplt.show()\n\n\n<\/pre><\/div>\n\n\n<p>\u3053\u306epython\u30b3\u30fc\u30c9\u306f\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306btest_diamond.obj\u3068\u3044\u30463D\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<br>\u5e7e\u3064\u304b\u306e\u8ffd\u52a0\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002<br>\u4e00\u5fdc\u751f\u6210\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u3082\u4ee5\u4e0b\u306b\u7f6e\u3044\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\ng diamond\nv  0.275000 -0.000000 0.162000\nv  0.194454 -0.194454 0.162000\nv  0.000000 -0.275000 0.162000\nv  -0.194454 -0.194454 0.162000\nv  -0.275000 -0.000000 0.162000\nv  -0.194454 0.194454 0.162000\nv  -0.000000 0.275000 0.162000\nv  0.194454 0.194454 0.162000\nv  0.365000 0.151188 0.097200\nv  0.365000 -0.151188 0.097200\nv  0.151188 -0.365000 0.097200\nv  -0.151188 -0.365000 0.097200\nv  -0.365000 -0.151188 0.097200\nv  -0.365000 0.151188 0.097200\nv  -0.151188 0.365000 0.097200\nv  0.151188 0.365000 0.097200\nv  0.500000 -0.000000 0.000000\nv  0.461940 -0.191342 0.000000\nv  0.353553 -0.353553 0.000000\nv  0.191342 -0.461940 0.000000\nv  0.000000 -0.500000 0.000000\nv  -0.191342 -0.461940 0.000000\nv  -0.353553 -0.353553 0.000000\nv  -0.461940 -0.191342 0.000000\nv  -0.500000 -0.000000 0.000000\nv  -0.461940 0.191342 0.000000\nv  -0.353553 0.353553 0.000000\nv  -0.191342 0.461940 0.000000\nv  -0.000000 0.500000 0.000000\nv  0.191342 0.461940 0.000000\nv  0.353553 0.353553 0.000000\nv  0.461940 0.191342 0.000000\nv  0.500000 -0.000000 -0.025000\nv  0.461940 -0.191342 -0.025000\nv  0.353553 -0.353553 -0.025000\nv  0.191342 -0.461940 -0.025000\nv  0.000000 -0.500000 -0.025000\nv  -0.191342 -0.461940 -0.025000\nv  -0.353553 -0.353553 -0.025000\nv  -0.461940 -0.191342 -0.025000\nv  -0.500000 -0.000000 -0.025000\nv  -0.461940 0.191342 -0.025000\nv  -0.353553 0.353553 -0.025000\nv  -0.191342 0.461940 -0.025000\nv  -0.000000 0.500000 -0.025000\nv  0.191342 0.461940 -0.025000\nv  0.353553 0.353553 -0.025000\nv  0.461940 0.191342 -0.025000\nv  0.200000 0.082843 -0.283600\nv  0.200000 -0.082843 -0.283600\nv  0.082843 -0.200000 -0.283600\nv  -0.082843 -0.200000 -0.283600\nv  -0.200000 -0.082843 -0.283600\nv  -0.200000 0.082843 -0.283600\nv  -0.082843 0.200000 -0.283600\nv  0.082843 0.200000 -0.283600\nv  0.012500 0.005178 -0.445225\nv  0.012500 -0.005178 -0.445225\nv  0.005178 -0.012500 -0.445225\nv  -0.005178 -0.012500 -0.445225\nv  -0.012500 -0.005178 -0.445225\nv  -0.012500 0.005178 -0.445225\nv  -0.005178 0.012500 -0.445225\nv  0.005178 0.012500 -0.445225\n#Table Facet: num = 1\nf 1 2 3 4 5 6 7 8\n#Bezel Facet: num = 8\nf 1 9 17 10\nf 2 10 19 11\nf 3 11 21 12\nf 4 12 23 13\nf 5 13 25 14\nf 6 14 27 15\nf 7 15 29 16\nf 8 16 31 9\n#Star Facet: num = 8\nf 1 10 2\nf 2 11 3\nf 3 12 4\nf 4 13 5\nf 5 14 6\nf 6 15 7\nf 7 16 8\nf 8 9 1\n#Upper-Girdle Facet: num = 16\nf 10 17 18\nf 10 18 19\nf 11 19 20\nf 11 20 21\nf 12 21 22\nf 12 22 23\nf 13 23 24\nf 13 24 25\nf 14 25 26\nf 14 26 27\nf 15 27 28\nf 15 28 29\nf 16 29 30\nf 16 30 31\nf 9 31 32\nf 9 32 17\n#Girdle: num = 16\nf 17 33 34 18\nf 18 34 35 19\nf 19 35 36 20\nf 20 36 37 21\nf 21 37 38 22\nf 22 38 39 23\nf 23 39 40 24\nf 24 40 41 25\nf 25 41 42 26\nf 26 42 43 27\nf 27 43 44 28\nf 28 44 45 29\nf 29 45 46 30\nf 30 46 47 31\nf 31 47 48 32\nf 32 48 33 17\n#Lower-Girdle Facet: num = 16\nf 50 33 34\nf 50 34 35\nf 51 35 36\nf 51 36 37\nf 52 37 38\nf 52 38 39\nf 53 39 40\nf 53 40 41\nf 54 41 42\nf 54 42 43\nf 55 43 44\nf 55 44 45\nf 56 45 46\nf 56 46 47\nf 49 47 48\nf 49 48 33\n#Pavilion Facet: num = 8\nf 33 49 57 58 50\nf 35 50 58 59 51\nf 37 51 59 60 52\nf 39 52 60 61 53\nf 41 53 61 62 54\nf 43 54 62 63 55\nf 45 55 63 64 56\nf 47 56 64 57 49\n#Culet: num = 1\nf 57 58 59 60 61 62 63 64\n\n<\/pre><\/div>\n\n\n<p>\u3053\u306e\u5185\u5bb9\u3092 test_diamond.obj \u3068\u3044\u3046\u540d\u524d\u3067\u4fdd\u5b58\u3059\u308c\u3070python\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002<br>\u3042\u3068\u306fBlender\u306a\u3069\u306e\uff13\uff24\u7de8\u96c6\u30c4\u30fc\u30eb\u306b\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308c\u3070\u826f\u3044\u308f\u3051\u3067\u3059\u3002<br>\u5c1a\u3001Blender\u3067\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\u5834\u5408\u304cZ\u304c\u4e0a\u3067\u3001\u6cd5\u7dda\u3092\u5916\u5074\u306b\u63c3\u3048\u3066\u4e0b\u3055\u3044\u3002<br>\u30de\u30c6\u30ea\u30a2\u30eb\u306f\u30b0\u30e9\u30b9BSDF\u3067IOR\u306f2.420\u3042\u305f\u308a\u306b\u30bb\u30c3\u30c8\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br>\u900f\u904e\u5c48\u6298\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u7dba\u9e97\u306b\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3059\u308b\u305f\u3081\u306b\u306f\u5468\u8fba\u74b0\u5883\u3068\u30e9\u30a4\u30c6\u30a3\u30f3\u30b0\u3092\u4f5c\u308a\u3053\u3080\u5fc5\u8981\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<br>\u30af\u30aa\u30ea\u30c6\u30a3\u30c6\u30a3\u3092\u8ffd\u6c42\u3059\u308b\u306b\u306f\u30c6\u30af\u304c\u5fc5\u8981\u3067\u3059\u306d\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-1024x576.png\" alt=\"\" class=\"wp-image-61\" srcset=\"https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-1024x576.png 1024w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-150x84.png 150w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-300x169.png 300w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-768x432.png 768w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2-50x28.png 50w, https:\/\/junk-box.net\/kuyo\/wp-content\/uploads\/2019\/08\/diamond2.png 1920w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>\u307e\u3060\u307e\u3060\u9b42\u304c\u5438\u3044\u8fbc\u307e\u308c\u305d\u3046\u306a\u753b\u50cf\u306b\u306f\u7a0b\u9060\u3044\u3067\u3059\u304c\u3001\u697d\u3057\u3044\u3082\u306e\u3067\u3059\u3002<br>\u3053\u306e\u8a18\u4e8b\u3092\u3054\u89a7\u306e\u3042\u306a\u305f\u3082\u305c\u3072\u304a\u8a66\u3057\u3042\u308c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3061\u3087\u3063\u3068\u304f\u3060\u3089\u306a\u3044\u7406\u7531\u3067\u5143\u753a\u306e\u30b8\u30e5\u30a8\u30ea\u30fc\u5e97\u306b\u884c\u3063\u3066\u304d\u307e\u3057\u305f\u3002\u3075\u3068\u898b\u308b\u3068\u30ab\u30e9\u30c3\u30c8\u7d1a\u306e\u5927\u7c92\u30c0\u30a4\u30e4\u304c\u3042\u308a\u307e\u3059\u3002\u898b\u3064\u3081\u3066\u3044\u308b\u3068\u9b42\u3092\u5438\u3044\u8fbc\u307e\u308c\u3066\u3044\u304d\u305d\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u5024\u6bb5\u3092\u898b\u307e\u3059\u3002\u3075\u3080\u3001\u8cb7\u3048\u306a\u304f\u3082\u306a\u3044\u3002\u672a\u3060\u30dc\u30fc\u30ca\u30b9\u306f\u624b\u4ed8\u304b\u305a\u3060\u3063\u305f\u306a &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/junk-box.net\/kuyo\/index.php\/2019\/08\/15\/diamond\/\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;Diamond&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":55,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-51","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-1"],"wppr_data":{"cwp_meta_box_check":"No"},"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":6,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":64,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/posts\/51\/revisions\/64"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/media\/55"}],"wp:attachment":[{"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/junk-box.net\/kuyo\/index.php\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}