2024-08-29 13:25:00 +08:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="zh-Hant" dir="ltr">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
2024-08-31 06:08:36 +08:00
|
|
|
<title>mbcp.mp_math.segment | MBCP 文檔</title>
|
|
|
|
<meta name="description" content="MBCP 粒子計算和生成庫文檔">
|
2024-08-29 13:25:00 +08:00
|
|
|
<meta name="generator" content="VitePress v1.3.4">
|
2024-09-07 00:44:54 +08:00
|
|
|
<link rel="preload stylesheet" href="/assets/style.Czi07tLB.css" as="style">
|
2024-08-29 13:25:00 +08:00
|
|
|
|
2024-09-07 00:53:20 +08:00
|
|
|
<script type="module" src="/assets/app.BSLaYTq9.js"></script>
|
|
|
|
<link rel="modulepreload" href="/assets/chunks/theme.5eFoszBF.js">
|
2024-08-31 07:55:26 +08:00
|
|
|
<link rel="modulepreload" href="/assets/chunks/framework.DpC1ZpOZ.js">
|
2024-09-06 19:50:17 +08:00
|
|
|
<link rel="modulepreload" href="/assets/zht_api_mp_math_segment.md.CqQitARa.lean.js">
|
2024-08-31 06:08:36 +08:00
|
|
|
<link rel="icon" type="image/svg+xml" href="/mbcp-logo.svg">
|
2024-08-31 07:31:49 +08:00
|
|
|
<link rel="stylesheet" href="https://fonts.font.im/css?family=Cousine:400,400i,700,700i|Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i">
|
2024-08-29 13:25:00 +08:00
|
|
|
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
|
|
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2024-09-04 19:22:16 +08:00
|
|
|
<div id="app"><div class="Layout" data-v-3b4648ff><!--[--><!--]--><!--[--><span tabindex="-1" data-v-e813112c></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-e813112c> Skip to content </a><!--]--><!----><header class="VPNav" data-v-3b4648ff data-v-e823d444><div class="VPNavBar has-sidebar top" data-v-e823d444 data-v-da0688be><div class="wrapper" data-v-da0688be><div class="container" data-v-da0688be><div class="title" data-v-da0688be><div class="VPNavBarTitle has-sidebar" data-v-da0688be data-v-606a7e0f><a class="title" href="/zht/" data-v-606a7e0f><!--[--><!--]--><!--[--><img class="VPImage logo" src="/mbcp-logo.svg" alt data-v-cc63e071><!--]--><span data-v-606a7e0f>MBCP 文檔</span><!--[--><!--]--></a></div></div><div class="content" data-v-da0688be><div class="content-body" data-v-da0688be><!--[--><!--]--><div class="VPNavBarSearch search" data-v-da0688be><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="打開搜索框"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">搜索文檔</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-da0688be data-v-bf53b681><span id="main-nav-aria-label" class="visually-hidden" data-v-bf53b681> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/guide/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>指引</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/refer.html" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>參考</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/api/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>API引用</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/zht/demo/" tabindex="0" data-v-bf53b681 data-v-9a0da802><!--[--><span data-v-9a0da802>示範</span><!--]--></a><!--]--><!--]--></nav><div class="VPFlyout VPNavBarTranslations translations" data-v-da0688be data-v-912817b1 data-v-00660109><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="Change language" data-v-00660109><span class="text" data-v-00660109><span class="vpi-languages option-icon" data-v-00660109></span><!----><span class="vpi-chevron-down text-icon" data-v-00660109></span></span></button><div class="menu" data-v-00660109><div class="VPMenu" data-v-00660109 data-v-809b8af7><!----><!--[--><!--[--><div class="items" data-v-912817b1><p class="title" data-v-912817b1>繁體中文</p><!--[--><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/api/mp_math/segment.html" data-v-25a54821><!--[-->简体中文<!--]--></a></div><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/en/api/mp_math/segment.html" data-v-25a54821><!--[-->English<!--]--></a></div><div class="VPMenuLink" data-v-912817b1 data-v-25a54821><a class="VPLink link" href="/ja/api/mp_math/segment.html" data-v-25a54821><!--[-->日本語<!--]--></a></div><!--]--></div><!--]--><!--]--></div></div></div><div class="VPNavBarAppearance appearance" data-v-da0688be data-v-864d2abc><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title="Switch to dark theme" aria-checked="false" data-v-864d2abc data-v-3125216b data-v-846fe538><span class="check" data-v-846fe538><span class="icon" data-v-846fe538><!--[--><span class="vpi-sun sun" data-v-3125216b></span><span class="vpi-moon moon" data-v-3125216b></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-da0688be data-v-2c606308 data-v-100434c4><!--[--><a class="VPSocialLink no-icon" href="https://github.com/snowykami/mbcp" aria-label="github" target="
|
2024-08-29 13:25:00 +08:00
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p1</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> p2</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '方向向量'</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2 </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">-</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '长度'</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.length </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.direction.length</span></span>
|
|
|
|
<span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> '中心点'</span></span>
|
2024-09-03 22:49:39 +08:00
|
|
|
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.midpoint </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> Point3((</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.x </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.x) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.y </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.y) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p1.z </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">+</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> self</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.p2.z) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">/</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> 2</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div></details></div></div></main><footer class="VPDocFooter" data-v-01c90815 data-v-28deee4a><!--[--><!--]--><div class="edit-info" data-v-28deee4a><div class="edit-link" data-v-28deee4a><a class="VPLink link vp-external-link-icon no-icon edit-link-button" href="https://github.com/snowykami/mbcp/tree/main/mbcp//mp_math/segment.py" target="_blank" rel="noreferrer" data-v-28deee4a><!--[--><span class="vpi-square-pen edit-link-icon" data-v-28deee4a></span> 於 GitHub 上編輯這頁<!--]--></a></div><!----></div><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-28deee4a><span class="visually-hidden" id="doc-footer-aria-label" data-v-28deee4a>Pager</span><div class="pager" data-v-28deee4a><a class="VPLink link pager-link prev" href="/zht/api/mp_math/point.html" data-v-28deee4a><!--[--><span class="desc" data-v-28deee4a>上一頁</span><span class="title" data-v-28deee4a>mbcp.mp_math.point</span><!--]--></a></div><div class="pager" data-v-28deee4a><a class="VPLink link pager-link next" href="/zht/api/mp_math/utils.html" data-v-28deee4a><!--[--><span class="desc" data-v-28deee4a>下一頁</span><span class="title" data-v-28deee4a>mbcp.mp_math.utils</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-3b4648ff data-v-d69bcf5d><div class="container" data-v-d69bcf5d><p class="message" data-v-d69bcf5d>文檔由 <a href="https://vitepress.dev/">VitePress</a> 構建 | API引用由 <a href="https://github.com/LiteyukiStudio/litedoc">litedoc</a> 生成</p><p class="copyright" data-v-d69bcf5d>Copyright (C) 2020-2024 SnowyKami. All Rights Reserved</p></div></footer><!--[--><!--]--></div></div>
|
2024-09-07 00:53:20 +08:00
|
|
|
<script>window.__VP_HASH_MAP__=JSON.parse("{\"api_index.md\":\"BO3OGCZm\",\"api_mp_math_angle.md\":\"o2FjFJVM\",\"api_mp_math_const.md\":\"B_APaY-d\",\"api_mp_math_equation.md\":\"7eZhFpxb\",\"api_mp_math_function.md\":\"CDW7K4aO\",\"api_mp_math_index.md\":\"BfSAi6YB\",\"api_mp_math_line.md\":\"BufsPjQ4\",\"api_mp_math_mp_math_typing.md\":\"D0jHaHho\",\"api_mp_math_plane.md\":\"BI-yBOVt\",\"api_mp_math_point.md\":\"9lQO7e_B\",\"api_mp_math_segment.md\":\"JYVgLepk\",\"api_mp_math_utils.md\":\"BRgMKXyU\",\"api_mp_math_vector.md\":\"Bmtslkkm\",\"api_particle_index.md\":\"BnaJlvrB\",\"api_presets_index.md\":\"Cn3tbiU4\",\"api_presets_model_index.md\":\"DTQNHoYw\",\"demo_best-practice.md\":\"CmYjfrxd\",\"demo_index.md\":\"CVAdlaFI\",\"en_api_index.md\":\"C0-LRrMB\",\"en_api_mp_math_angle.md\":\"BxI_io2D\",\"en_api_mp_math_const.md\":\"f-2wQHW5\",\"en_api_mp_math_equation.md\":\"BDw5boDN\",\"en_api_mp_math_function.md\":\"l19FY4Hu\",\"en_api_mp_math_index.md\":\"BiDCWhuz\",\"en_api_mp_math_line.md\":\"N84NCcFr\",\"en_api_mp_math_mp_math_typing.md\":\"A2oAWINP\",\"en_api_mp_math_plane.md\":\"Dcl5f694\",\"en_api_mp_math_point.md\":\"BtS25597\",\"en_api_mp_math_segment.md\":\"D0wpX8Us\",\"en_api_mp_math_utils.md\":\"C-COPCw_\",\"en_api_mp_math_vector.md\":\"DJV8Xiz8\",\"en_api_particle_index.md\":\"j3_p5KtY\",\"en_api_presets_index.md\":\"Bj8HQN_s\",\"en_api_presets_model_index.md\":\"CF6gWxhr\",\"en_demo_best-practice.md\":\"CmtY105n\",\"en_guide_index.md\":\"C3kI8f8A\",\"en_index.md\":\"Cc-Nt9Ot\",\"en_refer_index.md\":\"Cq6GWi0V\",\"guide_index.md\":\"CJOqvlSE\",\"index.md\":\"WVpbC1C1\",\"ja_api_index.md\":\"CGngNEPX\",\"ja_api_mp_math_angle.md\":\"BsVW1_45\",\"ja_api_mp_math_const.md\":\"kKAd6ihV\",\"ja_api_mp_math_equation.md\":\"Cvdc0kei\",\"ja_api_mp_math_function.md\":\"pJM1NJ2m\",\"ja_api_mp_math_index.md\":\"BCReRKfD\",\"ja_api_mp_math_line.md\":\"ACj3eb2t\",\"ja_api_mp_math_mp_math_typing.md\":\"CzEPV5Ep\",\"ja_api_mp_math_plane.md\":\"BLythjEi\",\"ja_api_mp_math_point.md\":\"gujIoqh8\",\"ja_api_mp_math_segment.md\":\"DZAkmIjJ\",\"ja_api_mp_math_utils.md\":\"crOIcdWW\",\"ja_api_mp_math_vector.md\":\"XtCcd31y\",\"ja_api_particle_index.md\":\"CW1rqarC\",\"ja_api_presets_index.md\":\"BFc_PfJb\",\"ja_api_presets_model_index.md\":\"wZZUhvvV\",\"ja_demo_best-practice.md\":\"CBHiF6ec\",\"ja_guide_index.md\":\"w1Tf2Adm\",\"ja_index.md\":\"BvjV8RIJ\",\"ja_refer_index.md\":\"DamUscs8\",\"refer_7-differential-euqtion_index.md\":\"Dd2-7I9S\",\"refer_function_curry.md\":\"D_oqRDd3\",\"refer_function_function.md\":\"Bi_82lIJ\",\"refer_index.md\":\"yFZW0kI4\",\"zht_api_index.md\":\"Bh7ICG6U\",\"zht_api_mp_math_angle.md\":\"DK9un2Dh\",\"zht_api_mp_math_const.md\":\"D9eBwcNw\",\"zht_api_mp_math_equation.md\":\"U4JCwJwD\",\"zht_api_mp_math_function.md\":\"3Rru8vfk\",\"zht_api_mp_math_index.md\":\"DVqLRZhm\",\"zht_api_mp_math_line.md\":\"CqvSdHr8\",\"zht_api_mp_math_mp_math_typing.md\":\"DWzRfFJe\",\"zht_api_mp_math_plane.md\":\"u8cWUecu\",\"zht_api_mp_math_point.md\":\"CGqDeaEv\",\"zht_api_mp_math_segment.md\":\"CqQitARa\",\"zht_api_mp_math_utils.md\":\"CFas0PJL\",\"zht_api_mp_math_vector.md\":\"BnvyNBhC\",\"zht_api_particle_index.md\":\"bdouG1sk\",\"zht_api_presets_index.md\":\"9wdPAkKN\",\"zht_api_presets_model_index.md\":\"BfmFWGa-\",\"zht_demo_best-practice.md\":\"CPNbD_Lg\",\"zht_guide_index.md\":\"BNnMViC8\",\"zht_index.md\":\"fkOYkZZe\",\"zht_refer_index.md\":\"B7CQS2UW\"}");function deserializeFunctions(r){return Array.isArray(r)?r.map(deserializeFunctions):typeof r=="object"&&r!==null?Object.keys(r).reduce((t,n)=>(t[n]=deserializeFunctions(r[n]),t),{}):typeof r=="string"&&r.startsWith("_vp-fn_")?new Function(`return ${r.slice(7)}`)():r};window.__VP_SITE_DATA__=deserializeFunctions(JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"VitePress\",\"description\":\"A VitePress site\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"logo\":\"/mbcp-logo.svg\",\"sidebar\":{\"/api/\":{\"base\":\"/api/\",\"items\":[{\"text\":\"MBCP\",\"items\":[{\"text\":\"mp_math\",\"it
|
2024-08-29 13:25:00 +08:00
|
|
|
|
|
|
|
</body>
|
|
|
|
</html>
|