diff --git a/404.html b/404.html index 61c5b47..7aad817 100644 --- a/404.html +++ b/404.html @@ -6,16 +6,16 @@ 404 | MBCP docs - + - +
- + \ No newline at end of file diff --git a/api-ex.html b/api-ex.html deleted file mode 100644 index 7fbca92..0000000 --- a/api-ex.html +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - Runtime API Examples | MBCP docs - - - - - - - - - - - - - -
Skip to content

Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
-import { useData } from 'vitepress'
-
-const { theme, page, frontmatter } = useData()
-</script>
-
-## Results
-
-### Theme Data
-<pre>{{ theme }}</pre>
-
-### Page Data
-<pre>{{ page }}</pre>
-
-### Page Frontmatter
-<pre>{{ frontmatter }}</pre>

Results

Theme Data

{
-  "socialLinks": [
-    {
-      "icon": "github",
-      "link": "https://github.com/snowykami/mbcp"
-    }
-  ],
-  "sidebar": {
-    "/api/": [
-      {
-        "text": "api",
-        "items": [
-          {
-            "text": "mbcp",
-            "link": "/api/index.md"
-          },
-          {
-            "text": "mp_math",
-            "items": [
-              {
-                "text": "mbcp.mp_math",
-                "link": "/api/mp_math/index.md"
-              },
-              {
-                "text": "mbcp.mp_math.angle",
-                "link": "/api/mp_math/angle.md"
-              },
-              {
-                "text": "mbcp.mp_math.const",
-                "link": "/api/mp_math/const.md"
-              },
-              {
-                "text": "mbcp.mp_math.equation",
-                "link": "/api/mp_math/equation.md"
-              },
-              {
-                "text": "mbcp.mp_math.line",
-                "link": "/api/mp_math/line.md"
-              },
-              {
-                "text": "mbcp.mp_math.mp_math_typing",
-                "link": "/api/mp_math/mp_math_typing.md"
-              },
-              {
-                "text": "mbcp.mp_math.plane",
-                "link": "/api/mp_math/plane.md"
-              },
-              {
-                "text": "mbcp.mp_math.point",
-                "link": "/api/mp_math/point.md"
-              },
-              {
-                "text": "mbcp.mp_math.segment",
-                "link": "/api/mp_math/segment.md"
-              },
-              {
-                "text": "mbcp.mp_math.utils",
-                "link": "/api/mp_math/utils.md"
-              },
-              {
-                "text": "mbcp.mp_math.vector",
-                "link": "/api/mp_math/vector.md"
-              }
-            ]
-          },
-          {
-            "text": "particle",
-            "items": [
-              {
-                "text": "mbcp.particle",
-                "link": "/api/particle/index.md"
-              }
-            ]
-          },
-          {
-            "text": "presets",
-            "items": [
-              {
-                "text": "mbcp.presets",
-                "link": "/api/presets/index.md"
-              },
-              {
-                "text": "model",
-                "items": [
-                  {
-                    "text": "mbcp.presets.model",
-                    "link": "/api/presets/model/index.md"
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      }
-    ],
-    "/guide/": [
-      {
-        "text": "guide",
-        "items": [
-          {
-            "text": "开始不了一点",
-            "link": "/guide/index.md"
-          }
-        ]
-      }
-    ],
-    "/en/": [
-      {
-        "text": "en",
-        "items": [
-          {
-            "text": "api",
-            "items": [
-              {
-                "text": "mbcp",
-                "link": "/en/api/index.md"
-              },
-              {
-                "text": "mp_math",
-                "items": [
-                  {
-                    "text": "mbcp.mp_math",
-                    "link": "/en/api/mp_math/index.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.angle",
-                    "link": "/en/api/mp_math/angle.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.const",
-                    "link": "/en/api/mp_math/const.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.equation",
-                    "link": "/en/api/mp_math/equation.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.line",
-                    "link": "/en/api/mp_math/line.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.mp_math_typing",
-                    "link": "/en/api/mp_math/mp_math_typing.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.plane",
-                    "link": "/en/api/mp_math/plane.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.point",
-                    "link": "/en/api/mp_math/point.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.segment",
-                    "link": "/en/api/mp_math/segment.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.utils",
-                    "link": "/en/api/mp_math/utils.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.vector",
-                    "link": "/en/api/mp_math/vector.md"
-                  }
-                ]
-              },
-              {
-                "text": "particle",
-                "items": [
-                  {
-                    "text": "mbcp.particle",
-                    "link": "/en/api/particle/index.md"
-                  }
-                ]
-              },
-              {
-                "text": "presets",
-                "items": [
-                  {
-                    "text": "mbcp.presets",
-                    "link": "/en/api/presets/index.md"
-                  },
-                  {
-                    "text": "model",
-                    "items": [
-                      {
-                        "text": "mbcp.presets.model",
-                        "link": "/en/api/presets/model/index.md"
-                      }
-                    ]
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      }
-    ],
-    "/ja/": [
-      {
-        "text": "ja",
-        "items": [
-          {
-            "text": "api",
-            "items": [
-              {
-                "text": "mbcp",
-                "link": "/ja/api/index.md"
-              },
-              {
-                "text": "mp_math",
-                "items": [
-                  {
-                    "text": "mbcp.mp_math",
-                    "link": "/ja/api/mp_math/index.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.angle",
-                    "link": "/ja/api/mp_math/angle.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.const",
-                    "link": "/ja/api/mp_math/const.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.equation",
-                    "link": "/ja/api/mp_math/equation.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.line",
-                    "link": "/ja/api/mp_math/line.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.mp_math_typing",
-                    "link": "/ja/api/mp_math/mp_math_typing.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.plane",
-                    "link": "/ja/api/mp_math/plane.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.point",
-                    "link": "/ja/api/mp_math/point.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.segment",
-                    "link": "/ja/api/mp_math/segment.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.utils",
-                    "link": "/ja/api/mp_math/utils.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.vector",
-                    "link": "/ja/api/mp_math/vector.md"
-                  }
-                ]
-              },
-              {
-                "text": "particle",
-                "items": [
-                  {
-                    "text": "mbcp.particle",
-                    "link": "/ja/api/particle/index.md"
-                  }
-                ]
-              },
-              {
-                "text": "presets",
-                "items": [
-                  {
-                    "text": "mbcp.presets",
-                    "link": "/ja/api/presets/index.md"
-                  },
-                  {
-                    "text": "model",
-                    "items": [
-                      {
-                        "text": "mbcp.presets.model",
-                        "link": "/ja/api/presets/model/index.md"
-                      }
-                    ]
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      }
-    ],
-    "/zht/": [
-      {
-        "text": "zht",
-        "items": [
-          {
-            "text": "api",
-            "items": [
-              {
-                "text": "mbcp",
-                "link": "/zht/api/index.md"
-              },
-              {
-                "text": "mp_math",
-                "items": [
-                  {
-                    "text": "mbcp.mp_math",
-                    "link": "/zht/api/mp_math/index.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.angle",
-                    "link": "/zht/api/mp_math/angle.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.const",
-                    "link": "/zht/api/mp_math/const.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.equation",
-                    "link": "/zht/api/mp_math/equation.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.line",
-                    "link": "/zht/api/mp_math/line.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.mp_math_typing",
-                    "link": "/zht/api/mp_math/mp_math_typing.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.plane",
-                    "link": "/zht/api/mp_math/plane.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.point",
-                    "link": "/zht/api/mp_math/point.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.segment",
-                    "link": "/zht/api/mp_math/segment.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.utils",
-                    "link": "/zht/api/mp_math/utils.md"
-                  },
-                  {
-                    "text": "mbcp.mp_math.vector",
-                    "link": "/zht/api/mp_math/vector.md"
-                  }
-                ]
-              },
-              {
-                "text": "particle",
-                "items": [
-                  {
-                    "text": "mbcp.particle",
-                    "link": "/zht/api/particle/index.md"
-                  }
-                ]
-              },
-              {
-                "text": "presets",
-                "items": [
-                  {
-                    "text": "mbcp.presets",
-                    "link": "/zht/api/presets/index.md"
-                  },
-                  {
-                    "text": "model",
-                    "items": [
-                      {
-                        "text": "mbcp.presets.model",
-                        "link": "/zht/api/presets/model/index.md"
-                      }
-                    ]
-                  }
-                ]
-              }
-            ]
-          }
-        ]
-      }
-    ],
-    "/api-ex.md/": [
-      {
-        "text": "Runtime API Examples",
-        "items": []
-      }
-    ],
-    "/md-ex.md/": [
-      {
-        "text": "Markdown Extension Examples",
-        "items": []
-      }
-    ]
-  },
-  "nav": [
-    {
-      "text": "快速开始",
-      "link": "/guide/"
-    },
-    {
-      "text": "API文档",
-      "link": "/api/"
-    },
-    {
-      "text": "实例",
-      "link": "/demo/"
-    }
-  ]
-}

Page Data

{
-  "title": "Runtime API Examples",
-  "description": "",
-  "frontmatter": {
-    "outline": "deep"
-  },
-  "headers": [],
-  "relativePath": "api-ex.md",
-  "filePath": "api-ex.md"
-}

Page Frontmatter

{
-  "outline": "deep"
-}

More

Check out the documentation for the full list of runtime APIs.

- - - - \ No newline at end of file diff --git a/api/index.html b/api/index.html index 0172a60..d49fdd0 100644 --- a/api/index.html +++ b/api/index.html @@ -6,19 +6,19 @@ mbcp | MBCP docs - + - + - - - + + + -
Skip to content
- +
Skip to content

mbcp

说明: 本模块塞了一些预设的粒子生成器

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/angle.html b/api/mp_math/angle.html index b64c09f..4417bde 100644 --- a/api/mp_math/angle.html +++ b/api/mp_math/angle.html @@ -6,18 +6,18 @@ mbcp.mp_math.angle | MBCP docs - + - + - - - + + + -
Skip to content

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

说明: 任意角度。

参数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源代码
python
def __init__(self, value: float, is_radian: bool=False):
+    
Skip to content

mbcp.mp_math.angle

说明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

说明: 任意角度。

参数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源代码
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -27,96 +27,96 @@
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

说明: 余角:两角的和为90°。

返回: 余角

源代码
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

说明: 余角:两角的和为90°。

返回: 余角

源代码
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

说明: 补角:两角的和为180°。

返回: 补角

源代码
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

说明: 补角:两角的和为180°。

返回: 补角

源代码
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

说明: 角度。

返回: 弧度

源代码
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

说明: 角度。

返回: 弧度

源代码
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

说明: 最小正角。

返回: 最小正角度

源代码
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

说明: 最小正角。

返回: 最小正角度

源代码
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

说明: 最大负角。

返回: 最大负角度

源代码
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

说明: 最大负角。

返回: 最大负角度

源代码
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

说明: 正弦值。

返回: 正弦值

源代码
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

说明: 正弦值。

返回: 正弦值

源代码
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

说明: 余弦值。

返回: 余弦值

源代码
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

说明: 余弦值。

返回: 余弦值

源代码
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

说明: 正切值。

返回: 正切值

源代码
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

说明: 正切值。

返回: 正切值

源代码
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

说明: 余切值。

返回: 余切值

源代码
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

说明: 余切值。

返回: 余切值

源代码
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

说明: 正割值。

返回: 正割值

源代码
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

说明: 正割值。

返回: 正割值

源代码
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

说明: 余割值。

返回: 余割值

源代码
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

说明: 余割值。

返回: 余割值

源代码
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源代码
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源代码
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源代码
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源代码
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源代码
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源代码
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源代码
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源代码
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源代码
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源代码
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

源代码
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

源代码
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

源代码
python
def __truediv__(self, other):
+    ...

method self / other

源代码
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
- + return AnyAngle(self.radian / other, is_radian=True)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/const.html b/api/mp_math/const.html index 982a8d2..d19f0f9 100644 --- a/api/mp_math/const.html +++ b/api/mp_math/const.html @@ -6,19 +6,19 @@ mbcp.mp_math.const | MBCP docs - + - + - - - + + + -
Skip to content

var EPSILON = 0.0001

  • 说明: ε

var APPROX = 0.001

  • 说明: 约等于误差
- +
Skip to content

mbcp.mp_math.const

说明: 本模块定义了一些常用的常量

var PI = math.pi

  • 说明: 常量 π

var E = math.e

  • 说明: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • 说明: 黄金分割比

var GAMMA = 0.5772156649015329

  • 说明: 欧拉常数

var EPSILON = 0.0001

  • 说明: 精度误差

var APPROX = 0.001

  • 说明: 约等于判定误差

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/equation.html b/api/mp_math/equation.html index 8e3ca18..785068e 100644 --- a/api/mp_math/equation.html +++ b/api/mp_math/equation.html @@ -6,18 +6,40 @@ mbcp.mp_math.equation | MBCP docs - + - + - - - + + + -
Skip to content

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

参数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

引发:

  • ValueError 无效变量类型
源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+    
Skip to content

mbcp.mp_math.equation

说明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

说明: 计算曲线上的点。

参数:

  • *t:
  • 参数:

返回: 目标点

源代码
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

参数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

引发:

  • ValueError 无效变量类型
源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -59,7 +81,7 @@
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

说明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

参数:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源代码
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

说明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

参数:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源代码
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -74,30 +96,8 @@
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

说明: 计算曲线上的点。

参数:

  • *t:
  • 参数:
源代码
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + return curried_func

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/function.html b/api/mp_math/function.html new file mode 100644 index 0000000..6cd66ac --- /dev/null +++ b/api/mp_math/function.html @@ -0,0 +1,40 @@ + + + + + + mbcp.mp_math.function | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.mp_math.function

说明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

说明: 计算三元函数在某点的梯度向量。

TIP

已知一个函数f(x,y,z),则其在点(x0,y0,z0)处的梯度向量为: f(x0,y0,z0)=(fx,fy,fz)

参数:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

返回: 梯度

源代码
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\nabla f(x_0, y_0, z_0) = \\left(\\frac{\\partial f}{\\partial x}, \\frac{\\partial f}{\\partial y}, \\frac{\\partial f}{\\partial z}\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/api/mp_math/index.html b/api/mp_math/index.html index f51bdcd..e06fd89 100644 --- a/api/mp_math/index.html +++ b/api/mp_math/index.html @@ -6,19 +6,19 @@ mbcp.mp_math | MBCP docs - + - + - - - + + + -
Skip to content
- +
Skip to content

mbcp.mp_math

说明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/line.html b/api/mp_math/line.html index 510ea65..9f5a716 100644 --- a/api/mp_math/line.html +++ b/api/mp_math/line.html @@ -6,18 +6,18 @@ mbcp.mp_math.line | MBCP docs - + - + - - - + + + -
Skip to content

class Line3

method __init__(self, point: Point3, direction: Vector3)

说明: 三维空间中的直线。由一个点和一个方向向量确定。

参数:

  • point: 直线上的一点
  • direction: 直线的方向向量
源代码
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+    
Skip to content

mbcp.mp_math.line

说明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

说明: 三维空间中的直线。由一个点和一个方向向量确定。

参数:

  • point: 直线上的一点
  • direction: 直线的方向向量
源代码
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -25,7 +25,7 @@
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

说明: 判断两条直线是否近似相等。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

说明: 判断两条直线是否近似相等。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -34,7 +34,7 @@
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

说明: 计算直线和直线之间的夹角。

参数:

  • other: 另一条直线

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

说明: 计算直线和直线之间的夹角。

参数:

  • other: 另一条直线

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -44,7 +44,7 @@
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

说明: 计算直线和直线或点之间的距离。

参数:

  • other: 平行直线或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

说明: 计算直线和直线或点之间的距离。

参数:

  • other: 平行直线或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -67,7 +67,7 @@
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

说明: 计算两条直线的交点。

参数:

  • other: 另一条直线

返回: 交点

引发:

  • ValueError 直线平行
  • ValueError 直线不共面
源代码
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

说明: 计算两条直线的交点。

参数:

  • other: 另一条直线

返回: 交点

引发:

  • ValueError 直线平行
  • ValueError 直线不共面
源代码
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -82,7 +82,7 @@
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

说明: 计算直线经过指定点p的垂线。

参数:

  • point: 指定点

返回: 垂线

源代码
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

说明: 计算直线经过指定点p的垂线。

参数:

  • point: 指定点

返回: 垂线

源代码
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -90,7 +90,7 @@
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

说明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

参数:

  • t: 参数t

返回: 点

源代码
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

说明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

参数:

  • t: 参数t

返回: 点

源代码
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -98,13 +98,13 @@
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

说明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源代码
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

说明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源代码
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

说明: 判断两条直线是否近似平行。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

说明: 判断两条直线是否近似平行。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -113,7 +113,7 @@
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

说明: 判断两条直线是否平行。

参数:

  • other: 另一条直线

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

说明: 判断两条直线是否平行。

参数:

  • other: 另一条直线

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -121,7 +121,7 @@
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

说明: 判断两条直线是否共线。

参数:

  • other: 另一条直线

返回: 是否共线

源代码
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

说明: 判断两条直线是否共线。

参数:

  • other: 另一条直线

返回: 是否共线

源代码
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -129,7 +129,7 @@
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

说明: 判断点是否在直线上。

参数:

  • point: 点

返回: 是否在直线上

源代码
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

说明: 判断点是否在直线上。

参数:

  • point: 点

返回: 是否在直线上

源代码
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -137,7 +137,7 @@
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

说明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

参数:

  • other: 另一条直线

返回: 是否共面

源代码
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

说明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

参数:

  • other: 另一条直线

返回: 是否共面

源代码
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -146,7 +146,7 @@
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

说明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源代码
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

说明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源代码
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -159,7 +159,7 @@
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

说明: 工厂函数 由两点构造直线。

参数:

  • p1: 点1
  • p2: 点2

返回: 直线

源代码
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

说明: 工厂函数 由两点构造直线。

参数:

  • p1: 点1
  • p2: 点2

返回: 直线

源代码
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -170,7 +170,7 @@
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

说明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

参数:

  • other: 另一条直线

返回: 交点

源代码
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

说明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

参数:

  • other: 另一条直线

返回: 交点

源代码
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -183,7 +183,7 @@
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

说明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

参数:

  • other:
源代码
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

说明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

参数:

  • other:
源代码
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -194,8 +194,8 @@
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
- + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/mp_math_typing.html b/api/mp_math/mp_math_typing.html index dd56561..8eb8358 100644 --- a/api/mp_math/mp_math_typing.html +++ b/api/mp_math/mp_math_typing.html @@ -6,19 +6,19 @@ mbcp.mp_math.mp_math_typing | MBCP docs - + - + - - - + + + -
Skip to content

var RealNumber = int | float

  • 类型: TypeAlias

  • 说明: 实数

var Number = RealNumber | complex

  • 类型: TypeAlias

  • 说明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 说明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 说明: 数组变量

var Var = SingleVar | ArrayVar

  • 类型: TypeAlias

  • 说明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 类型: TypeAlias

  • 说明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 类型: TypeAlias

  • 说明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 类型: TypeAlias

  • 说明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 类型: TypeAlias

  • 说明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 类型: TypeAlias

  • 说明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 类型: TypeAlias

  • 说明: 多元函数

- +
Skip to content

mbcp.mp_math.mp_math_typing

说明: 本模块用于内部类型提示

var RealNumber = int | float

  • 类型: TypeAlias

  • 说明: 实数

var Number = RealNumber | complex

  • 类型: TypeAlias

  • 说明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 说明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 说明: 数组变量

var Var = SingleVar | ArrayVar

  • 类型: TypeAlias

  • 说明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 类型: TypeAlias

  • 说明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 类型: TypeAlias

  • 说明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 类型: TypeAlias

  • 说明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 类型: TypeAlias

  • 说明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 类型: TypeAlias

  • 说明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 类型: TypeAlias

  • 说明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 类型: TypeAlias

  • 说明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 类型: TypeAlias

  • 说明: 多元函数

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/plane.html b/api/mp_math/plane.html index bebe790..7a0218a 100644 --- a/api/mp_math/plane.html +++ b/api/mp_math/plane.html @@ -6,18 +6,18 @@ mbcp.mp_math.plane | MBCP docs - + - + - - - + + + -
Skip to content

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

说明: 平面方程:ax + by + cz + d = 0

参数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源代码
python
def __init__(self, a: float, b: float, c: float, d: float):
+    
Skip to content

mbcp.mp_math.plane

说明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

说明: 平面方程:ax + by + cz + d = 0

参数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源代码
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -29,7 +29,7 @@
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

说明: 判断两个平面是否近似相等。

参数:

  • other: 另一个平面

返回: 是否近似相等

源代码
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

说明: 判断两个平面是否近似相等。

参数:

  • other: 另一个平面

返回: 是否近似相等

源代码
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -47,7 +47,7 @@
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

说明: 计算平面与平面之间的夹角。

参数:

  • other: 另一个平面

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

说明: 计算平面与平面之间的夹角。

参数:

  • other: 另一个平面

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -62,7 +62,7 @@
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

说明: 计算平面与平面或点之间的距离。

参数:

  • other: 另一个平面或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

说明: 计算平面与平面或点之间的距离。

参数:

  • other: 另一个平面或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -77,7 +77,7 @@
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

说明: 计算两平面的交线。

参数:

  • other: 另一个平面

返回: 两平面的交线

源代码
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

说明: 计算两平面的交线。

参数:

  • other: 另一个平面

返回: 两平面的交线

源代码
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -102,7 +102,7 @@
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

说明: 计算平面与直线的交点。

参数:

  • other: 不与平面平行或在平面上的直线

返回: 交点

引发:

  • ValueError 平面与直线平行或重合
源代码
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

说明: 计算平面与直线的交点。

参数:

  • other: 不与平面平行或在平面上的直线

返回: 交点

引发:

  • ValueError 平面与直线平行或重合
源代码
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -116,7 +116,7 @@
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

说明: 计算平行于该平面且过指定点的平面。

参数:

  • point: 指定点

返回: 所求平面

源代码
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

说明: 计算平行于该平面且过指定点的平面。

参数:

  • point: 指定点

返回: 所求平面

源代码
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -124,7 +124,7 @@
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

说明: 判断两个平面是否平行。

参数:

  • other: 另一个平面

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

说明: 判断两个平面是否平行。

参数:

  • other: 另一个平面

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -132,14 +132,14 @@
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

说明: 平面的法向量。

返回: 法向量

源代码
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

说明: 平面的法向量。

返回: 法向量

源代码
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

说明: 工厂函数 由点和法向量构造平面(点法式构造)。

参数:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源代码
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

说明: 工厂函数 由点和法向量构造平面(点法式构造)。

参数:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源代码
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -151,7 +151,7 @@
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

说明: 工厂函数 由三点构造平面。

参数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源代码
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

说明: 工厂函数 由三点构造平面。

参数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源代码
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -165,7 +165,7 @@
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

说明: 工厂函数 由两直线构造平面。

参数:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源代码
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

说明: 工厂函数 由两直线构造平面。

参数:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源代码
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -179,7 +179,7 @@
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

说明: 工厂函数 由点和直线构造平面。

参数:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源代码
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

说明: 工厂函数 由点和直线构造平面。

参数:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源代码
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -189,11 +189,11 @@
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源代码
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源代码
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源代码
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源代码
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

说明: 取两平面的交集(人话:交线)

参数:

  • other:

返回: 不平行平面的交线,平面平行返回None

源代码
python
def __and__(self, other):
+    ...

method __and__(self, other)

说明: 取两平面的交集(人话:交线)

参数:

  • other:

返回: 不平行平面的交线,平面平行返回None

源代码
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -210,10 +210,10 @@
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源代码
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源代码
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
- + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源代码
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源代码
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/point.html b/api/mp_math/point.html index 5fc06b0..d7a1f44 100644 --- a/api/mp_math/point.html +++ b/api/mp_math/point.html @@ -6,18 +6,18 @@ mbcp.mp_math.point | MBCP docs - + - + - - - + + + -
Skip to content

class Point3

method __init__(self, x: float, y: float, z: float)

说明: 笛卡尔坐标系中的点。

参数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源代码
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.point

说明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

说明: 笛卡尔坐标系中的点。

参数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源代码
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

说明: 判断两个点是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

说明: 判断两个点是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -37,11 +37,11 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源代码
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

说明: P + V -> P P + P -> P

参数:

  • other:
源代码
python
def __add__(self, other):
+    ...

method self + other

说明: P + V -> P P + P -> P

参数:

  • other:
源代码
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -49,14 +49,14 @@
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

说明: 判断两个点是否相等。

参数:

  • other:
源代码
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

说明: 判断两个点是否相等。

参数:

  • other:
源代码
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

说明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

参数:

  • other:
源代码
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

说明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

参数:

  • other:
源代码
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -67,8 +67,8 @@
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
- + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/segment.html b/api/mp_math/segment.html index f430296..ab68a0d 100644 --- a/api/mp_math/segment.html +++ b/api/mp_math/segment.html @@ -6,18 +6,18 @@ mbcp.mp_math.segment | MBCP docs - + - + - - - + + + -
Skip to content

class Segment3

method __init__(self, p1: Point3, p2: Point3)

说明: 三维空间中的线段。 :param p1: :param p2:

源代码
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+    
Skip to content

mbcp.mp_math.segment

说明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

说明: 三维空间中的线段。 :param p1: :param p2:

源代码
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -30,8 +30,8 @@
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
- + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/utils.html b/api/mp_math/utils.html index 152abf6..b5c4546 100644 --- a/api/mp_math/utils.html +++ b/api/mp_math/utils.html @@ -6,18 +6,18 @@ mbcp.mp_math.utils | MBCP docs - + - + - - - + + + -
Skip to content

func clamp() -> float

说明: 区间限定函数

参数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源代码
python
def clamp(x: float, min_: float, max_: float) -> float:
+    
Skip to content

mbcp.mp_math.utils

说明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

说明: 区间限定函数

参数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源代码
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -28,7 +28,20 @@
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

说明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

参数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

源代码
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

源代码
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

源代码
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源代码
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

说明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

参数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -38,7 +51,7 @@
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

说明: 获取数的符号。

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

说明: 获取数的符号。

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -51,7 +64,7 @@
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

说明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

说明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -67,21 +80,8 @@
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

源代码
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

源代码
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

源代码
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源代码
python
def __ne__(self, other):
-    return not self.__eq__(other)
- + return ''

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/mp_math/vector.html b/api/mp_math/vector.html index 260a981..0425d94 100644 --- a/api/mp_math/vector.html +++ b/api/mp_math/vector.html @@ -6,18 +6,18 @@ mbcp.mp_math.vector | MBCP docs - + - + - - - + + + -
Skip to content

class Vector3

method __init__(self, x: float, y: float, z: float)

说明: 3维向量

参数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源代码
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.vector

说明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

说明: 3维向量

参数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源代码
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -37,7 +37,7 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

说明: 计算两个向量之间的夹角。

参数:

  • other: 另一个向量

返回: 夹角

源代码
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

说明: 计算两个向量之间的夹角。

参数:

  • other: 另一个向量

返回: 夹角

源代码
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -45,7 +45,7 @@
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

说明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

参数:

  • other:

返回: 行列式的结果

源代码
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

说明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

参数:

  • other:

返回: 行列式的结果

源代码
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -65,7 +65,7 @@
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似平行。

参数:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似平行。

参数:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -74,7 +74,7 @@
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

说明: 判断两个向量是否平行。

参数:

  • other: 另一个向量

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

说明: 判断两个向量是否平行。

参数:

  • other: 另一个向量

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -82,7 +82,7 @@
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

说明: 将向量归一化。

自体归一化,不返回值。

源代码
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

说明: 将向量归一化。

自体归一化,不返回值。

源代码
python
def normalize(self):
     """
         将向量归一化。
 
@@ -91,32 +91,32 @@
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

源代码
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

源代码
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

说明: 向量的模。

返回: 模

源代码
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

说明: 向量的模。

返回: 模

源代码
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

说明: 获取该向量的单位向量。

返回: 单位向量

源代码
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

说明: 获取该向量的单位向量。

返回: 单位向量

源代码
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

源代码
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

源代码
python
@overload
+    return self / self.length

method __abs__(self)

源代码
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

源代码
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

说明: V + P -> P

V + V -> V

参数:

  • other:
源代码
python
def __add__(self, other):
+    ...

method self + other

说明: V + P -> P

V + V -> V

参数:

  • other:
源代码
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -131,7 +131,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

说明: 判断两个向量是否相等。

参数:

  • other:

返回: 是否相等

源代码
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

说明: 判断两个向量是否相等。

参数:

  • other:

返回: 是否相等

源代码
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -139,7 +139,7 @@
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

说明: P + V -> P

别去点那边实现了。 :param other: :return:

源代码
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

说明: P + V -> P

别去点那边实现了。 :param other: :return:

源代码
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -147,11 +147,11 @@
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源代码
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源代码
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

源代码
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

说明: V - P -> P

V - V -> V

参数:

  • other:
源代码
python
def __sub__(self, other):
+    ...

method self - other

说明: V - P -> P

V - V -> V

参数:

  • other:
源代码
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -165,7 +165,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

说明: P - V -> P

参数:

  • other:
源代码
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

说明: P - V -> P

参数:

  • other:
源代码
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -176,11 +176,11 @@
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源代码
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源代码
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

源代码
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

源代码
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

说明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

参数:

  • other:
源代码
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

说明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

参数:

  • other:
源代码
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -193,18 +193,18 @@
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源代码
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

说明: 点乘。

参数:

  • other:
源代码
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源代码
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

说明: 点乘。

参数:

  • other:
源代码
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源代码
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源代码
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 类型: Vector3

  • 说明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 类型: Vector3

  • 说明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 类型: Vector3

  • 说明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 类型: Vector3

  • 说明: z轴单位向量

- + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源代码
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源代码
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 类型: Vector3

  • 说明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 类型: Vector3

  • 说明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 类型: Vector3

  • 说明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 类型: Vector3

  • 说明: z轴单位向量

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/particle/index.html b/api/particle/index.html index a22209d..d358644 100644 --- a/api/particle/index.html +++ b/api/particle/index.html @@ -6,19 +6,19 @@ mbcp.particle | MBCP docs - + - + - - - + + + -
Skip to content
- +
Skip to content

mbcp.particle

说明: 本模块定义了粒子生成相关的工具

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/presets/index.html b/api/presets/index.html index 9e4ec7f..88e1785 100644 --- a/api/presets/index.html +++ b/api/presets/index.html @@ -6,19 +6,19 @@ mbcp.presets | MBCP docs - + - + - - - + + + -
Skip to content
- +
Skip to content

mbcp.presets

说明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : init.py @Software: PyCharm

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/api/presets/model/index.html b/api/presets/model/index.html index 4c9023b..6d09c17 100644 --- a/api/presets/model/index.html +++ b/api/presets/model/index.html @@ -6,18 +6,18 @@ mbcp.presets.model | MBCP docs - + - + - - - + + + -
Skip to content

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

说明: 生成球体上的点集。

参数:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源代码
python
@staticmethod
+    
Skip to content

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

说明: 生成球体上的点集。

参数:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源代码
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
- + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/assets/api-ex.md.DOsKaL8H.js b/assets/api-ex.md.DOsKaL8H.js deleted file mode 100644 index 8273956..0000000 --- a/assets/api-ex.md.DOsKaL8H.js +++ /dev/null @@ -1,16 +0,0 @@ -import{u as h,c as p,j as s,t as i,k as e,a2 as r,a,o as k}from"./chunks/framework.BV61Qrc0.js";const d=r(`

Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
-import { useData } from 'vitepress'
-
-const { theme, page, frontmatter } = useData()
-</script>
-
-## Results
-
-### Theme Data
-<pre>{{ theme }}</pre>
-
-### Page Data
-<pre>{{ page }}</pre>
-
-### Page Frontmatter
-<pre>{{ frontmatter }}</pre>

Results

Theme Data

`,6),o=s("h3",{id:"page-data",tabindex:"-1"},[a("Page Data "),s("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"​")],-1),E=s("h3",{id:"page-frontmatter",tabindex:"-1"},[a("Page Frontmatter "),s("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"​")],-1),g=s("h2",{id:"more",tabindex:"-1"},[a("More "),s("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"​")],-1),c=s("p",null,[a("Check out the documentation for the "),s("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),a(".")],-1),D=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-ex.md","filePath":"api-ex.md"}'),m={name:"api-ex.md"},F=Object.assign(m,{setup(u){const{site:y,theme:t,page:n,frontmatter:l}=h();return(_,f)=>(k(),p("div",null,[d,s("pre",null,i(e(t)),1),o,s("pre",null,i(e(n)),1),E,s("pre",null,i(e(l)),1),g,c]))}});export{D as __pageData,F as default}; diff --git a/assets/api-ex.md.DOsKaL8H.lean.js b/assets/api-ex.md.DOsKaL8H.lean.js deleted file mode 100644 index 686b36e..0000000 --- a/assets/api-ex.md.DOsKaL8H.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{u as h,c as p,j as s,t as i,k as e,a2 as r,a,o as k}from"./chunks/framework.BV61Qrc0.js";const d=r("",6),o=s("h3",{id:"page-data",tabindex:"-1"},[a("Page Data "),s("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"​")],-1),E=s("h3",{id:"page-frontmatter",tabindex:"-1"},[a("Page Frontmatter "),s("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"​")],-1),g=s("h2",{id:"more",tabindex:"-1"},[a("More "),s("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"​")],-1),c=s("p",null,[a("Check out the documentation for the "),s("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),a(".")],-1),D=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-ex.md","filePath":"api-ex.md"}'),m={name:"api-ex.md"},F=Object.assign(m,{setup(u){const{site:y,theme:t,page:n,frontmatter:l}=h();return(_,f)=>(k(),p("div",null,[d,s("pre",null,i(e(t)),1),o,s("pre",null,i(e(n)),1),E,s("pre",null,i(e(l)),1),g,c]))}});export{D as __pageData,F as default}; diff --git a/assets/api_index.md.BvazTqTB.js b/assets/api_index.md.BvazTqTB.js deleted file mode 100644 index 8dcd57c..0000000 --- a/assets/api_index.md.BvazTqTB.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"api/index.md","filePath":"api/index.md"}'),n={name:"api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/api_index.md.BvazTqTB.lean.js b/assets/api_index.md.BvazTqTB.lean.js deleted file mode 100644 index 8dcd57c..0000000 --- a/assets/api_index.md.BvazTqTB.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"api/index.md","filePath":"api/index.md"}'),n={name:"api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/api_index.md.CBQkxs7b.js b/assets/api_index.md.CBQkxs7b.js new file mode 100644 index 0000000..cd33b4d --- /dev/null +++ b/assets/api_index.md.CBQkxs7b.js @@ -0,0 +1 @@ +import{_ as a,c,o as n,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),o={name:"api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/api_index.md.CBQkxs7b.lean.js b/assets/api_index.md.CBQkxs7b.lean.js new file mode 100644 index 0000000..cd33b4d --- /dev/null +++ b/assets/api_index.md.CBQkxs7b.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as n,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"api/index.md","filePath":"zh/api/index.md"}'),o={name:"api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/api_mp_math_angle.md.eAy7w1HN.lean.js b/assets/api_mp_math_angle.md.eAy7w1HN.lean.js deleted file mode 100644 index ca34d60..0000000 --- a/assets/api_mp_math_angle.md.eAy7w1HN.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n("",78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/api_mp_math_angle.md.eAy7w1HN.js b/assets/api_mp_math_angle.md.gd7UQvyy.js similarity index 86% rename from assets/api_mp_math_angle.md.eAy7w1HN.js rename to assets/api_mp_math_angle.md.gd7UQvyy.js index 42da5d6..e9e9278 100644 --- a/assets/api_mp_math_angle.md.eAy7w1HN.js +++ b/assets/api_mp_math_angle.md.gd7UQvyy.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n(`

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

说明: 任意角度。

参数:

源代码
python
def __init__(self, value: float, is_radian: bool=False):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n(`

mbcp.mp_math.angle

说明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

说明: 任意角度。

参数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源代码
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -8,92 +8,92 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

说明: 余角:两角的和为90°。

返回: 余角

源代码
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

说明: 余角:两角的和为90°。

返回: 余角

源代码
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

说明: 补角:两角的和为180°。

返回: 补角

源代码
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

说明: 补角:两角的和为180°。

返回: 补角

源代码
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

说明: 角度。

返回: 弧度

源代码
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

说明: 角度。

返回: 弧度

源代码
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

说明: 最小正角。

返回: 最小正角度

源代码
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

说明: 最小正角。

返回: 最小正角度

源代码
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

说明: 最大负角。

返回: 最大负角度

源代码
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

说明: 最大负角。

返回: 最大负角度

源代码
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

说明: 正弦值。

返回: 正弦值

源代码
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

说明: 正弦值。

返回: 正弦值

源代码
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

说明: 余弦值。

返回: 余弦值

源代码
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

说明: 余弦值。

返回: 余弦值

源代码
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

说明: 正切值。

返回: 正切值

源代码
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

说明: 正切值。

返回: 正切值

源代码
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

说明: 余切值。

返回: 余切值

源代码
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

说明: 余切值。

返回: 余切值

源代码
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

说明: 正割值。

返回: 正割值

源代码
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

说明: 正割值。

返回: 正割值

源代码
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

说明: 余割值。

返回: 余割值

源代码
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

说明: 余割值。

返回: 余割值

源代码
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源代码
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源代码
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源代码
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源代码
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源代码
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源代码
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源代码
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源代码
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源代码
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源代码
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

源代码
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

源代码
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

源代码
python
def __truediv__(self, other):
+    ...

method self / other

源代码
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
`,78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; + return AnyAngle(self.radian / other, is_radian=True)
`,80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/api_mp_math_angle.md.gd7UQvyy.lean.js b/assets/api_mp_math_angle.md.gd7UQvyy.lean.js new file mode 100644 index 0000000..afce494 --- /dev/null +++ b/assets/api_mp_math_angle.md.gd7UQvyy.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"api/mp_math/angle.md","filePath":"zh/api/mp_math/angle.md"}'),t={name:"api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/api_mp_math_const.md.3scs0T6A.js b/assets/api_mp_math_const.md.3scs0T6A.js new file mode 100644 index 0000000..120ef87 --- /dev/null +++ b/assets/api_mp_math_const.md.3scs0T6A.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"zh/api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},c=o('

mbcp.mp_math.const

说明: 本模块定义了一些常用的常量

var PI = math.pi

var E = math.e

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

var GAMMA = 0.5772156649015329

var EPSILON = 0.0001

var APPROX = 0.001

',14),i=[c];function n(l,s,h,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/api_mp_math_const.md.3scs0T6A.lean.js b/assets/api_mp_math_const.md.3scs0T6A.lean.js new file mode 100644 index 0000000..ca8aca1 --- /dev/null +++ b/assets/api_mp_math_const.md.3scs0T6A.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"zh/api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},c=o("",14),i=[c];function n(l,s,h,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/api_mp_math_const.md.D9zs7__H.js b/assets/api_mp_math_const.md.D9zs7__H.js deleted file mode 100644 index 468f064..0000000 --- a/assets/api_mp_math_const.md.D9zs7__H.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

var APPROX = 0.001

',4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/api_mp_math_const.md.D9zs7__H.lean.js b/assets/api_mp_math_const.md.D9zs7__H.lean.js deleted file mode 100644 index 25ef09e..0000000 --- a/assets/api_mp_math_const.md.D9zs7__H.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"api/mp_math/const.md","filePath":"api/mp_math/const.md"}'),r={name:"api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/api_mp_math_equation.md.Bx8s1yFf.lean.js b/assets/api_mp_math_equation.md.Bx8s1yFf.lean.js deleted file mode 100644 index 3647865..0000000 --- a/assets/api_mp_math_equation.md.Bx8s1yFf.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n("",27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; diff --git a/assets/en_api_mp_math_equation.md.BuG3Sd0K.js b/assets/api_mp_math_equation.md.DuZ1hN4l.js similarity index 70% rename from assets/en_api_mp_math_equation.md.BuG3Sd0K.js rename to assets/api_mp_math_equation.md.DuZ1hN4l.js index 8765aed..e456e43 100644 --- a/assets/en_api_mp_math_equation.md.BuG3Sd0K.js +++ b/assets/api_mp_math_equation.md.DuZ1hN4l.js @@ -1,4 +1,26 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),l={name:"en/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

Description: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

Arguments:

Return: 偏导函数

Raises:

Source code
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n(`

mbcp.mp_math.equation

说明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

说明: 计算曲线上的点。

参数:

  • *t:
  • 参数:

返回: 目标点

源代码
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

参数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

引发:

  • ValueError 无效变量类型
源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -40,7 +62,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

Description: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

Arguments:

  • func: 函数
  • *args: 参数

Return: 柯里化后的函数

Source code
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

说明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

参数:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源代码
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -55,26 +77,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

Description: 计算曲线上的点。

Arguments:

  • *t:
  • 参数:
Source code
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{u as __pageData,F as default}; + return curried_func
`,30),p=[t];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(l,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/api_mp_math_equation.md.DuZ1hN4l.lean.js b/assets/api_mp_math_equation.md.DuZ1hN4l.lean.js new file mode 100644 index 0000000..fbc4f35 --- /dev/null +++ b/assets/api_mp_math_equation.md.DuZ1hN4l.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"zh/api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n("",30),p=[t];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(l,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/api_mp_math_function.md.U6hGSIm3.js b/assets/api_mp_math_function.md.U6hGSIm3.js new file mode 100644 index 0000000..d3f1fa2 --- /dev/null +++ b/assets/api_mp_math_function.md.U6hGSIm3.js @@ -0,0 +1,17 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"api/mp_math/function.md","filePath":"zh/api/mp_math/function.md"}'),n={name:"api/mp_math/function.md"},l=a('

mbcp.mp_math.function

说明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

说明: 计算三元函数在某点的梯度向量。

',4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a('',1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a('',1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a('',1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a(`

参数:

返回: 梯度

源代码
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\\\nabla f(x_0, y_0, z_0) = \\\\left(\\\\frac{\\\\partial f}{\\\\partial x}, \\\\frac{\\\\partial f}{\\\\partial y}, \\\\frac{\\\\partial f}{\\\\partial z}\\\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)
`,4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/api_mp_math_function.md.U6hGSIm3.lean.js b/assets/api_mp_math_function.md.U6hGSIm3.lean.js new file mode 100644 index 0000000..00d681d --- /dev/null +++ b/assets/api_mp_math_function.md.U6hGSIm3.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"api/mp_math/function.md","filePath":"zh/api/mp_math/function.md"}'),n={name:"api/mp_math/function.md"},l=a("",4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a("",1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a("",1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a("",4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/api_mp_math_index.md.1HMGGW3A.js b/assets/api_mp_math_index.md.1HMGGW3A.js new file mode 100644 index 0000000..aad2f57 --- /dev/null +++ b/assets/api_mp_math_index.md.1HMGGW3A.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"api/mp_math/index.md","filePath":"zh/api/mp_math/index.md"}'),c={name:"api/mp_math/index.md"},i=o('

mbcp.mp_math

说明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

',3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/api_mp_math_index.md.1HMGGW3A.lean.js b/assets/api_mp_math_index.md.1HMGGW3A.lean.js new file mode 100644 index 0000000..4af2406 --- /dev/null +++ b/assets/api_mp_math_index.md.1HMGGW3A.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"api/mp_math/index.md","filePath":"zh/api/mp_math/index.md"}'),c={name:"api/mp_math/index.md"},i=o("",3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/api_mp_math_index.md.4P0hk6gb.js b/assets/api_mp_math_index.md.4P0hk6gb.js deleted file mode 100644 index b374540..0000000 --- a/assets/api_mp_math_index.md.4P0hk6gb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"api/mp_math/index.md","filePath":"api/mp_math/index.md"}'),m={name:"api/mp_math/index.md"};function p(n,i,r,c,o,s){return a(),e("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/api_mp_math_index.md.4P0hk6gb.lean.js b/assets/api_mp_math_index.md.4P0hk6gb.lean.js deleted file mode 100644 index b374540..0000000 --- a/assets/api_mp_math_index.md.4P0hk6gb.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"api/mp_math/index.md","filePath":"api/mp_math/index.md"}'),m={name:"api/mp_math/index.md"};function p(n,i,r,c,o,s){return a(),e("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/api_mp_math_line.md.DsJQDchM.js b/assets/api_mp_math_line.md.B-ShajAF.js similarity index 92% rename from assets/api_mp_math_line.md.DsJQDchM.js rename to assets/api_mp_math_line.md.B-ShajAF.js index b12a2f8..1e6308f 100644 --- a/assets/api_mp_math_line.md.DsJQDchM.js +++ b/assets/api_mp_math_line.md.B-ShajAF.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n(`

class Line3

method __init__(self, point: Point3, direction: Vector3)

说明: 三维空间中的直线。由一个点和一个方向向量确定。

参数:

源代码
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"zh/api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n(`

mbcp.mp_math.line

说明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

说明: 三维空间中的直线。由一个点和一个方向向量确定。

参数:

  • point: 直线上的一点
  • direction: 直线的方向向量
源代码
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

说明: 判断两条直线是否近似相等。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

说明: 判断两条直线是否近似相等。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

说明: 计算直线和直线之间的夹角。

参数:

  • other: 另一条直线

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

说明: 计算直线和直线之间的夹角。

参数:

  • other: 另一条直线

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -25,7 +25,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

说明: 计算直线和直线或点之间的距离。

参数:

  • other: 平行直线或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

说明: 计算直线和直线或点之间的距离。

参数:

  • other: 平行直线或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -48,7 +48,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

说明: 计算两条直线的交点。

参数:

  • other: 另一条直线

返回: 交点

引发:

  • ValueError 直线平行
  • ValueError 直线不共面
源代码
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

说明: 计算两条直线的交点。

参数:

  • other: 另一条直线

返回: 交点

引发:

  • ValueError 直线平行
  • ValueError 直线不共面
源代码
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

说明: 计算直线经过指定点p的垂线。

参数:

  • point: 指定点

返回: 垂线

源代码
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

说明: 计算直线经过指定点p的垂线。

参数:

  • point: 指定点

返回: 垂线

源代码
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -71,7 +71,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

说明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

参数:

  • t: 参数t

返回: 点

源代码
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

说明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

参数:

  • t: 参数t

返回: 点

源代码
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -79,13 +79,13 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

说明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源代码
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

说明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源代码
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

说明: 判断两条直线是否近似平行。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

说明: 判断两条直线是否近似平行。

参数:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -94,7 +94,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

说明: 判断两条直线是否平行。

参数:

  • other: 另一条直线

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

说明: 判断两条直线是否平行。

参数:

  • other: 另一条直线

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -102,7 +102,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

说明: 判断两条直线是否共线。

参数:

  • other: 另一条直线

返回: 是否共线

源代码
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

说明: 判断两条直线是否共线。

参数:

  • other: 另一条直线

返回: 是否共线

源代码
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -110,7 +110,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

说明: 判断点是否在直线上。

参数:

  • point: 点

返回: 是否在直线上

源代码
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

说明: 判断点是否在直线上。

参数:

  • point: 点

返回: 是否在直线上

源代码
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -118,7 +118,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

说明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

参数:

  • other: 另一条直线

返回: 是否共面

源代码
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

说明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

参数:

  • other: 另一条直线

返回: 是否共面

源代码
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -127,7 +127,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

说明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源代码
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

说明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源代码
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -140,7 +140,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

说明: 工厂函数 由两点构造直线。

参数:

  • p1: 点1
  • p2: 点2

返回: 直线

源代码
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

说明: 工厂函数 由两点构造直线。

参数:

  • p1: 点1
  • p2: 点2

返回: 直线

源代码
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -151,7 +151,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

说明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

参数:

  • other: 另一条直线

返回: 交点

源代码
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

说明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

参数:

  • other: 另一条直线

返回: 交点

源代码
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -164,7 +164,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

说明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

参数:

  • other:
源代码
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

说明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

参数:

  • other:
源代码
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -175,4 +175,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_line.md.B-ShajAF.lean.js b/assets/api_mp_math_line.md.B-ShajAF.lean.js new file mode 100644 index 0000000..0cbde39 --- /dev/null +++ b/assets/api_mp_math_line.md.B-ShajAF.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"zh/api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n("",107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_line.md.DsJQDchM.lean.js b/assets/api_mp_math_line.md.DsJQDchM.lean.js deleted file mode 100644 index 56efe18..0000000 --- a/assets/api_mp_math_line.md.DsJQDchM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"api/mp_math/line.md","filePath":"api/mp_math/line.md"}'),t={name:"api/mp_math/line.md"},l=n("",105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.js b/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.js new file mode 100644 index 0000000..4679220 --- /dev/null +++ b/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"zh/api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l('

mbcp.mp_math.mp_math_typing

说明: 本模块用于内部类型提示

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',36),i=[o];function c(t,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.lean.js b/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.lean.js new file mode 100644 index 0000000..62056ed --- /dev/null +++ b/assets/api_mp_math_mp_math_typing.md.BtAkBFH3.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"zh/api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l("",36),i=[o];function c(t,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js deleted file mode 100644 index 3309a29..0000000 --- a/assets/api_mp_math_mp_math_typing.md.COrE_fd3.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

var Number = RealNumber | complex

var SingleVar = TypeVar('SingleVar', bound=Number)

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

var Var = SingleVar | ArrayVar

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

var MultiSingleVarsFunc = Callable[..., SingleVar]

var MultiArraysFunc = Callable[..., ArrayVar]

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js b/assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js deleted file mode 100644 index f8e666c..0000000 --- a/assets/api_mp_math_mp_math_typing.md.COrE_fd3.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"api/mp_math/mp_math_typing.md","filePath":"api/mp_math/mp_math_typing.md"}'),n={name:"api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/api_mp_math_plane.md.CmoVvPiw.lean.js b/assets/api_mp_math_plane.md.CmoVvPiw.lean.js deleted file mode 100644 index 434353e..0000000 --- a/assets/api_mp_math_plane.md.CmoVvPiw.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},h=n("",103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/api_mp_math_plane.md.CmoVvPiw.js b/assets/api_mp_math_plane.md.DnJHiXsz.js similarity index 93% rename from assets/api_mp_math_plane.md.CmoVvPiw.js rename to assets/api_mp_math_plane.md.DnJHiXsz.js index 20f083b..7633bd2 100644 --- a/assets/api_mp_math_plane.md.CmoVvPiw.js +++ b/assets/api_mp_math_plane.md.DnJHiXsz.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},h=n(`

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

说明: 平面方程:ax + by + cz + d = 0

参数:

源代码
python
def __init__(self, a: float, b: float, c: float, d: float):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},h=n(`

mbcp.mp_math.plane

说明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

说明: 平面方程:ax + by + cz + d = 0

参数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源代码
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

说明: 判断两个平面是否近似相等。

参数:

  • other: 另一个平面

返回: 是否近似相等

源代码
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

说明: 判断两个平面是否近似相等。

参数:

  • other: 另一个平面

返回: 是否近似相等

源代码
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

说明: 计算平面与平面之间的夹角。

参数:

  • other: 另一个平面

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

说明: 计算平面与平面之间的夹角。

参数:

  • other: 另一个平面

返回: 夹角弧度

引发:

  • TypeError 不支持的类型
源代码
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

说明: 计算平面与平面或点之间的距离。

参数:

  • other: 另一个平面或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

说明: 计算平面与平面或点之间的距离。

参数:

  • other: 另一个平面或点

返回: 距离

引发:

  • TypeError 不支持的类型
源代码
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

说明: 计算两平面的交线。

参数:

  • other: 另一个平面

返回: 两平面的交线

源代码
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

说明: 计算两平面的交线。

参数:

  • other: 另一个平面

返回: 两平面的交线

源代码
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

说明: 计算平面与直线的交点。

参数:

  • other: 不与平面平行或在平面上的直线

返回: 交点

引发:

  • ValueError 平面与直线平行或重合
源代码
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

说明: 计算平面与直线的交点。

参数:

  • other: 不与平面平行或在平面上的直线

返回: 交点

引发:

  • ValueError 平面与直线平行或重合
源代码
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -97,7 +97,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

说明: 计算平行于该平面且过指定点的平面。

参数:

  • point: 指定点

返回: 所求平面

源代码
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

说明: 计算平行于该平面且过指定点的平面。

参数:

  • point: 指定点

返回: 所求平面

源代码
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -105,7 +105,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

说明: 判断两个平面是否平行。

参数:

  • other: 另一个平面

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

说明: 判断两个平面是否平行。

参数:

  • other: 另一个平面

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -113,14 +113,14 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

说明: 平面的法向量。

返回: 法向量

源代码
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

说明: 平面的法向量。

返回: 法向量

源代码
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

说明: 工厂函数 由点和法向量构造平面(点法式构造)。

参数:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源代码
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

说明: 工厂函数 由点和法向量构造平面(点法式构造)。

参数:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源代码
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -132,7 +132,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

说明: 工厂函数 由三点构造平面。

参数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源代码
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

说明: 工厂函数 由三点构造平面。

参数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源代码
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

说明: 工厂函数 由两直线构造平面。

参数:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源代码
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

说明: 工厂函数 由两直线构造平面。

参数:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源代码
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -160,7 +160,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

说明: 工厂函数 由点和直线构造平面。

参数:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源代码
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

说明: 工厂函数 由点和直线构造平面。

参数:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源代码
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -170,11 +170,11 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源代码
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源代码
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源代码
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源代码
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

说明: 取两平面的交集(人话:交线)

参数:

  • other:

返回: 不平行平面的交线,平面平行返回None

源代码
python
def __and__(self, other):
+    ...

method __and__(self, other)

说明: 取两平面的交集(人话:交线)

参数:

  • other:

返回: 不平行平面的交线,平面平行返回None

源代码
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -191,6 +191,6 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源代码
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源代码
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
`,103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源代码
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源代码
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)
`,105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/api_mp_math_plane.md.DnJHiXsz.lean.js b/assets/api_mp_math_plane.md.DnJHiXsz.lean.js new file mode 100644 index 0000000..1cd06c4 --- /dev/null +++ b/assets/api_mp_math_plane.md.DnJHiXsz.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"api/mp_math/plane.md","filePath":"zh/api/mp_math/plane.md"}'),l={name:"api/mp_math/plane.md"},h=n("",105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/api_mp_math_point.md.ClJD85mP.js b/assets/api_mp_math_point.md.9ZJsp3fx.js similarity index 84% rename from assets/api_mp_math_point.md.ClJD85mP.js rename to assets/api_mp_math_point.md.9ZJsp3fx.js index c1f3ae7..33dbc05 100644 --- a/assets/api_mp_math_point.md.ClJD85mP.js +++ b/assets/api_mp_math_point.md.9ZJsp3fx.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t(`

class Point3

method __init__(self, x: float, y: float, z: float)

说明: 笛卡尔坐标系中的点。

参数:

源代码
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},h=t(`

mbcp.mp_math.point

说明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

说明: 笛卡尔坐标系中的点。

参数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源代码
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

说明: 判断两个点是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

说明: 判断两个点是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -18,11 +18,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源代码
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

说明: P + V -> P P + P -> P

参数:

  • other:
源代码
python
def __add__(self, other):
+    ...

method self + other

说明: P + V -> P P + P -> P

参数:

  • other:
源代码
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -30,14 +30,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

说明: 判断两个点是否相等。

参数:

  • other:
源代码
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

说明: 判断两个点是否相等。

参数:

  • other:
源代码
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

说明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

参数:

  • other:
源代码
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

说明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

参数:

  • other:
源代码
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -48,4 +48,4 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_mp_math_point.md.9ZJsp3fx.lean.js b/assets/api_mp_math_point.md.9ZJsp3fx.lean.js new file mode 100644 index 0000000..5dccae5 --- /dev/null +++ b/assets/api_mp_math_point.md.9ZJsp3fx.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"zh/api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},h=t("",36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_mp_math_point.md.ClJD85mP.lean.js b/assets/api_mp_math_point.md.ClJD85mP.lean.js deleted file mode 100644 index 0d932bd..0000000 --- a/assets/api_mp_math_point.md.ClJD85mP.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"api/mp_math/point.md","filePath":"api/mp_math/point.md"}'),n={name:"api/mp_math/point.md"},l=t("",34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_mp_math_segment.md.7jBtS4F1.lean.js b/assets/api_mp_math_segment.md.7jBtS4F1.lean.js deleted file mode 100644 index 5f0b88a..0000000 --- a/assets/api_mp_math_segment.md.7jBtS4F1.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},h=n("",4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; diff --git a/assets/api_mp_math_segment.md.7jBtS4F1.js b/assets/api_mp_math_segment.md.BLQ-UFFk.js similarity index 68% rename from assets/api_mp_math_segment.md.7jBtS4F1.js rename to assets/api_mp_math_segment.md.BLQ-UFFk.js index 304bf09..05580a0 100644 --- a/assets/api_mp_math_segment.md.7jBtS4F1.js +++ b/assets/api_mp_math_segment.md.BLQ-UFFk.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},h=n(`

class Segment3

method __init__(self, p1: Point3, p2: Point3)

说明: 三维空间中的线段。 :param p1: :param p2:

源代码
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"zh/api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},h=n(`

mbcp.mp_math.segment

说明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

说明: 三维空间中的线段。 :param p1: :param p2:

源代码
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -11,4 +11,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/api_mp_math_segment.md.BLQ-UFFk.lean.js b/assets/api_mp_math_segment.md.BLQ-UFFk.lean.js new file mode 100644 index 0000000..44745b3 --- /dev/null +++ b/assets/api_mp_math_segment.md.BLQ-UFFk.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"api/mp_math/segment.md","filePath":"zh/api/mp_math/segment.md"}'),t={name:"api/mp_math/segment.md"},h=n("",6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/api_mp_math_utils.md.BMwtm7TJ.lean.js b/assets/api_mp_math_utils.md.BMwtm7TJ.lean.js deleted file mode 100644 index e04783d..0000000 --- a/assets/api_mp_math_utils.md.BMwtm7TJ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"api/mp_math/utils.md"}'),t={name:"api/mp_math/utils.md"},l=n("",33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_utils.md.BMwtm7TJ.js b/assets/api_mp_math_utils.md.yzrnwrbP.js similarity index 65% rename from assets/api_mp_math_utils.md.BMwtm7TJ.js rename to assets/api_mp_math_utils.md.yzrnwrbP.js index 6b2d37f..7ae4d8a 100644 --- a/assets/api_mp_math_utils.md.BMwtm7TJ.js +++ b/assets/api_mp_math_utils.md.yzrnwrbP.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"api/mp_math/utils.md"}'),t={name:"api/mp_math/utils.md"},l=n(`

func clamp() -> float

说明: 区间限定函数

参数:

返回: 限制后的值

源代码
python
def clamp(x: float, min_: float, max_: float) -> float:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),l={name:"api/mp_math/utils.md"},t=n(`

mbcp.mp_math.utils

说明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

说明: 区间限定函数

参数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源代码
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -9,7 +9,20 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

说明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

参数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

源代码
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

源代码
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

源代码
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源代码
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

说明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

参数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源代码
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -19,7 +32,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

说明: 获取数的符号。

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

说明: 获取数的符号。

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -32,7 +45,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

说明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

说明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

参数:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源代码
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -48,17 +61,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

源代码
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

源代码
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

源代码
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源代码
python
def __ne__(self, other):
-    return not self.__eq__(other)
`,33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return ''
`,35),h=[t];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_utils.md.yzrnwrbP.lean.js b/assets/api_mp_math_utils.md.yzrnwrbP.lean.js new file mode 100644 index 0000000..0ae93f4 --- /dev/null +++ b/assets/api_mp_math_utils.md.yzrnwrbP.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"api/mp_math/utils.md","filePath":"zh/api/mp_math/utils.md"}'),l={name:"api/mp_math/utils.md"},t=n("",35),h=[t];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/api_mp_math_vector.md.CROCIDXX.js b/assets/api_mp_math_vector.md.BSPllWFK.js similarity index 90% rename from assets/api_mp_math_vector.md.CROCIDXX.js rename to assets/api_mp_math_vector.md.BSPllWFK.js index 46eb303..8016e2d 100644 --- a/assets/api_mp_math_vector.md.CROCIDXX.js +++ b/assets/api_mp_math_vector.md.BSPllWFK.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},h=t(`

class Vector3

method __init__(self, x: float, y: float, z: float)

说明: 3维向量

参数:

源代码
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},h=t(`

mbcp.mp_math.vector

说明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

说明: 3维向量

参数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源代码
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似相等。

参数:

  • other:
  • epsilon:

返回: 是否近似相等

源代码
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

说明: 计算两个向量之间的夹角。

参数:

  • other: 另一个向量

返回: 夹角

源代码
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

说明: 计算两个向量之间的夹角。

参数:

  • other: 另一个向量

返回: 夹角

源代码
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

说明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

参数:

  • other:

返回: 行列式的结果

源代码
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

说明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

参数:

  • other:

返回: 行列式的结果

源代码
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似平行。

参数:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

说明: 判断两个向量是否近似平行。

参数:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源代码
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

说明: 判断两个向量是否平行。

参数:

  • other: 另一个向量

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

说明: 判断两个向量是否平行。

参数:

  • other: 另一个向量

返回: 是否平行

源代码
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

说明: 将向量归一化。

自体归一化,不返回值。

源代码
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

说明: 将向量归一化。

自体归一化,不返回值。

源代码
python
def normalize(self):
     """
         将向量归一化。
 
@@ -72,32 +72,32 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

源代码
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

源代码
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

说明: 向量的模。

返回: 模

源代码
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

说明: 向量的模。

返回: 模

源代码
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

说明: 获取该向量的单位向量。

返回: 单位向量

源代码
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

说明: 获取该向量的单位向量。

返回: 单位向量

源代码
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

源代码
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

源代码
python
@overload
+    return self / self.length

method __abs__(self)

源代码
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

源代码
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源代码
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

说明: V + P -> P

V + V -> V

参数:

  • other:
源代码
python
def __add__(self, other):
+    ...

method self + other

说明: V + P -> P

V + V -> V

参数:

  • other:
源代码
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -112,7 +112,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

说明: 判断两个向量是否相等。

参数:

  • other:

返回: 是否相等

源代码
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

说明: 判断两个向量是否相等。

参数:

  • other:

返回: 是否相等

源代码
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -120,7 +120,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

说明: P + V -> P

别去点那边实现了。 :param other: :return:

源代码
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

说明: P + V -> P

别去点那边实现了。 :param other: :return:

源代码
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -128,11 +128,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源代码
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源代码
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

源代码
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

源代码
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

说明: V - P -> P

V - V -> V

参数:

  • other:
源代码
python
def __sub__(self, other):
+    ...

method self - other

说明: V - P -> P

V - V -> V

参数:

  • other:
源代码
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

说明: P - V -> P

参数:

  • other:
源代码
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

说明: P - V -> P

参数:

  • other:
源代码
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -157,11 +157,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源代码
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源代码
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

源代码
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

源代码
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

说明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

参数:

  • other:
源代码
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

说明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

参数:

  • other:
源代码
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -174,14 +174,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源代码
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

说明: 点乘。

参数:

  • other:
源代码
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源代码
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

说明: 点乘。

参数:

  • other:
源代码
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源代码
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源代码
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 类型: Vector3

  • 说明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 类型: Vector3

  • 说明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 类型: Vector3

  • 说明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 类型: Vector3

  • 说明: z轴单位向量

`,125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源代码
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源代码
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

var x_axis = Vector3(1, 0, 0)

var y_axis = Vector3(0, 1, 0)

var z_axis = Vector3(0, 0, 1)

`,127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_mp_math_vector.md.BSPllWFK.lean.js b/assets/api_mp_math_vector.md.BSPllWFK.lean.js new file mode 100644 index 0000000..2364ec2 --- /dev/null +++ b/assets/api_mp_math_vector.md.BSPllWFK.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"zh/api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},h=t("",127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_mp_math_vector.md.CROCIDXX.lean.js b/assets/api_mp_math_vector.md.CROCIDXX.lean.js deleted file mode 100644 index a26b965..0000000 --- a/assets/api_mp_math_vector.md.CROCIDXX.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"api/mp_math/vector.md","filePath":"api/mp_math/vector.md"}'),n={name:"api/mp_math/vector.md"},h=t("",125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/api_particle_index.md.BRCSxC3e.js b/assets/api_particle_index.md.BRCSxC3e.js deleted file mode 100644 index aee1a91..0000000 --- a/assets/api_particle_index.md.BRCSxC3e.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"api/particle/index.md","filePath":"api/particle/index.md"}'),i={name:"api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/api_particle_index.md.BRCSxC3e.lean.js b/assets/api_particle_index.md.BRCSxC3e.lean.js deleted file mode 100644 index aee1a91..0000000 --- a/assets/api_particle_index.md.BRCSxC3e.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"api/particle/index.md","filePath":"api/particle/index.md"}'),i={name:"api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/api_particle_index.md.Cgiljhcz.js b/assets/api_particle_index.md.Cgiljhcz.js new file mode 100644 index 0000000..32bbc28 --- /dev/null +++ b/assets/api_particle_index.md.Cgiljhcz.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"api/particle/index.md","filePath":"zh/api/particle/index.md"}'),i={name:"api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=a(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/api_particle_index.md.Cgiljhcz.lean.js b/assets/api_particle_index.md.Cgiljhcz.lean.js new file mode 100644 index 0000000..32bbc28 --- /dev/null +++ b/assets/api_particle_index.md.Cgiljhcz.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"api/particle/index.md","filePath":"zh/api/particle/index.md"}'),i={name:"api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=a(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/api_presets_index.md.Dl6Ss91J.js b/assets/api_presets_index.md.Dl6Ss91J.js deleted file mode 100644 index 638232d..0000000 --- a/assets/api_presets_index.md.Dl6Ss91J.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"api/presets/index.md","filePath":"api/presets/index.md"}'),a={name:"api/presets/index.md"};function r(p,n,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/api_presets_index.md.Dl6Ss91J.lean.js b/assets/api_presets_index.md.Dl6Ss91J.lean.js deleted file mode 100644 index 638232d..0000000 --- a/assets/api_presets_index.md.Dl6Ss91J.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"api/presets/index.md","filePath":"api/presets/index.md"}'),a={name:"api/presets/index.md"};function r(p,n,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/api_presets_index.md.RZipvyLz.js b/assets/api_presets_index.md.RZipvyLz.js new file mode 100644 index 0000000..a18d9bc --- /dev/null +++ b/assets/api_presets_index.md.RZipvyLz.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"api/presets/index.md","filePath":"zh/api/presets/index.md"}'),r={name:"api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,_,h,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/api_presets_index.md.RZipvyLz.lean.js b/assets/api_presets_index.md.RZipvyLz.lean.js new file mode 100644 index 0000000..a18d9bc --- /dev/null +++ b/assets/api_presets_index.md.RZipvyLz.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"api/presets/index.md","filePath":"zh/api/presets/index.md"}'),r={name:"api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,_,h,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/ja_api_presets_model_index.md.D8yZmO5R.js b/assets/api_presets_model_index.md.4RPSG4yh.js similarity index 76% rename from assets/ja_api_presets_model_index.md.D8yZmO5R.js rename to assets/api_presets_model_index.md.4RPSG4yh.js index cec2b23..1e7857f 100644 --- a/assets/ja_api_presets_model_index.md.D8yZmO5R.js +++ b/assets/api_presets_model_index.md.4RPSG4yh.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n(`

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

引数:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"zh/api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n(`

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

说明: 生成球体上的点集。

参数:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源代码
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -15,4 +15,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/api_presets_model_index.md.4RPSG4yh.lean.js b/assets/api_presets_model_index.md.4RPSG4yh.lean.js new file mode 100644 index 0000000..38610d4 --- /dev/null +++ b/assets/api_presets_model_index.md.4RPSG4yh.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"zh/api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/api_presets_model_index.md.DUZx13AW.lean.js b/assets/api_presets_model_index.md.DUZx13AW.lean.js deleted file mode 100644 index 8d14981..0000000 --- a/assets/api_presets_model_index.md.DUZx13AW.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n("",8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; diff --git a/assets/app.l1Ut0uce.js b/assets/app.DSCSdM_3.js similarity index 90% rename from assets/app.l1Ut0uce.js rename to assets/app.DSCSdM_3.js index 96db258..adc29dc 100644 --- a/assets/app.l1Ut0uce.js +++ b/assets/app.DSCSdM_3.js @@ -1 +1 @@ -import{t as i}from"./chunks/theme.BPuUWxkA.js";import{U as o,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,ac as y,d as P,u as v,y as C,x as b,ad as w,ae as E,af as R,ag as S}from"./chunks/framework.BV61Qrc0.js";function p(e){if(e.extends){const a=p(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=p(i),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp}; +import{t as i}from"./chunks/theme.CIS5wKR_.js";import{U as o,a3 as u,a4 as c,a5 as l,a6 as f,a7 as d,a8 as m,a9 as h,aa as g,ab as A,ac as y,d as P,u as v,y as C,x as b,ad as w,ae as E,af as R,ag as S}from"./chunks/framework.C94oF1kp.js";function p(e){if(e.extends){const a=p(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const s=p(i),T=P({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=v();return C(()=>{b(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&w(),E(),R(),s.setup&&s.setup(),()=>S(s.Layout)}});async function x(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(c,e);const t=l(e.route);return a.provide(f,t),a.component("Content",d),a.component("ClientOnly",m),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),s.enhanceApp&&await s.enhanceApp({app:a,router:e,siteData:h}),{app:a,router:e,data:t}}function D(){return g(T)}function _(){let e=o,a;return A(t=>{let n=y(t),r=null;return n&&(e&&(a=n),(e||a===n)&&(n=n.replace(/\.js$/,".lean.js")),r=import(n)),o&&(e=!1),r},s.NotFound)}o&&x().then(({app:e,router:a,data:t})=>{a.go().then(()=>{u(a.route,t.site),e.mount("#app")})});export{x as createApp}; diff --git a/assets/chunks/framework.BV61Qrc0.js b/assets/chunks/framework.C94oF1kp.js similarity index 79% rename from assets/chunks/framework.BV61Qrc0.js rename to assets/chunks/framework.C94oF1kp.js index ab3df33..28b3b93 100644 --- a/assets/chunks/framework.BV61Qrc0.js +++ b/assets/chunks/framework.C94oF1kp.js @@ -14,4 +14,4 @@ * @vue/runtime-dom v3.4.38 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/const gc="http://www.w3.org/2000/svg",mc="http://www.w3.org/1998/Math/MathML",He=typeof document<"u"?document:null,lr=He&&He.createElement("template"),yc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?He.createElementNS(gc,e):t==="mathml"?He.createElementNS(mc,e):n?He.createElement(e,{is:n}):He.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>He.createTextNode(e),createComment:e=>He.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>He.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{lr.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const l=lr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ue="transition",Ot="animation",Dt=Symbol("_vtc"),ki=(e,{slots:t})=>fs(ul,_c(e),t);ki.displayName="Transition";const Ki={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};ki.props=le({},ii,Ki);const st=(e,t=[])=>{V(e)?e.forEach(n=>n(...t)):e&&e(...t)},cr=e=>e?V(e)?e.some(t=>t.length>1):e.length>1:!1;function _c(e){const t={};for(const E in e)E in Ki||(t[E]=e[E]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,N=bc(r),P=N&&N[0],W=N&&N[1],{onBeforeEnter:q,onEnter:G,onEnterCancelled:p,onLeave:m,onLeaveCancelled:I,onBeforeAppear:R=q,onAppear:U=G,onAppearCancelled:B=p}=t,O=(E,D,ee)=>{rt(E,D?d:l),rt(E,D?u:o),ee&&ee()},_=(E,D)=>{E._isLeaving=!1,rt(E,h),rt(E,T),rt(E,v),D&&D()},M=E=>(D,ee)=>{const ne=E?U:G,$=()=>O(D,E,ee);st(ne,[D,$]),ar(()=>{rt(D,E?c:i),Be(D,E?d:l),cr(ne)||fr(D,s,P,$)})};return le(t,{onBeforeEnter(E){st(q,[E]),Be(E,i),Be(E,o)},onBeforeAppear(E){st(R,[E]),Be(E,c),Be(E,u)},onEnter:M(!1),onAppear:M(!0),onLeave(E,D){E._isLeaving=!0;const ee=()=>_(E,D);Be(E,h),Be(E,v),Ec(),ar(()=>{E._isLeaving&&(rt(E,h),Be(E,T),cr(m)||fr(E,s,W,ee))}),st(m,[E,ee])},onEnterCancelled(E){O(E,!1),st(p,[E])},onAppearCancelled(E){O(E,!0),st(B,[E])},onLeaveCancelled(E){_(E),st(I,[E])}})}function bc(e){if(e==null)return null;if(Z(e))return[Un(e.enter),Un(e.leave)];{const t=Un(e);return[t,t]}}function Un(e){return mo(e)}function Be(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Dt]||(e[Dt]=new Set)).add(t)}function rt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Dt];n&&(n.delete(t),n.size||(e[Dt]=void 0))}function ar(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vc=0;function fr(e,t,n,s){const r=e._endId=++vc,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=wc(e,t);if(!o)return s();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,v),i()},v=T=>{T.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[N]||"").split(", "),r=s(`${Ue}Delay`),i=s(`${Ue}Duration`),o=ur(r,i),l=s(`${Ot}Delay`),c=s(`${Ot}Duration`),u=ur(l,c);let d=null,h=0,v=0;t===Ue?o>0&&(d=Ue,h=o,v=i.length):t===Ot?u>0&&(d=Ot,h=u,v=c.length):(h=Math.max(o,u),d=h>0?o>u?Ue:Ot:null,v=d?d===Ue?i.length:c.length:0);const T=d===Ue&&/\b(transform|all)(,|$)/.test(s(`${Ue}Property`).toString());return{type:d,timeout:h,propCount:v,hasTransform:T}}function ur(e,t){for(;e.lengthdr(n)+dr(e[s])))}function dr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ec(){return document.body.offsetHeight}function Cc(e,t,n){const s=e[Dt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const hr=Symbol("_vod"),Sc=Symbol("_vsh"),xc=Symbol(""),Tc=/(^|;)\s*display\s*:/;function Ac(e,t,n){const s=e.style,r=ie(n);let i=!1;if(n&&!r){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&on(s,l,"")}else for(const o in t)n[o]==null&&on(s,o,"");for(const o in n)o==="display"&&(i=!0),on(s,o,n[o])}else if(r){if(t!==n){const o=s[xc];o&&(n+=";"+o),s.cssText=n,i=Tc.test(n)}}else t&&e.removeAttribute("style");hr in e&&(e[hr]=i?s.display:"",e[Sc]&&(s.display="none"))}const pr=/\s*!important$/;function on(e,t,n){if(V(n))n.forEach(s=>on(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Rc(e,t);pr.test(n)?e.setProperty(Qe(s),n.replace(pr,""),"important"):e[s]=n}}const gr=["Webkit","Moz","ms"],Bn={};function Rc(e,t){const n=Bn[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return Bn[t]=s;s=_n(s);for(let r=0;rkn||(Nc.then(()=>kn=0),kn=Date.now());function Hc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Re($c(s,n.value),t,5,[s])};return n.value=e,n.attached=Fc(),n}function $c(e,t){if(V(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const vr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Cc(e,s,o):t==="style"?Ac(e,n,s):Vt(t)?ds(t)||Mc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dc(e,t,s,o))?(Oc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yr(e,t,s,o,i,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),yr(e,t,s,o))};function Dc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&vr(t)&&K(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return vr(t)&&ie(n)?!1:t in e}const Vc=["ctrl","shift","alt","meta"],Uc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vc.some(n=>e[`${n}Key`]&&!t.includes(n))},Za=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Qe(r.key);if(t.some(o=>o===i||Bc[o]===i))return e(r)})},kc=le({patchProp:jc},yc);let Kn,wr=!1;function Kc(){return Kn=wr?Kn:kl(kc),wr=!0,Kn}const tf=(...e)=>{const t=Kc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=qc(s);if(r)return n(r,!0,Wc(r))},t};function Wc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qc(e){return ie(e)?document.querySelector(e):e}const Gc=window.__VP_SITE_DATA__;function Is(e){return jr()?(To(e),!0):!1}function ze(e){return typeof e=="function"?e():ei(e)}const Wi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zc=Object.prototype.toString,Xc=e=>zc.call(e)==="[object Object]",qi=()=>{},Er=Yc();function Yc(){var e,t;return Wi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Jc(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Gi=e=>e();function Qc(e=Gi){const t=fe(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:wn(t),pause:n,resume:s,eventFilter:r}}function Zc(e){return Ln()}function zi(...e){if(e.length!==1)return tl(...e);const t=e[0];return typeof t=="function"?wn(Qo(()=>({get:t,set:qi}))):fe(t)}function ea(e,t,n={}){const{eventFilter:s=Gi,...r}=n;return Fe(e,Jc(s,t),r)}function ta(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Qc(s);return{stop:ea(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function Ms(e,t=!0,n){Zc()?Tt(e,n):t?e():Cn(e)}function Xi(e){var t;const n=ze(e);return(t=n==null?void 0:n.$el)!=null?t:n}const je=Wi?window:void 0;function xt(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=je):[t,n,s,r]=e,!t)return qi;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,v,T)=>(d.addEventListener(h,v,T),()=>d.removeEventListener(h,v,T)),c=Fe(()=>[Xi(t),ze(r)],([d,h])=>{if(o(),!d)return;const v=Xc(h)?{...h}:h;i.push(...n.flatMap(T=>s.map(N=>l(d,T,N,v))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return Is(u),u}function na(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function nf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=je,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=na(t);return xt(r,i,d=>{d.repeat&&ze(l)||c(d)&&n(d)},o)}function sa(){const e=fe(!1),t=Ln();return t&&Tt(()=>{e.value=!0},t),e}function ra(e){const t=sa();return re(()=>(t.value,!!e()))}function Yi(e,t={}){const{window:n=je}=t,s=ra(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=fe(!1),o=u=>{i.value=u.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=Li(()=>{s.value&&(l(),r=n.matchMedia(ze(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return Is(()=>{c(),l(),r=void 0}),i}const Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},en="__vueuse_ssr_handlers__",ia=oa();function oa(){return en in Zt||(Zt[en]=Zt[en]||{}),Zt[en]}function Ji(e,t){return ia[e]||t}function la(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const ca={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Cr="vueuse-storage";function aa(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:h=je,eventFilter:v,onError:T=_=>{console.error(_)},initOnMounted:N}=s,P=(d?Qr:fe)(typeof t=="function"?t():t);if(!n)try{n=Ji("getDefaultStorage",()=>{var _;return(_=je)==null?void 0:_.localStorage})()}catch(_){T(_)}if(!n)return P;const W=ze(t),q=la(W),G=(r=s.serializer)!=null?r:ca[q],{pause:p,resume:m}=ta(P,()=>R(P.value),{flush:i,deep:o,eventFilter:v});h&&l&&Ms(()=>{n instanceof Storage?xt(h,"storage",B):xt(h,Cr,O),N&&B()}),N||B();function I(_,M){if(h){const E={key:e,oldValue:_,newValue:M,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",E):new CustomEvent(Cr,{detail:E}))}}function R(_){try{const M=n.getItem(e);if(_==null)I(M,null),n.removeItem(e);else{const E=G.write(_);M!==E&&(n.setItem(e,E),I(M,E))}}catch(M){T(M)}}function U(_){const M=_?_.newValue:n.getItem(e);if(M==null)return c&&W!=null&&n.setItem(e,G.write(W)),W;if(!_&&u){const E=G.read(M);return typeof u=="function"?u(E,W):q==="object"&&!Array.isArray(E)?{...W,...E}:E}else return typeof M!="string"?M:G.read(M)}function B(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){P.value=W;return}if(!(_&&_.key!==e)){p();try{(_==null?void 0:_.newValue)!==G.write(P.value)&&(P.value=U(_))}catch(M){T(M)}finally{_?Cn(m):m()}}}}function O(_){B(_.detail)}return P}function Qi(e){return Yi("(prefers-color-scheme: dark)",e)}const fa="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function ua(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=je,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},v=Qi({window:r}),T=re(()=>v.value?"dark":"light"),N=c||(o==null?zi(s):aa(o,s,i,{window:r,listenToStorageChanges:l})),P=re(()=>N.value==="auto"?T.value:N.value),W=Ji("updateHTMLAttrs",(m,I,R)=>{const U=typeof m=="string"?r==null?void 0:r.document.querySelector(m):Xi(m);if(!U)return;const B=new Set,O=new Set;let _=null;if(I==="class"){const E=R.split(/\s/g);Object.values(h).flatMap(D=>(D||"").split(/\s/g)).filter(Boolean).forEach(D=>{E.includes(D)?B.add(D):O.add(D)})}else _={key:I,value:R};if(B.size===0&&O.size===0&&_===null)return;let M;d&&(M=r.document.createElement("style"),M.appendChild(document.createTextNode(fa)),r.document.head.appendChild(M));for(const E of B)U.classList.add(E);for(const E of O)U.classList.remove(E);_&&U.setAttribute(_.key,_.value),d&&(r.getComputedStyle(M).opacity,document.head.removeChild(M))});function q(m){var I;W(t,n,(I=h[m])!=null?I:m)}function G(m){e.onChanged?e.onChanged(m,q):q(m)}Fe(P,G,{flush:"post",immediate:!0}),Ms(()=>G(P.value));const p=re({get(){return u?N.value:P.value},set(m){N.value=m}});try{return Object.assign(p,{store:N,system:T,state:P})}catch{return p}}function da(e={}){const{valueDark:t="dark",valueLight:n="",window:s=je}=e,r=ua({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=re(()=>r.system?r.system.value:Qi({window:s}).value?"dark":"light");return re({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function Wn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Zi(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const qn=new WeakMap;function sf(e,t=!1){const n=fe(t);let s=null,r="";Fe(zi(e),l=>{const c=Wn(ze(l));if(c){const u=c;if(qn.get(u)||qn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(r=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Wn(ze(e));!l||n.value||(Er&&(s=xt(l,"touchmove",c=>{ha(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Wn(ze(e));!l||!n.value||(Er&&(s==null||s()),l.style.overflow=r,qn.delete(l),n.value=!1)};return Is(o),re({get(){return n.value},set(l){l?i():o()}})}function rf(e={}){const{window:t=je,behavior:n="auto"}=e;if(!t)return{x:fe(0),y:fe(0)};const s=fe(t.scrollX),r=fe(t.scrollY),i=re({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=re({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return xt(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function of(e={}){const{window:t=je,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=fe(n),c=fe(s),u=()=>{t&&(o==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(u(),Ms(u),xt("resize",u,{passive:!0}),r){const d=Yi("(orientation: portrait)");Fe(d,()=>u())}return{width:l,height:c}}const Gn={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var zn={};const eo=/^(?:[a-z]+:|\/\/)/i,pa="vitepress-theme-appearance",ga=/#.*$/,ma=/[?#].*$/,ya=/(?:(^|\/)index)?\.(?:md|html)$/,de=typeof document<"u",to={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function _a(e,t,n=!1){if(t===void 0)return!1;if(e=Sr(`/${e}`),n)return new RegExp(t).test(e);if(Sr(t)!==e)return!1;const s=t.match(ga);return s?(de?location.hash:"")===s[0]:!0}function Sr(e){return decodeURI(e).replace(ma,"").replace(ya,"$1")}function ba(e){return eo.test(e)}function va(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!ba(n)&&_a(t,`/${n}/`,!0))||"root"}function wa(e,t){var s,r,i,o,l,c,u;const n=va(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:so(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function no(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=Ea(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function Ea(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ca(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function so(e,t){return[...e.filter(n=>!Ca(t,n)),...t]}const Sa=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,xa=/^[a-z]:/i;function xr(e){const t=xa.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Sa,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const Xn=new Set;function Ta(e){if(Xn.size===0){const n=typeof process=="object"&&(zn==null?void 0:zn.VITE_EXTRA_EXTENSIONS)||(Gn==null?void 0:Gn.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>Xn.add(s))}const t=e.split(".").pop();return t==null||!Xn.has(t.toLowerCase())}const Aa=Symbol(),ut=Qr(Gc);function lf(e){const t=re(()=>wa(ut.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?fe(!0):n?da({storageKey:pa,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):fe(!1),r=fe(de?location.hash:"");return de&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Fe(()=>e.data,()=>{r.value=de?location.hash:""}),{site:t,theme:re(()=>t.value.themeConfig),page:re(()=>e.data),frontmatter:re(()=>e.data.frontmatter),params:re(()=>e.data.params),lang:re(()=>t.value.lang),dir:re(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:re(()=>t.value.localeIndex||"root"),title:re(()=>no(t.value,e.data)),description:re(()=>e.data.description||t.value.description),isDark:s,hash:re(()=>r.value)}}function Ra(){const e=Ct(Aa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Oa(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Tr(e){return eo.test(e)||!e.startsWith("/")?e:Oa(ut.value.base,e)}function La(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),de){const n="/";t=xr(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${xr(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let ln=[];function cf(e){ln.push(e),An(()=>{ln=ln.filter(t=>t!==e)})}function Ia(){let e=ut.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ar(e,n);else if(Array.isArray(e))for(const s of e){const r=Ar(s,n);if(r){t=r;break}}return t}function Ar(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Ma=Symbol(),ro="http://a.com",Pa=()=>({path:"/",component:null,data:to});function af(e,t){const n=vn(Pa()),s={route:n,go:r};async function r(l=de?location.href:"/"){var c,u;l=Yn(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(de&&l!==Yn(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((u=s.onAfterRouteChanged)==null?void 0:u.call(s,l)))}let i=null;async function o(l,c=0,u=!1){var v;if(await((v=s.onBeforePageLoad)==null?void 0:v.call(s,l))===!1)return;const d=new URL(l,ro),h=i=d.pathname;try{let T=await e(h);if(!T)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:N,__pageData:P}=T;if(!N)throw new Error(`Invalid route component: ${N}`);n.path=de?h:Tr(h),n.component=sn(N),n.data=sn(P),de&&Cn(()=>{let W=ut.value.base+P.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ut.value.cleanUrls&&!W.endsWith("/")&&(W+=".html"),W!==d.pathname&&(d.pathname=W,l=W+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let q=null;try{q=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(G){console.warn(G)}if(q){Rr(q,d.hash);return}}window.scrollTo(0,c)})}}catch(T){if(!/fetch|Page not found/.test(T.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(T),!u)try{const N=await fetch(ut.value.base+"hashmap.json");window.__VP_HASH_MAP__=await N.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=de?h:Tr(h),n.component=t?sn(t):null;const N=de?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...to,relativePath:N}}}}return de&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const u=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(u==null)return;const{href:d,origin:h,pathname:v,hash:T,search:N}=new URL(u,c.baseURI),P=new URL(location.href);h===P.origin&&Ta(v)&&(l.preventDefault(),v===P.pathname&&N===P.search?(T!==P.hash&&(history.pushState({},"",d),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:P.href,newURL:d}))),T?Rr(c,T,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(d))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(Yn(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Na(){const e=Ct(Ma);if(!e)throw new Error("useRouter() is called without provider.");return e}function io(){return Na().route}function Rr(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-Ia()+i;requestAnimationFrame(r)}}function Yn(e){const t=new URL(e,ro);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ut.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const Jn=()=>ln.forEach(e=>e()),ff=ai({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=io(),{site:n}=Ra();return()=>fs(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?fs(t.component,{onVnodeMounted:Jn,onVnodeUpdated:Jn,onVnodeUnmounted:Jn}):"404 Page Not Found"])}}),uf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},df=ai({setup(e,{slots:t}){const n=fe(!1);return Tt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function hf(){de&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(u=>u.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function pf(){if(de){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let u=c.textContent||"";o&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),Fa(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function Fa(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function gf(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=Qn(l);for(const u of document.head.children)if(u.isEqualNode(c)){s.push(u);return}});return}const o=i.map(Qn);s.forEach((l,c)=>{const u=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));u!==-1?delete o[u]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Li(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],u=no(o,i);u!==document.title&&(document.title=u);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):Qn(["meta",{name:"description",content:d}]),r(so(o.head,$a(c)))})}function Qn([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&!t.async&&(s.async=!1),s}function Ha(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function $a(e){return e.filter(t=>!Ha(t))}const Zn=new Set,oo=()=>document.createElement("link"),ja=e=>{const t=oo();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Da=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let tn;const Va=de&&(tn=oo())&&tn.relList&&tn.relList.supports&&tn.relList.supports("prefetch")?ja:Da;function mf(){if(!de||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Zn.has(c)){Zn.add(c);const u=La(c);u&&Va(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):Zn.add(l))})})};Tt(s);const r=io();Fe(()=>r.path,s),An(()=>{n&&n.disconnect()})}export{ui as $,Xa as A,yl as B,Ia as C,ka as D,Wa as E,be as F,Qr as G,cf as H,ue as I,Ka as J,eo as K,io as L,ic as M,Ct as N,of as O,gs as P,nf as Q,Cn as R,rf as S,ki as T,de as U,wn as V,sf as W,Il as X,ef as Y,Ga as Z,uf as _,Di as a,Za as a0,za as a1,Ja as a2,gf as a3,Ma as a4,lf as a5,Aa as a6,ff as a7,df as a8,ut as a9,tf as aa,af as ab,La as ac,mf as ad,pf as ae,hf as af,fs as ag,Hi as b,Ya as c,ai as d,Qa as e,Ta as f,Tr as g,re as h,ba as i,ji as j,ei as k,Ba as l,_a as m,ms as n,Ni as o,Ua as p,Yi as q,qa as r,fe as s,Co as t,Ra as u,Fe as v,cl as w,Li as x,Tt as y,An as z}; +**/const gc="http://www.w3.org/2000/svg",mc="http://www.w3.org/1998/Math/MathML",He=typeof document<"u"?document:null,lr=He&&He.createElement("template"),yc={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?He.createElementNS(gc,e):t==="mathml"?He.createElementNS(mc,e):n?He.createElement(e,{is:n}):He.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>He.createTextNode(e),createComment:e=>He.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>He.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{lr.innerHTML=s==="svg"?`${e}`:s==="mathml"?`${e}`:e;const l=lr.content;if(s==="svg"||s==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ue="transition",Ot="animation",Dt=Symbol("_vtc"),ki=(e,{slots:t})=>fs(ul,_c(e),t);ki.displayName="Transition";const Ki={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String};ki.props=le({},ii,Ki);const st=(e,t=[])=>{V(e)?e.forEach(n=>n(...t)):e&&e(...t)},cr=e=>e?V(e)?e.some(t=>t.length>1):e.length>1:!1;function _c(e){const t={};for(const E in e)E in Ki||(t[E]=e[E]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:v=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,N=bc(r),P=N&&N[0],W=N&&N[1],{onBeforeEnter:q,onEnter:G,onEnterCancelled:p,onLeave:m,onLeaveCancelled:I,onBeforeAppear:R=q,onAppear:U=G,onAppearCancelled:B=p}=t,O=(E,D,ee)=>{rt(E,D?d:l),rt(E,D?u:o),ee&&ee()},_=(E,D)=>{E._isLeaving=!1,rt(E,h),rt(E,T),rt(E,v),D&&D()},M=E=>(D,ee)=>{const ne=E?U:G,$=()=>O(D,E,ee);st(ne,[D,$]),ar(()=>{rt(D,E?c:i),Be(D,E?d:l),cr(ne)||fr(D,s,P,$)})};return le(t,{onBeforeEnter(E){st(q,[E]),Be(E,i),Be(E,o)},onBeforeAppear(E){st(R,[E]),Be(E,c),Be(E,u)},onEnter:M(!1),onAppear:M(!0),onLeave(E,D){E._isLeaving=!0;const ee=()=>_(E,D);Be(E,h),Be(E,v),Ec(),ar(()=>{E._isLeaving&&(rt(E,h),Be(E,T),cr(m)||fr(E,s,W,ee))}),st(m,[E,ee])},onEnterCancelled(E){O(E,!1),st(p,[E])},onAppearCancelled(E){O(E,!0),st(B,[E])},onLeaveCancelled(E){_(E),st(I,[E])}})}function bc(e){if(e==null)return null;if(Z(e))return[Un(e.enter),Un(e.leave)];{const t=Un(e);return[t,t]}}function Un(e){return mo(e)}function Be(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Dt]||(e[Dt]=new Set)).add(t)}function rt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[Dt];n&&(n.delete(t),n.size||(e[Dt]=void 0))}function ar(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let vc=0;function fr(e,t,n,s){const r=e._endId=++vc,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=wc(e,t);if(!o)return s();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,v),i()},v=T=>{T.target===e&&++d>=c&&h()};setTimeout(()=>{d(n[N]||"").split(", "),r=s(`${Ue}Delay`),i=s(`${Ue}Duration`),o=ur(r,i),l=s(`${Ot}Delay`),c=s(`${Ot}Duration`),u=ur(l,c);let d=null,h=0,v=0;t===Ue?o>0&&(d=Ue,h=o,v=i.length):t===Ot?u>0&&(d=Ot,h=u,v=c.length):(h=Math.max(o,u),d=h>0?o>u?Ue:Ot:null,v=d?d===Ue?i.length:c.length:0);const T=d===Ue&&/\b(transform|all)(,|$)/.test(s(`${Ue}Property`).toString());return{type:d,timeout:h,propCount:v,hasTransform:T}}function ur(e,t){for(;e.lengthdr(n)+dr(e[s])))}function dr(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ec(){return document.body.offsetHeight}function Cc(e,t,n){const s=e[Dt];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const hr=Symbol("_vod"),Sc=Symbol("_vsh"),xc=Symbol(""),Tc=/(^|;)\s*display\s*:/;function Ac(e,t,n){const s=e.style,r=ie(n);let i=!1;if(n&&!r){if(t)if(ie(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&on(s,l,"")}else for(const o in t)n[o]==null&&on(s,o,"");for(const o in n)o==="display"&&(i=!0),on(s,o,n[o])}else if(r){if(t!==n){const o=s[xc];o&&(n+=";"+o),s.cssText=n,i=Tc.test(n)}}else t&&e.removeAttribute("style");hr in e&&(e[hr]=i?s.display:"",e[Sc]&&(s.display="none"))}const pr=/\s*!important$/;function on(e,t,n){if(V(n))n.forEach(s=>on(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=Rc(e,t);pr.test(n)?e.setProperty(Qe(s),n.replace(pr,""),"important"):e[s]=n}}const gr=["Webkit","Moz","ms"],Bn={};function Rc(e,t){const n=Bn[t];if(n)return n;let s=Le(t);if(s!=="filter"&&s in e)return Bn[t]=s;s=_n(s);for(let r=0;rkn||(Nc.then(()=>kn=0),kn=Date.now());function Hc(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Re($c(s,n.value),t,5,[s])};return n.value=e,n.attached=Fc(),n}function $c(e,t){if(V(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const vr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,jc=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Cc(e,s,o):t==="style"?Ac(e,n,s):Vt(t)?ds(t)||Mc(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Dc(e,t,s,o))?(Oc(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&yr(e,t,s,o,i,t!=="value")):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),yr(e,t,s,o))};function Dc(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&vr(t)&&K(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return vr(t)&&ie(n)?!1:t in e}const Vc=["ctrl","shift","alt","meta"],Uc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Vc.some(n=>e[`${n}Key`]&&!t.includes(n))},Za=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Qe(r.key);if(t.some(o=>o===i||Bc[o]===i))return e(r)})},kc=le({patchProp:jc},yc);let Kn,wr=!1;function Kc(){return Kn=wr?Kn:kl(kc),wr=!0,Kn}const tf=(...e)=>{const t=Kc().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=qc(s);if(r)return n(r,!0,Wc(r))},t};function Wc(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function qc(e){return ie(e)?document.querySelector(e):e}const nf=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n},Gc=window.__VP_SITE_DATA__;function Is(e){return jr()?(To(e),!0):!1}function ze(e){return typeof e=="function"?e():ei(e)}const Wi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zc=Object.prototype.toString,Xc=e=>zc.call(e)==="[object Object]",qi=()=>{},Er=Yc();function Yc(){var e,t;return Wi&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Jc(e,t){function n(...s){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,s),{fn:t,thisArg:this,args:s})).then(r).catch(i)})}return n}const Gi=e=>e();function Qc(e=Gi){const t=fe(!0);function n(){t.value=!1}function s(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:wn(t),pause:n,resume:s,eventFilter:r}}function Zc(e){return Ln()}function zi(...e){if(e.length!==1)return tl(...e);const t=e[0];return typeof t=="function"?wn(Qo(()=>({get:t,set:qi}))):fe(t)}function ea(e,t,n={}){const{eventFilter:s=Gi,...r}=n;return Fe(e,Jc(s,t),r)}function ta(e,t,n={}){const{eventFilter:s,...r}=n,{eventFilter:i,pause:o,resume:l,isActive:c}=Qc(s);return{stop:ea(e,t,{...r,eventFilter:i}),pause:o,resume:l,isActive:c}}function Ms(e,t=!0,n){Zc()?Tt(e,n):t?e():Cn(e)}function Xi(e){var t;const n=ze(e);return(t=n==null?void 0:n.$el)!=null?t:n}const je=Wi?window:void 0;function xt(...e){let t,n,s,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,s,r]=e,t=je):[t,n,s,r]=e,!t)return qi;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);const i=[],o=()=>{i.forEach(d=>d()),i.length=0},l=(d,h,v,T)=>(d.addEventListener(h,v,T),()=>d.removeEventListener(h,v,T)),c=Fe(()=>[Xi(t),ze(r)],([d,h])=>{if(o(),!d)return;const v=Xc(h)?{...h}:h;i.push(...n.flatMap(T=>s.map(N=>l(d,T,N,v))))},{immediate:!0,flush:"post"}),u=()=>{c(),o()};return Is(u),u}function na(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function sf(...e){let t,n,s={};e.length===3?(t=e[0],n=e[1],s=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],s=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=je,eventName:i="keydown",passive:o=!1,dedupe:l=!1}=s,c=na(t);return xt(r,i,d=>{d.repeat&&ze(l)||c(d)&&n(d)},o)}function sa(){const e=fe(!1),t=Ln();return t&&Tt(()=>{e.value=!0},t),e}function ra(e){const t=sa();return re(()=>(t.value,!!e()))}function Yi(e,t={}){const{window:n=je}=t,s=ra(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let r;const i=fe(!1),o=u=>{i.value=u.matches},l=()=>{r&&("removeEventListener"in r?r.removeEventListener("change",o):r.removeListener(o))},c=Li(()=>{s.value&&(l(),r=n.matchMedia(ze(e)),"addEventListener"in r?r.addEventListener("change",o):r.addListener(o),i.value=r.matches)});return Is(()=>{c(),l(),r=void 0}),i}const Zt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},en="__vueuse_ssr_handlers__",ia=oa();function oa(){return en in Zt||(Zt[en]=Zt[en]||{}),Zt[en]}function Ji(e,t){return ia[e]||t}function la(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const ca={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Cr="vueuse-storage";function aa(e,t,n,s={}){var r;const{flush:i="pre",deep:o=!0,listenToStorageChanges:l=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:h=je,eventFilter:v,onError:T=_=>{console.error(_)},initOnMounted:N}=s,P=(d?Qr:fe)(typeof t=="function"?t():t);if(!n)try{n=Ji("getDefaultStorage",()=>{var _;return(_=je)==null?void 0:_.localStorage})()}catch(_){T(_)}if(!n)return P;const W=ze(t),q=la(W),G=(r=s.serializer)!=null?r:ca[q],{pause:p,resume:m}=ta(P,()=>R(P.value),{flush:i,deep:o,eventFilter:v});h&&l&&Ms(()=>{n instanceof Storage?xt(h,"storage",B):xt(h,Cr,O),N&&B()}),N||B();function I(_,M){if(h){const E={key:e,oldValue:_,newValue:M,storageArea:n};h.dispatchEvent(n instanceof Storage?new StorageEvent("storage",E):new CustomEvent(Cr,{detail:E}))}}function R(_){try{const M=n.getItem(e);if(_==null)I(M,null),n.removeItem(e);else{const E=G.write(_);M!==E&&(n.setItem(e,E),I(M,E))}}catch(M){T(M)}}function U(_){const M=_?_.newValue:n.getItem(e);if(M==null)return c&&W!=null&&n.setItem(e,G.write(W)),W;if(!_&&u){const E=G.read(M);return typeof u=="function"?u(E,W):q==="object"&&!Array.isArray(E)?{...W,...E}:E}else return typeof M!="string"?M:G.read(M)}function B(_){if(!(_&&_.storageArea!==n)){if(_&&_.key==null){P.value=W;return}if(!(_&&_.key!==e)){p();try{(_==null?void 0:_.newValue)!==G.write(P.value)&&(P.value=U(_))}catch(M){T(M)}finally{_?Cn(m):m()}}}}function O(_){B(_.detail)}return P}function Qi(e){return Yi("(prefers-color-scheme: dark)",e)}const fa="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function ua(e={}){const{selector:t="html",attribute:n="class",initialValue:s="auto",window:r=je,storage:i,storageKey:o="vueuse-color-scheme",listenToStorageChanges:l=!0,storageRef:c,emitAuto:u,disableTransition:d=!0}=e,h={auto:"",light:"light",dark:"dark",...e.modes||{}},v=Qi({window:r}),T=re(()=>v.value?"dark":"light"),N=c||(o==null?zi(s):aa(o,s,i,{window:r,listenToStorageChanges:l})),P=re(()=>N.value==="auto"?T.value:N.value),W=Ji("updateHTMLAttrs",(m,I,R)=>{const U=typeof m=="string"?r==null?void 0:r.document.querySelector(m):Xi(m);if(!U)return;const B=new Set,O=new Set;let _=null;if(I==="class"){const E=R.split(/\s/g);Object.values(h).flatMap(D=>(D||"").split(/\s/g)).filter(Boolean).forEach(D=>{E.includes(D)?B.add(D):O.add(D)})}else _={key:I,value:R};if(B.size===0&&O.size===0&&_===null)return;let M;d&&(M=r.document.createElement("style"),M.appendChild(document.createTextNode(fa)),r.document.head.appendChild(M));for(const E of B)U.classList.add(E);for(const E of O)U.classList.remove(E);_&&U.setAttribute(_.key,_.value),d&&(r.getComputedStyle(M).opacity,document.head.removeChild(M))});function q(m){var I;W(t,n,(I=h[m])!=null?I:m)}function G(m){e.onChanged?e.onChanged(m,q):q(m)}Fe(P,G,{flush:"post",immediate:!0}),Ms(()=>G(P.value));const p=re({get(){return u?N.value:P.value},set(m){N.value=m}});try{return Object.assign(p,{store:N,system:T,state:P})}catch{return p}}function da(e={}){const{valueDark:t="dark",valueLight:n="",window:s=je}=e,r=ua({...e,onChanged:(l,c)=>{var u;e.onChanged?(u=e.onChanged)==null||u.call(e,l==="dark",c,l):c(l)},modes:{dark:t,light:n}}),i=re(()=>r.system?r.system.value:Qi({window:s}).value?"dark":"light");return re({get(){return r.value==="dark"},set(l){const c=l?"dark":"light";i.value===c?r.value="auto":r.value=c}})}function Wn(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function Zi(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.preventDefault(),!1)}const qn=new WeakMap;function rf(e,t=!1){const n=fe(t);let s=null,r="";Fe(zi(e),l=>{const c=Wn(ze(l));if(c){const u=c;if(qn.get(u)||qn.set(u,u.style.overflow),u.style.overflow!=="hidden"&&(r=u.style.overflow),u.style.overflow==="hidden")return n.value=!0;if(n.value)return u.style.overflow="hidden"}},{immediate:!0});const i=()=>{const l=Wn(ze(e));!l||n.value||(Er&&(s=xt(l,"touchmove",c=>{ha(c)},{passive:!1})),l.style.overflow="hidden",n.value=!0)},o=()=>{const l=Wn(ze(e));!l||!n.value||(Er&&(s==null||s()),l.style.overflow=r,qn.delete(l),n.value=!1)};return Is(o),re({get(){return n.value},set(l){l?i():o()}})}function of(e={}){const{window:t=je,behavior:n="auto"}=e;if(!t)return{x:fe(0),y:fe(0)};const s=fe(t.scrollX),r=fe(t.scrollY),i=re({get(){return s.value},set(l){scrollTo({left:l,behavior:n})}}),o=re({get(){return r.value},set(l){scrollTo({top:l,behavior:n})}});return xt(t,"scroll",()=>{s.value=t.scrollX,r.value=t.scrollY},{capture:!1,passive:!0}),{x:i,y:o}}function lf(e={}){const{window:t=je,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,listenOrientation:r=!0,includeScrollbar:i=!0,type:o="inner"}=e,l=fe(n),c=fe(s),u=()=>{t&&(o==="outer"?(l.value=t.outerWidth,c.value=t.outerHeight):i?(l.value=t.innerWidth,c.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight))};if(u(),Ms(u),xt("resize",u,{passive:!0}),r){const d=Yi("(orientation: portrait)");Fe(d,()=>u())}return{width:l,height:c}}const Gn={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1};var zn={};const eo=/^(?:[a-z]+:|\/\/)/i,pa="vitepress-theme-appearance",ga=/#.*$/,ma=/[?#].*$/,ya=/(?:(^|\/)index)?\.(?:md|html)$/,de=typeof document<"u",to={relativePath:"404.md",filePath:"",title:"404",description:"Not Found",headers:[],frontmatter:{sidebar:!1,layout:"page"},lastUpdated:0,isNotFound:!0};function _a(e,t,n=!1){if(t===void 0)return!1;if(e=Sr(`/${e}`),n)return new RegExp(t).test(e);if(Sr(t)!==e)return!1;const s=t.match(ga);return s?(de?location.hash:"")===s[0]:!0}function Sr(e){return decodeURI(e).replace(ma,"").replace(ya,"$1")}function ba(e){return eo.test(e)}function va(e,t){return Object.keys((e==null?void 0:e.locales)||{}).find(n=>n!=="root"&&!ba(n)&&_a(t,`/${n}/`,!0))||"root"}function wa(e,t){var s,r,i,o,l,c,u;const n=va(e,t);return Object.assign({},e,{localeIndex:n,lang:((s=e.locales[n])==null?void 0:s.lang)??e.lang,dir:((r=e.locales[n])==null?void 0:r.dir)??e.dir,title:((i=e.locales[n])==null?void 0:i.title)??e.title,titleTemplate:((o=e.locales[n])==null?void 0:o.titleTemplate)??e.titleTemplate,description:((l=e.locales[n])==null?void 0:l.description)??e.description,head:so(e.head,((c=e.locales[n])==null?void 0:c.head)??[]),themeConfig:{...e.themeConfig,...(u=e.locales[n])==null?void 0:u.themeConfig}})}function no(e,t){const n=t.title||e.title,s=t.titleTemplate??e.titleTemplate;if(typeof s=="string"&&s.includes(":title"))return s.replace(/:title/g,n);const r=Ea(e.title,s);return n===r.slice(3)?n:`${n}${r}`}function Ea(e,t){return t===!1?"":t===!0||t===void 0?` | ${e}`:e===t?"":` | ${t}`}function Ca(e,t){const[n,s]=t;if(n!=="meta")return!1;const r=Object.entries(s)[0];return r==null?!1:e.some(([i,o])=>i===n&&o[r[0]]===r[1])}function so(e,t){return[...e.filter(n=>!Ca(t,n)),...t]}const Sa=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g,xa=/^[a-z]:/i;function xr(e){const t=xa.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(Sa,"_").replace(/(^|\/)_+(?=[^/]*$)/,"$1")}const Xn=new Set;function Ta(e){if(Xn.size===0){const n=typeof process=="object"&&(zn==null?void 0:zn.VITE_EXTRA_EXTENSIONS)||(Gn==null?void 0:Gn.VITE_EXTRA_EXTENSIONS)||"";("3g2,3gp,aac,ai,apng,au,avif,bin,bmp,cer,class,conf,crl,css,csv,dll,doc,eps,epub,exe,gif,gz,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,m4a,man,mid,midi,mjs,mov,mp2,mp3,mp4,mpe,mpeg,mpg,mpp,oga,ogg,ogv,ogx,opus,otf,p10,p7c,p7m,p7s,pdf,png,ps,qt,roff,rtf,rtx,ser,svg,t,tif,tiff,tr,ts,tsv,ttf,txt,vtt,wav,weba,webm,webp,woff,woff2,xhtml,xml,yaml,yml,zip"+(n&&typeof n=="string"?","+n:"")).split(",").forEach(s=>Xn.add(s))}const t=e.split(".").pop();return t==null||!Xn.has(t.toLowerCase())}const Aa=Symbol(),ut=Qr(Gc);function cf(e){const t=re(()=>wa(ut.value,e.data.relativePath)),n=t.value.appearance,s=n==="force-dark"?fe(!0):n?da({storageKey:pa,initialValue:()=>n==="dark"?"dark":"auto",...typeof n=="object"?n:{}}):fe(!1),r=fe(de?location.hash:"");return de&&window.addEventListener("hashchange",()=>{r.value=location.hash}),Fe(()=>e.data,()=>{r.value=de?location.hash:""}),{site:t,theme:re(()=>t.value.themeConfig),page:re(()=>e.data),frontmatter:re(()=>e.data.frontmatter),params:re(()=>e.data.params),lang:re(()=>t.value.lang),dir:re(()=>e.data.frontmatter.dir||t.value.dir),localeIndex:re(()=>t.value.localeIndex||"root"),title:re(()=>no(t.value,e.data)),description:re(()=>e.data.description||t.value.description),isDark:s,hash:re(()=>r.value)}}function Ra(){const e=Ct(Aa);if(!e)throw new Error("vitepress data not properly injected in app");return e}function Oa(e,t){return`${e}${t}`.replace(/\/+/g,"/")}function Tr(e){return eo.test(e)||!e.startsWith("/")?e:Oa(ut.value.base,e)}function La(e){let t=e.replace(/\.html$/,"");if(t=decodeURIComponent(t),t=t.replace(/\/$/,"/index"),de){const n="/";t=xr(t.slice(n.length).replace(/\//g,"_")||"index")+".md";let s=__VP_HASH_MAP__[t.toLowerCase()];if(s||(t=t.endsWith("_index.md")?t.slice(0,-9)+".md":t.slice(0,-3)+"_index.md",s=__VP_HASH_MAP__[t.toLowerCase()]),!s)return null;t=`${n}assets/${t}.${s}.js`}else t=`./${xr(t.slice(1).replace(/\//g,"_"))}.md.js`;return t}let ln=[];function af(e){ln.push(e),An(()=>{ln=ln.filter(t=>t!==e)})}function Ia(){let e=ut.value.scrollOffset,t=0,n=24;if(typeof e=="object"&&"padding"in e&&(n=e.padding,e=e.selector),typeof e=="number")t=e;else if(typeof e=="string")t=Ar(e,n);else if(Array.isArray(e))for(const s of e){const r=Ar(s,n);if(r){t=r;break}}return t}function Ar(e,t){const n=document.querySelector(e);if(!n)return 0;const s=n.getBoundingClientRect().bottom;return s<0?0:s+t}const Ma=Symbol(),ro="http://a.com",Pa=()=>({path:"/",component:null,data:to});function ff(e,t){const n=vn(Pa()),s={route:n,go:r};async function r(l=de?location.href:"/"){var c,u;l=Yn(l),await((c=s.onBeforeRouteChange)==null?void 0:c.call(s,l))!==!1&&(de&&l!==Yn(location.href)&&(history.replaceState({scrollPosition:window.scrollY},""),history.pushState({},"",l)),await o(l),await((u=s.onAfterRouteChanged)==null?void 0:u.call(s,l)))}let i=null;async function o(l,c=0,u=!1){var v;if(await((v=s.onBeforePageLoad)==null?void 0:v.call(s,l))===!1)return;const d=new URL(l,ro),h=i=d.pathname;try{let T=await e(h);if(!T)throw new Error(`Page not found: ${h}`);if(i===h){i=null;const{default:N,__pageData:P}=T;if(!N)throw new Error(`Invalid route component: ${N}`);n.path=de?h:Tr(h),n.component=sn(N),n.data=sn(P),de&&Cn(()=>{let W=ut.value.base+P.relativePath.replace(/(?:(^|\/)index)?\.md$/,"$1");if(!ut.value.cleanUrls&&!W.endsWith("/")&&(W+=".html"),W!==d.pathname&&(d.pathname=W,l=W+d.search+d.hash,history.replaceState({},"",l)),d.hash&&!c){let q=null;try{q=document.getElementById(decodeURIComponent(d.hash).slice(1))}catch(G){console.warn(G)}if(q){Rr(q,d.hash);return}}window.scrollTo(0,c)})}}catch(T){if(!/fetch|Page not found/.test(T.message)&&!/^\/404(\.html|\/)?$/.test(l)&&console.error(T),!u)try{const N=await fetch(ut.value.base+"hashmap.json");window.__VP_HASH_MAP__=await N.json(),await o(l,c,!0);return}catch{}if(i===h){i=null,n.path=de?h:Tr(h),n.component=t?sn(t):null;const N=de?h.replace(/(^|\/)$/,"$1index").replace(/(\.html)?$/,".md").replace(/^\//,""):"404.md";n.data={...to,relativePath:N}}}}return de&&(history.state===null&&history.replaceState({},""),window.addEventListener("click",l=>{if(l.defaultPrevented||!(l.target instanceof Element)||l.target.closest("button")||l.button!==0||l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)return;const c=l.target.closest("a");if(!c||c.closest(".vp-raw")||c.hasAttribute("download")||c.hasAttribute("target"))return;const u=c.getAttribute("href")??(c instanceof SVGAElement?c.getAttribute("xlink:href"):null);if(u==null)return;const{href:d,origin:h,pathname:v,hash:T,search:N}=new URL(u,c.baseURI),P=new URL(location.href);h===P.origin&&Ta(v)&&(l.preventDefault(),v===P.pathname&&N===P.search?(T!==P.hash&&(history.pushState({},"",d),window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:P.href,newURL:d}))),T?Rr(c,T,c.classList.contains("header-anchor")):window.scrollTo(0,0)):r(d))},{capture:!0}),window.addEventListener("popstate",async l=>{var c;l.state!==null&&(await o(Yn(location.href),l.state&&l.state.scrollPosition||0),(c=s.onAfterRouteChanged)==null||c.call(s,location.href))}),window.addEventListener("hashchange",l=>{l.preventDefault()})),s}function Na(){const e=Ct(Ma);if(!e)throw new Error("useRouter() is called without provider.");return e}function io(){return Na().route}function Rr(e,t,n=!1){let s=null;try{s=e.classList.contains("header-anchor")?e:document.getElementById(decodeURIComponent(t).slice(1))}catch(r){console.warn(r)}if(s){let r=function(){!n||Math.abs(o-window.scrollY)>window.innerHeight?window.scrollTo(0,o):window.scrollTo({left:0,top:o,behavior:"smooth"})};const i=parseInt(window.getComputedStyle(s).paddingTop,10),o=window.scrollY+s.getBoundingClientRect().top-Ia()+i;requestAnimationFrame(r)}}function Yn(e){const t=new URL(e,ro);return t.pathname=t.pathname.replace(/(^|\/)index(\.html)?$/,"$1"),ut.value.cleanUrls?t.pathname=t.pathname.replace(/\.html$/,""):!t.pathname.endsWith("/")&&!t.pathname.endsWith(".html")&&(t.pathname+=".html"),t.pathname+t.search+t.hash}const Jn=()=>ln.forEach(e=>e()),uf=ai({name:"VitePressContent",props:{as:{type:[Object,String],default:"div"}},setup(e){const t=io(),{site:n}=Ra();return()=>fs(e.as,n.value.contentProps??{style:{position:"relative"}},[t.component?fs(t.component,{onVnodeMounted:Jn,onVnodeUpdated:Jn,onVnodeUnmounted:Jn}):"404 Page Not Found"])}}),df=ai({setup(e,{slots:t}){const n=fe(!1);return Tt(()=>{n.value=!0}),()=>n.value&&t.default?t.default():null}});function hf(){de&&window.addEventListener("click",e=>{var n;const t=e.target;if(t.matches(".vp-code-group input")){const s=(n=t.parentElement)==null?void 0:n.parentElement;if(!s)return;const r=Array.from(s.querySelectorAll("input")).indexOf(t);if(r<0)return;const i=s.querySelector(".blocks");if(!i)return;const o=Array.from(i.children).find(u=>u.classList.contains("active"));if(!o)return;const l=i.children[r];if(!l||o===l)return;o.classList.remove("active"),l.classList.add("active");const c=s==null?void 0:s.querySelector(`label[for="${t.id}"]`);c==null||c.scrollIntoView({block:"nearest"})}})}function pf(){if(de){const e=new WeakMap;window.addEventListener("click",t=>{var s;const n=t.target;if(n.matches('div[class*="language-"] > button.copy')){const r=n.parentElement,i=(s=n.nextElementSibling)==null?void 0:s.nextElementSibling;if(!r||!i)return;const o=/language-(shellscript|shell|bash|sh|zsh)/.test(r.className),l=[".vp-copy-ignore",".diff.remove"],c=i.cloneNode(!0);c.querySelectorAll(l.join(",")).forEach(d=>d.remove());let u=c.textContent||"";o&&(u=u.replace(/^ *(\$|>) /gm,"").trim()),Fa(u).then(()=>{n.classList.add("copied"),clearTimeout(e.get(n));const d=setTimeout(()=>{n.classList.remove("copied"),n.blur(),e.delete(n)},2e3);e.set(n,d)})}})}}async function Fa(e){try{return navigator.clipboard.writeText(e)}catch{const t=document.createElement("textarea"),n=document.activeElement;t.value=e,t.setAttribute("readonly",""),t.style.contain="strict",t.style.position="absolute",t.style.left="-9999px",t.style.fontSize="12pt";const s=document.getSelection(),r=s?s.rangeCount>0&&s.getRangeAt(0):null;document.body.appendChild(t),t.select(),t.selectionStart=0,t.selectionEnd=e.length,document.execCommand("copy"),document.body.removeChild(t),r&&(s.removeAllRanges(),s.addRange(r)),n&&n.focus()}}function gf(e,t){let n=!0,s=[];const r=i=>{if(n){n=!1,i.forEach(l=>{const c=Qn(l);for(const u of document.head.children)if(u.isEqualNode(c)){s.push(u);return}});return}const o=i.map(Qn);s.forEach((l,c)=>{const u=o.findIndex(d=>d==null?void 0:d.isEqualNode(l??null));u!==-1?delete o[u]:(l==null||l.remove(),delete s[c])}),o.forEach(l=>l&&document.head.appendChild(l)),s=[...s,...o].filter(Boolean)};Li(()=>{const i=e.data,o=t.value,l=i&&i.description,c=i&&i.frontmatter.head||[],u=no(o,i);u!==document.title&&(document.title=u);const d=l||o.description;let h=document.querySelector("meta[name=description]");h?h.getAttribute("content")!==d&&h.setAttribute("content",d):Qn(["meta",{name:"description",content:d}]),r(so(o.head,$a(c)))})}function Qn([e,t,n]){const s=document.createElement(e);for(const r in t)s.setAttribute(r,t[r]);return n&&(s.innerHTML=n),e==="script"&&!t.async&&(s.async=!1),s}function Ha(e){return e[0]==="meta"&&e[1]&&e[1].name==="description"}function $a(e){return e.filter(t=>!Ha(t))}const Zn=new Set,oo=()=>document.createElement("link"),ja=e=>{const t=oo();t.rel="prefetch",t.href=e,document.head.appendChild(t)},Da=e=>{const t=new XMLHttpRequest;t.open("GET",e,t.withCredentials=!0),t.send()};let tn;const Va=de&&(tn=oo())&&tn.relList&&tn.relList.supports&&tn.relList.supports("prefetch")?ja:Da;function mf(){if(!de||!window.IntersectionObserver)return;let e;if((e=navigator.connection)&&(e.saveData||/2g/.test(e.effectiveType)))return;const t=window.requestIdleCallback||setTimeout;let n=null;const s=()=>{n&&n.disconnect(),n=new IntersectionObserver(i=>{i.forEach(o=>{if(o.isIntersecting){const l=o.target;n.unobserve(l);const{pathname:c}=l;if(!Zn.has(c)){Zn.add(c);const u=La(c);u&&Va(u)}}})}),t(()=>{document.querySelectorAll("#app a").forEach(i=>{const{hostname:o,pathname:l}=new URL(i.href instanceof SVGAnimatedString?i.href.animVal:i.href,i.baseURI),c=l.match(/\.\w+$/);c&&c[0]!==".html"||i.target!=="_blank"&&o===location.hostname&&(l!==location.pathname?n.observe(i):Zn.add(l))})})};Tt(s);const r=io();Fe(()=>r.path,s),An(()=>{n&&n.disconnect()})}export{ui as $,Xa as A,yl as B,Ia as C,ka as D,Wa as E,be as F,Qr as G,af as H,ue as I,Ka as J,eo as K,io as L,ic as M,Ct as N,lf as O,gs as P,sf as Q,Cn as R,of as S,ki as T,de as U,wn as V,rf as W,Il as X,ef as Y,Ga as Z,nf as _,Di as a,Za as a0,za as a1,Ja as a2,gf as a3,Ma as a4,cf as a5,Aa as a6,uf as a7,df as a8,ut as a9,tf as aa,ff as ab,La as ac,mf as ad,pf as ae,hf as af,fs as ag,Hi as b,Ya as c,ai as d,Qa as e,Ta as f,Tr as g,re as h,ba as i,ji as j,ei as k,Ba as l,_a as m,ms as n,Ni as o,Ua as p,Yi as q,qa as r,fe as s,Co as t,Ra as u,Fe as v,cl as w,Li as x,Tt as y,An as z}; diff --git a/assets/chunks/theme.BPuUWxkA.js b/assets/chunks/theme.CIS5wKR_.js similarity index 92% rename from assets/chunks/theme.BPuUWxkA.js rename to assets/chunks/theme.CIS5wKR_.js index 4fc7e40..d50fc91 100644 --- a/assets/chunks/theme.BPuUWxkA.js +++ b/assets/chunks/theme.CIS5wKR_.js @@ -1 +1 @@ -import{d as _,o as a,c,r as l,n as w,a as O,t as T,b as k,w as v,e as f,T as de,_ as b,u as Oe,i as Ge,f as Ue,g as ve,h as g,j as p,k as r,p as C,l as H,m as W,q as ie,s as I,v as G,x as Z,y as K,z as pe,A as he,B as je,C as ze,D as J,F as M,E,G as ye,H as x,I as m,J as F,K as Pe,L as ee,M as q,N as te,O as qe,P as Ve,Q as We,R as Ke,S as Le,U as oe,V as Je,W as Se,X as Te,Y as Re,Z as Ye,$ as Qe,a0 as Xe,a1 as Ze}from"./framework.BV61Qrc0.js";const xe=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(e,t)=>(a(),c("span",{class:w(["VPBadge",e.type])},[l(e.$slots,"default",{},()=>[O(T(e.text),1)])],2))}}),et={key:0,class:"VPBackdrop"},tt=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(e,t)=>(a(),k(de,{name:"fade"},{default:v(()=>[e.show?(a(),c("div",et)):f("",!0)]),_:1}))}}),ot=b(tt,[["__scopeId","data-v-3cecd3dd"]]),P=Oe;function nt(o,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(o,e):(o(),(s=!0)&&setTimeout(()=>s=!1,e))}}function le(o){return/^\//.test(o)?o:`/${o}`}function fe(o){const{pathname:e,search:t,hash:s,protocol:n}=new URL(o,"http://a.com");if(Ge(o)||o.startsWith("#")||!n.startsWith("http")||!Ue(e))return o;const{site:i}=P(),u=e.endsWith("/")||e.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${s}`);return ve(u)}function Y({correspondingLink:o=!1}={}){const{site:e,localeIndex:t,page:s,theme:n,hash:i}=P(),u=g(()=>{var d,$;return{label:(d=e.value.locales[t.value])==null?void 0:d.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:g(()=>Object.entries(e.value.locales).flatMap(([d,$])=>u.value.label===$.label?[]:{text:$.label,link:st($.link||(d==="root"?"/":`/${d}/`),n.value.i18nRouting!==!1&&o,s.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:u}}function st(o,e,t,s){return e?o.replace(/\/$/,"")+le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):o}const at=o=>(C("data-v-794c8617"),o=o(),H(),o),rt={class:"NotFound"},it={class:"code"},lt={class:"title"},ct=at(()=>p("div",{class:"divider"},null,-1)),ut={class:"quote"},dt={class:"action"},vt=["href","aria-label"],pt=_({__name:"NotFound",setup(o){const{theme:e}=P(),{currentLang:t}=Y();return(s,n)=>{var i,u,h,d,$;return a(),c("div",rt,[p("p",it,T(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),p("h1",lt,T(((u=r(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),ct,p("blockquote",ut,T(((h=r(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),p("div",dt,[p("a",{class:"link",href:r(ve)(r(t).link),"aria-label":((d=r(e).notFound)==null?void 0:d.linkLabel)??"go to home"},T((($=r(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,vt)])])}}}),ht=b(pt,[["__scopeId","data-v-794c8617"]]);function Ie(o,e){if(Array.isArray(o))return Q(o);if(o==null)return[];e=le(e);const t=Object.keys(o).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(le(n))),s=t?o[t]:[];return Array.isArray(s)?Q(s):Q(s.items,s.base)}function ft(o){const e=[];let t=0;for(const s in o){const n=o[s];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function _t(o){const e=[];function t(s){for(const n of s)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(o),e}function ce(o,e){return Array.isArray(e)?e.some(t=>ce(o,t)):W(o,e.link)?!0:e.items?ce(o,e.items):!1}function Q(o,e){return[...o].map(t=>{const s={...t},n=s.base||e;return n&&s.link&&(s.link=n+s.link),s.items&&(s.items=Q(s.items,n)),s})}function U(){const{frontmatter:o,page:e,theme:t}=P(),s=ie("(min-width: 960px)"),n=I(!1),i=g(()=>{const B=t.value.sidebar,S=e.value.relativePath;return B?Ie(B,S):[]}),u=I(i.value);G(i,(B,S)=>{JSON.stringify(B)!==JSON.stringify(S)&&(u.value=i.value)});const h=g(()=>o.value.sidebar!==!1&&u.value.length>0&&o.value.layout!=="home"),d=g(()=>$?o.value.aside==null?t.value.aside==="left":o.value.aside==="left":!1),$=g(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:t.value.aside!==!1),V=g(()=>h.value&&s.value),y=g(()=>h.value?ft(u.value):[]);function L(){n.value=!0}function N(){n.value=!1}function A(){n.value?N():L()}return{isOpen:n,sidebar:u,sidebarGroups:y,hasSidebar:h,hasAside:$,leftAside:d,isSidebarEnabled:V,open:L,close:N,toggle:A}}function mt(o,e){let t;Z(()=>{t=o.value?document.activeElement:void 0}),K(()=>{window.addEventListener("keyup",s)}),pe(()=>{window.removeEventListener("keyup",s)});function s(n){n.key==="Escape"&&o.value&&(e(),t==null||t.focus())}}function kt(o){const{page:e,hash:t}=P(),s=I(!1),n=g(()=>o.value.collapsed!=null),i=g(()=>!!o.value.link),u=I(!1),h=()=>{u.value=W(e.value.relativePath,o.value.link)};G([e,o,t],h),K(h);const d=g(()=>u.value?!0:o.value.items?ce(e.value.relativePath,o.value.items):!1),$=g(()=>!!(o.value.items&&o.value.items.length));Z(()=>{s.value=!!(n.value&&o.value.collapsed)}),he(()=>{(u.value||d.value)&&(s.value=!1)});function V(){n.value&&(s.value=!s.value)}return{collapsed:s,collapsible:n,isLink:i,isActiveLink:u,hasActiveLink:d,hasChildren:$,toggle:V}}function bt(){const{hasSidebar:o}=U(),e=ie("(min-width: 960px)"),t=ie("(min-width: 1280px)");return{isAsideEnabled:g(()=>!t.value&&!e.value?!1:o.value?t.value:e.value)}}const ue=[];function we(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function _e(o){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:$t(t),link:"#"+t.id,level:s}});return gt(e,o)}function $t(o){let e="";for(const t of o.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function gt(o,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;o=o.filter(u=>u.level>=s&&u.level<=n),ue.length=0;for(const{element:u,link:h}of o)ue.push({element:u,link:h});const i=[];e:for(let u=0;u=0;d--){const $=o[d];if($.level{requestAnimationFrame(i),window.addEventListener("scroll",s)}),je(()=>{u(location.hash)}),pe(()=>{window.removeEventListener("scroll",s)});function i(){if(!t.value)return;const h=window.scrollY,d=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(h+d-$)<1,y=ue.map(({element:N,link:A})=>({link:A,top:Pt(N)})).filter(({top:N})=>!Number.isNaN(N)).sort((N,A)=>N.top-A.top);if(!y.length){u(null);return}if(h<1){u(null);return}if(V){u(y[y.length-1].link);return}let L=null;for(const{link:N,top:A}of y){if(A>h+ze()+4)break;L=N}u(L)}function u(h){n&&n.classList.remove("active"),h==null?n=null:n=o.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const d=n;d?(d.classList.add("active"),e.value.style.top=d.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Pt(o){let e=0;for(;o!==document.body;){if(o===null)return NaN;e+=o.offsetTop,o=o.offsetParent}return e}const Vt=["href","title"],Lt=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function e({target:t}){const s=t.href.split("#")[1],n=document.getElementById(decodeURIComponent(s));n==null||n.focus({preventScroll:!0})}return(t,s)=>{const n=J("VPDocOutlineItem",!0);return a(),c("ul",{class:w(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),c(M,null,E(t.headers,({children:i,link:u,title:h})=>(a(),c("li",null,[p("a",{class:"outline-link",href:u,onClick:e,title:h},T(h),9,Vt),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Ne=b(Lt,[["__scopeId","data-v-f55eb20b"]]),St={class:"content"},Tt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},It=_({__name:"VPDocAsideOutline",setup(o){const{frontmatter:e,theme:t}=P(),s=ye([]);x(()=>{s.value=_e(e.value.outline??t.value.outline)});const n=I(),i=I();return yt(n,i),(u,h)=>(a(),c("nav",{"aria-labelledby":"doc-outline-aria-label",class:w(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:n},[p("div",St,[p("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),p("div",Tt,T(r(we)(r(t))),1),m(Ne,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),wt=b(It,[["__scopeId","data-v-e9eccece"]]),Nt={class:"VPDocAsideCarbonAds"},Mt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const e=()=>null;return(t,s)=>(a(),c("div",Nt,[m(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),At=o=>(C("data-v-9030d96a"),o=o(),H(),o),Bt={class:"VPDocAside"},Ct=At(()=>p("div",{class:"spacer"},null,-1)),Ht=_({__name:"VPDocAside",setup(o){const{theme:e}=P();return(t,s)=>(a(),c("div",Bt,[l(t.$slots,"aside-top",{},void 0,!0),l(t.$slots,"aside-outline-before",{},void 0,!0),m(wt),l(t.$slots,"aside-outline-after",{},void 0,!0),Ct,l(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(Mt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):f("",!0),l(t.$slots,"aside-ads-after",{},void 0,!0),l(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Et=b(Ht,[["__scopeId","data-v-9030d96a"]]);function Ft(){const{theme:o,page:e}=P();return g(()=>{const{text:t="Edit this page",pattern:s=""}=o.value.editLink||{};let n;return typeof s=="function"?n=s(e.value):n=s.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function Dt(){const{page:o,theme:e,frontmatter:t}=P();return g(()=>{var $,V,y,L,N,A,B,S;const s=Ie(e.value.sidebar,o.value.relativePath),n=_t(s),i=Ot(n,j=>j.link.replace(/[?#].*$/,"")),u=i.findIndex(j=>W(o.value.relativePath,j.link)),h=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,d=((V=e.value.docFooter)==null?void 0:V.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[u-1])==null?void 0:y.docFooterText)??((L=i[u-1])==null?void 0:L.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((N=i[u-1])==null?void 0:N.link)},next:d?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((A=i[u+1])==null?void 0:A.docFooterText)??((B=i[u+1])==null?void 0:B.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=i[u+1])==null?void 0:S.link)}}})}function Ot(o,e){const t=new Set;return o.filter(s=>{const n=e(s);return t.has(n)?!1:t.add(n)})}const D=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const e=o,t=g(()=>e.tag??(e.href?"a":"span")),s=g(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(F(t.value),{class:w(["VPLink",{link:n.href,"vp-external-link-icon":s.value,"no-icon":n.noIcon}]),href:n.href?r(fe)(n.href):void 0,target:n.target??(s.value?"_blank":void 0),rel:n.rel??(s.value?"noreferrer":void 0)},{default:v(()=>[l(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Gt={class:"VPLastUpdated"},Ut=["datetime"],jt=_({__name:"VPDocFooterLastUpdated",setup(o){const{theme:e,page:t,lang:s}=P(),n=g(()=>new Date(t.value.lastUpdated)),i=g(()=>n.value.toISOString()),u=I("");return K(()=>{Z(()=>{var h,d,$;u.value=new Intl.DateTimeFormat((d=(h=e.value.lastUpdated)==null?void 0:h.formatOptions)!=null&&d.forceLocale?s.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(h,d)=>{var $;return a(),c("p",Gt,[O(T((($=r(e).lastUpdated)==null?void 0:$.text)||r(e).lastUpdatedText||"Last updated")+": ",1),p("time",{datetime:i.value},T(u.value),9,Ut)])}}}),zt=b(jt,[["__scopeId","data-v-0d7790be"]]),Me=o=>(C("data-v-f33b051d"),o=o(),H(),o),qt={key:0,class:"VPDocFooter"},Wt={key:0,class:"edit-info"},Kt={key:0,class:"edit-link"},Jt=Me(()=>p("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Rt={key:1,class:"last-updated"},Yt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Qt=Me(()=>p("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),Xt={class:"pager"},Zt=["innerHTML"],xt=["innerHTML"],eo={class:"pager"},to=["innerHTML"],oo=["innerHTML"],no=_({__name:"VPDocFooter",setup(o){const{theme:e,page:t,frontmatter:s}=P(),n=Ft(),i=Dt(),u=g(()=>e.value.editLink&&s.value.editLink!==!1),h=g(()=>t.value.lastUpdated),d=g(()=>u.value||h.value||i.value.prev||i.value.next);return($,V)=>{var y,L,N,A;return d.value?(a(),c("footer",qt,[l($.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),c("div",Wt,[u.value?(a(),c("div",Kt,[m(D,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:v(()=>[Jt,O(" "+T(r(n).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),c("div",Rt,[m(zt)])):f("",!0)])):f("",!0),(y=r(i).prev)!=null&&y.link||(L=r(i).next)!=null&&L.link?(a(),c("nav",Yt,[Qt,p("div",Xt,[(N=r(i).prev)!=null&&N.link?(a(),k(D,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.prev)||"Previous page"},null,8,Zt),p("span",{class:"title",innerHTML:r(i).prev.text},null,8,xt)]}),_:1},8,["href"])):f("",!0)]),p("div",eo,[(A=r(i).next)!=null&&A.link?(a(),k(D,{key:0,class:"pager-link next",href:r(i).next.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.next)||"Next page"},null,8,to),p("span",{class:"title",innerHTML:r(i).next.text},null,8,oo)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),so=b(no,[["__scopeId","data-v-f33b051d"]]),ao=o=>(C("data-v-aa782c77"),o=o(),H(),o),ro={class:"container"},io=ao(()=>p("div",{class:"aside-curtain"},null,-1)),lo={class:"aside-container"},co={class:"aside-content"},uo={class:"content"},vo={class:"content-container"},po={class:"main"},ho=_({__name:"VPDoc",setup(o){const{theme:e}=P(),t=ee(),{hasSidebar:s,hasAside:n,leftAside:i}=U(),u=g(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,d)=>{const $=J("Content");return a(),c("div",{class:w(["VPDoc",{"has-sidebar":r(s),"has-aside":r(n)}])},[l(h.$slots,"doc-top",{},void 0,!0),p("div",ro,[r(n)?(a(),c("div",{key:0,class:w(["aside",{"left-aside":r(i)}])},[io,p("div",lo,[p("div",co,[m(Et,null,{"aside-top":v(()=>[l(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),p("div",uo,[p("div",vo,[l(h.$slots,"doc-before",{},void 0,!0),p("main",po,[m($,{class:w(["vp-doc",[u.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(so,null,{"doc-footer-before":v(()=>[l(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),l(h.$slots,"doc-after",{},void 0,!0)])])]),l(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),fo=b(ho,[["__scopeId","data-v-aa782c77"]]),_o=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const e=o,t=g(()=>e.href&&Pe.test(e.href)),s=g(()=>e.tag||e.href?"a":"button");return(n,i)=>(a(),k(F(s.value),{class:w(["VPButton",[n.size,n.theme]]),href:n.href?r(fe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:v(()=>[O(T(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),mo=b(_o,[["__scopeId","data-v-2c313aad"]]),ko=["src","alt"],bo=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(e,t)=>{const s=J("VPImage",!0);return e.image?(a(),c(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),c("img",q({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(ve)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,ko)):(a(),c(M,{key:1},[m(s,q({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(s,q({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),X=b(bo,[["__scopeId","data-v-778ce7b3"]]),$o=o=>(C("data-v-1e5b8ae1"),o=o(),H(),o),go={class:"container"},yo={class:"main"},Po={key:0,class:"name"},Vo=["innerHTML"],Lo=["innerHTML"],So=["innerHTML"],To={key:0,class:"actions"},Io={key:0,class:"image"},wo={class:"image-container"},No=$o(()=>p("div",{class:"image-bg"},null,-1)),Mo=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const e=te("hero-image-slot-exists");return(t,s)=>(a(),c("div",{class:w(["VPHero",{"has-image":t.image||r(e)}])},[p("div",go,[p("div",yo,[l(t.$slots,"home-hero-info-before",{},void 0,!0),l(t.$slots,"home-hero-info",{},()=>[t.name?(a(),c("h1",Po,[p("span",{innerHTML:t.name,class:"clip"},null,8,Vo)])):f("",!0),t.text?(a(),c("p",{key:1,innerHTML:t.text,class:"text"},null,8,Lo)):f("",!0),t.tagline?(a(),c("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,So)):f("",!0)],!0),l(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),c("div",To,[(a(!0),c(M,null,E(t.actions,n=>(a(),c("div",{key:n.link,class:"action"},[m(mo,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),c("div",Io,[p("div",wo,[No,l(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Ao=b(Mo,[["__scopeId","data-v-1e5b8ae1"]]),Bo=_({__name:"VPHomeHero",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).hero?(a(),k(Ao,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before")]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info")]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after")]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Co=o=>(C("data-v-dc42ca30"),o=o(),H(),o),Ho={class:"box"},Eo={key:0,class:"icon"},Fo=["innerHTML"],Do=["innerHTML"],Oo=["innerHTML"],Go={key:4,class:"link-text"},Uo={class:"link-text-value"},jo=Co(()=>p("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),zo=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(e,t)=>(a(),k(D,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:v(()=>[p("article",Ho,[typeof e.icon=="object"&&e.icon.wrap?(a(),c("div",Eo,[m(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),c("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Fo)):f("",!0),p("h2",{class:"title",innerHTML:e.title},null,8,Do),e.details?(a(),c("p",{key:3,class:"details",innerHTML:e.details},null,8,Oo)):f("",!0),e.linkText?(a(),c("div",Go,[p("p",Uo,[O(T(e.linkText)+" ",1),jo])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),qo=b(zo,[["__scopeId","data-v-dc42ca30"]]),Wo={key:0,class:"VPFeatures"},Ko={class:"container"},Jo={class:"items"},Ro=_({__name:"VPFeatures",props:{features:{}},setup(o){const e=o,t=g(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,n)=>s.features?(a(),c("div",Wo,[p("div",Ko,[p("div",Jo,[(a(!0),c(M,null,E(s.features,i=>(a(),c("div",{key:i.title,class:w(["item",[t.value]])},[m(qo,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Yo=b(Ro,[["__scopeId","data-v-d6e8dd35"]]),Qo=_({__name:"VPHomeFeatures",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).features?(a(),k(Yo,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):f("",!0)}}),Xo=_({__name:"VPHomeContent",setup(o){const{width:e}=qe({initialWidth:0,includeScrollbar:!1});return(t,s)=>(a(),c("div",{class:"vp-doc container",style:Ve(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[l(t.$slots,"default",{},void 0,!0)],4))}}),Zo=b(Xo,[["__scopeId","data-v-811aea7b"]]),xo={class:"VPHome"},en=_({__name:"VPHome",setup(o){const{frontmatter:e}=P();return(t,s)=>{const n=J("Content");return a(),c("div",xo,[l(t.$slots,"home-hero-before",{},void 0,!0),m(Bo,null,{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),l(t.$slots,"home-hero-after",{},void 0,!0),l(t.$slots,"home-features-before",{},void 0,!0),m(Qo),l(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(Zo,{key:0},{default:v(()=>[m(n)]),_:1})):(a(),k(n,{key:1}))])}}}),tn=b(en,[["__scopeId","data-v-4dea4f14"]]),on={},nn={class:"VPPage"};function sn(o,e){const t=J("Content");return a(),c("div",nn,[l(o.$slots,"page-top"),m(t),l(o.$slots,"page-bottom")])}const an=b(on,[["render",sn]]),rn=_({__name:"VPContent",setup(o){const{page:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>(a(),c("div",{class:w(["VPContent",{"has-sidebar":r(s),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?l(n.$slots,"not-found",{key:0},()=>[m(ht)],!0):r(t).layout==="page"?(a(),k(an,{key:1},{"page-top":v(()=>[l(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(tn,{key:2},{"home-hero-before":v(()=>[l(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(F(r(t).layout),{key:3})):(a(),k(fo,{key:4},{"doc-top":v(()=>[l(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[l(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[l(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[l(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[l(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),ln=b(rn,[["__scopeId","data-v-4fa77a91"]]),cn={class:"container"},un=["innerHTML"],dn=["innerHTML"],vn=_({__name:"VPFooter",setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),c("footer",{key:0,class:w(["VPFooter",{"has-sidebar":r(s)}])},[p("div",cn,[r(e).footer.message?(a(),c("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,un)):f("",!0),r(e).footer.copyright?(a(),c("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,dn)):f("",!0)])],2)):f("",!0)}}),pn=b(vn,[["__scopeId","data-v-50f76801"]]);function hn(){const{theme:o,frontmatter:e}=P(),t=ye([]),s=g(()=>t.value.length>0);return x(()=>{t.value=_e(e.value.outline??o.value.outline)}),{headers:t,hasLocalNav:s}}const fn=o=>(C("data-v-c4b0adf9"),o=o(),H(),o),_n={class:"menu-text"},mn=fn(()=>p("span",{class:"vpi-chevron-right icon"},null,-1)),kn={class:"header"},bn={class:"outline"},$n=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const e=o,{theme:t}=P(),s=I(!1),n=I(0),i=I(),u=I();function h(y){var L;(L=i.value)!=null&&L.contains(y.target)||(s.value=!1)}G(s,y=>{if(y){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),We("Escape",()=>{s.value=!1}),x(()=>{s.value=!1});function d(){s.value=!s.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(y){y.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),Ke(()=>{s.value=!1}))}function V(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,L)=>(a(),c("div",{class:"VPLocalNavOutlineDropdown",style:Ve({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),c("button",{key:0,onClick:d,class:w({open:s.value})},[p("span",_n,T(r(we)(r(t))),1),mn],2)):(a(),c("button",{key:1,onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)),m(de,{name:"flyout"},{default:v(()=>[s.value?(a(),c("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:$},[p("div",kn,[p("a",{class:"top-link",href:"#",onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)]),p("div",bn,[m(Ne,{headers:y.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),gn=b($n,[["__scopeId","data-v-c4b0adf9"]]),yn=o=>(C("data-v-513d39e6"),o=o(),H(),o),Pn={class:"container"},Vn=["aria-expanded"],Ln=yn(()=>p("span",{class:"vpi-align-left menu-icon"},null,-1)),Sn={class:"menu-text"},Tn=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U(),{headers:n}=hn(),{y:i}=Le(),u=I(0);K(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),x(()=>{n.value=_e(t.value.outline??e.value.outline)});const h=g(()=>n.value.length===0),d=g(()=>h.value&&!s.value),$=g(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:h.value,fixed:d.value}));return(V,y)=>r(t).layout!=="home"&&(!d.value||r(i)>=u.value)?(a(),c("div",{key:0,class:w($.value)},[p("div",Pn,[r(s)?(a(),c("button",{key:0,class:"menu","aria-expanded":V.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=L=>V.$emit("open-menu"))},[Ln,p("span",Sn,T(r(e).sidebarMenuLabel||"Menu"),1)],8,Vn)):f("",!0),m(gn,{headers:r(n),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),In=b(Tn,[["__scopeId","data-v-513d39e6"]]);function wn(){const o=I(!1);function e(){o.value=!0,window.addEventListener("resize",n)}function t(){o.value=!1,window.removeEventListener("resize",n)}function s(){o.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=ee();return G(()=>i.path,t),{isScreenOpen:o,openScreen:e,closeScreen:t,toggleScreen:s}}const Nn={},Mn={class:"VPSwitch",type:"button",role:"switch"},An={class:"check"},Bn={key:0,class:"icon"};function Cn(o,e){return a(),c("button",Mn,[p("span",An,[o.$slots.default?(a(),c("span",Bn,[l(o.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Hn=b(Nn,[["render",Cn],["__scopeId","data-v-793caf05"]]),Ae=o=>(C("data-v-38c704f2"),o=o(),H(),o),En=Ae(()=>p("span",{class:"vpi-sun sun"},null,-1)),Fn=Ae(()=>p("span",{class:"vpi-moon moon"},null,-1)),Dn=_({__name:"VPSwitchAppearance",setup(o){const{isDark:e,theme:t}=P(),s=te("toggle-appearance",()=>{e.value=!e.value}),n=I("");return he(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,u)=>(a(),k(Hn,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(s)},{default:v(()=>[En,Fn]),_:1},8,["title","aria-checked","onClick"]))}}),me=b(Dn,[["__scopeId","data-v-38c704f2"]]),On={key:0,class:"VPNavBarAppearance"},Gn=_({__name:"VPNavBarAppearance",setup(o){const{site:e}=P();return(t,s)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",On,[m(me)])):f("",!0)}}),Un=b(Gn,[["__scopeId","data-v-fd625bab"]]),ke=I();let Be=!1,re=0;function jn(o){const e=I(!1);if(oe){!Be&&zn(),re++;const t=G(ke,s=>{var n,i,u;s===o.el.value||(n=o.el.value)!=null&&n.contains(s)?(e.value=!0,(i=o.onFocus)==null||i.call(o)):(e.value=!1,(u=o.onBlur)==null||u.call(o))});pe(()=>{t(),re--,re||qn()})}return Je(e)}function zn(){document.addEventListener("focusin",Ce),Be=!0,ke.value=document.activeElement}function qn(){document.removeEventListener("focusin",Ce)}function Ce(){ke.value=document.activeElement}const Wn={class:"VPMenuLink"},Kn=_({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),c("div",Wn,[m(D,{class:w({active:r(W)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:v(()=>[O(T(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),ne=b(Kn,[["__scopeId","data-v-a9b5eada"]]),Jn={class:"VPMenuGroup"},Rn={key:0,class:"title"},Yn=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Jn,[e.text?(a(),c("p",Rn,T(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),c(M,null,["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):f("",!0)],64))),256))]))}}),Qn=b(Yn,[["__scopeId","data-v-6d568c27"]]),Xn={class:"VPMenu"},Zn={key:0,class:"items"},xn=_({__name:"VPMenu",props:{items:{}},setup(o){return(e,t)=>(a(),c("div",Xn,[e.items?(a(),c("div",Zn,[(a(!0),c(M,null,E(e.items,s=>(a(),c(M,{key:JSON.stringify(s)},["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):"component"in s?(a(),k(F(s.component),q({key:1,ref_for:!0},s.props),null,16)):(a(),k(Qn,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0),l(e.$slots,"default",{},void 0,!0)]))}}),es=b(xn,[["__scopeId","data-v-36a6a4be"]]),ts=o=>(C("data-v-6d56b0ed"),o=o(),H(),o),os=["aria-expanded","aria-label"],ns={key:0,class:"text"},ss=["innerHTML"],as=ts(()=>p("span",{class:"vpi-chevron-down text-icon"},null,-1)),rs={key:1,class:"vpi-more-horizontal icon"},is={class:"menu"},ls=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const e=I(!1),t=I();jn({el:t,onBlur:s});function s(){e.value=!1}return(n,i)=>(a(),c("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=u=>e.value=!0),onMouseleave:i[2]||(i[2]=u=>e.value=!1)},[p("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=u=>e.value=!e.value)},[n.button||n.icon?(a(),c("span",ns,[n.icon?(a(),c("span",{key:0,class:w([n.icon,"option-icon"])},null,2)):f("",!0),n.button?(a(),c("span",{key:1,innerHTML:n.button},null,8,ss)):f("",!0),as])):(a(),c("span",rs))],8,os),p("div",is,[m(es,{items:n.items},{default:v(()=>[l(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),be=b(ls,[["__scopeId","data-v-6d56b0ed"]]),cs=["href","aria-label","innerHTML"],us=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const e=o,t=g(()=>typeof e.icon=="object"?e.icon.svg:``);return(s,n)=>(a(),c("a",{class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,cs))}}),ds=b(us,[["__scopeId","data-v-36d54f99"]]),vs={class:"VPSocialLinks"},ps=_({__name:"VPSocialLinks",props:{links:{}},setup(o){return(e,t)=>(a(),c("div",vs,[(a(!0),c(M,null,E(e.links,({link:s,icon:n,ariaLabel:i})=>(a(),k(ds,{key:s,icon:n,link:s,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),$e=b(ps,[["__scopeId","data-v-0ada25a4"]]),hs={key:0,class:"group translations"},fs={class:"trans-title"},_s={key:1,class:"group"},ms={class:"item appearance"},ks={class:"label"},bs={class:"appearance-action"},$s={key:2,class:"group"},gs={class:"item social-links"},ys=_({__name:"VPNavBarExtra",setup(o){const{site:e,theme:t}=P(),{localeLinks:s,currentLang:n}=Y({correspondingLink:!0}),i=g(()=>s.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>i.value?(a(),k(be,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[r(s).length&&r(n).label?(a(),c("div",hs,[p("p",fs,T(r(n).label),1),(a(!0),c(M,null,E(r(s),d=>(a(),k(ne,{key:d.link,item:d},null,8,["item"]))),128))])):f("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",_s,[p("div",ms,[p("p",ks,T(r(t).darkModeSwitchLabel||"Appearance"),1),p("div",bs,[m(me)])])])):f("",!0),r(t).socialLinks?(a(),c("div",$s,[p("div",gs,[m($e,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),Ps=b(ys,[["__scopeId","data-v-8ac0e455"]]),Vs=o=>(C("data-v-9b302893"),o=o(),H(),o),Ls=["aria-expanded"],Ss=Vs(()=>p("span",{class:"container"},[p("span",{class:"top"}),p("span",{class:"middle"}),p("span",{class:"bottom"})],-1)),Ts=[Ss],Is=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(e,t)=>(a(),c("button",{type:"button",class:w(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},Ts,10,Ls))}}),ws=b(Is,[["__scopeId","data-v-9b302893"]]),Ns=["innerHTML"],Ms=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),k(D,{class:w({VPNavBarMenuLink:!0,active:r(W)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:v(()=>[p("span",{innerHTML:t.item.text},null,8,Ns)]),_:1},8,["class","href","noIcon","target","rel"]))}}),As=b(Ms,[["__scopeId","data-v-4ca2fdac"]]),Bs=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const e=o,{page:t}=P(),s=i=>"component"in i?!1:"link"in i?W(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(s),n=g(()=>s(e.item));return(i,u)=>(a(),k(be,{class:w({VPNavBarMenuGroup:!0,active:r(W)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),Cs=o=>(C("data-v-ae469694"),o=o(),H(),o),Hs={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Es=Cs(()=>p("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),Fs=_({__name:"VPNavBarMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Hs,[Es,(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k(As,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props),null,16)):(a(),k(Bs,{key:2,item:n},null,8,["item"]))],64))),128))])):f("",!0)}}),Ds=b(Fs,[["__scopeId","data-v-ae469694"]]);function Os(o){const{localeIndex:e,theme:t}=P();function s(n){var A,B,S;const i=n.split("."),u=(A=t.value.search)==null?void 0:A.options,h=u&&typeof u=="object",d=h&&((S=(B=u.locales)==null?void 0:B[e.value])==null?void 0:S.translations)||null,$=h&&u.translations||null;let V=d,y=$,L=o;const N=i.pop();for(const j of i){let z=null;const R=L==null?void 0:L[j];R&&(z=L=R);const se=y==null?void 0:y[j];se&&(z=y=se);const ae=V==null?void 0:V[j];ae&&(z=V=ae),R||(L=z),se||(y=z),ae||(V=z)}return(V==null?void 0:V[N])??(y==null?void 0:y[N])??(L==null?void 0:L[N])??""}return s}const Gs=["aria-label"],Us={class:"DocSearch-Button-Container"},js=p("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),zs={class:"DocSearch-Button-Placeholder"},qs=p("span",{class:"DocSearch-Button-Keys"},[p("kbd",{class:"DocSearch-Button-Key"}),p("kbd",{class:"DocSearch-Button-Key"},"K")],-1),ge=_({__name:"VPNavBarSearchButton",setup(o){const t=Os({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(s,n)=>(a(),c("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[p("span",Us,[js,p("span",zs,T(r(t)("button.buttonText")),1)]),qs],8,Gs))}}),Ws={class:"VPNavBarSearch"},Ks={id:"local-search"},Js={key:1,id:"docsearch"},Rs=_({__name:"VPNavBarSearch",setup(o){const e=()=>null,t=()=>null,{theme:s}=P(),n=I(!1),i=I(!1);K(()=>{});function u(){n.value||(n.value=!0,setTimeout(h,16))}function h(){const V=new Event("keydown");V.key="k",V.metaKey=!0,window.dispatchEvent(V),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||h()},16)}const d=I(!1),$="";return(V,y)=>{var L;return a(),c("div",Ws,[r($)==="local"?(a(),c(M,{key:0},[d.value?(a(),k(r(e),{key:0,onClose:y[0]||(y[0]=N=>d.value=!1)})):f("",!0),p("div",Ks,[m(ge,{onClick:y[1]||(y[1]=N=>d.value=!0)})])],64)):r($)==="algolia"?(a(),c(M,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((L=r(s).search)==null?void 0:L.options)??r(s).algolia,onVnodeBeforeMount:y[2]||(y[2]=N=>i.value=!0)},null,8,["algolia"])):f("",!0),i.value?f("",!0):(a(),c("div",Js,[m(ge,{onClick:u})]))],64)):f("",!0)])}}}),Ys=_({__name:"VPNavBarSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k($e,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Qs=b(Ys,[["__scopeId","data-v-9b3d2141"]]),Xs=["href","rel","target"],Zs={key:1},xs={key:2},ea=_({__name:"VPNavBarTitle",setup(o){const{site:e,theme:t}=P(),{hasSidebar:s}=U(),{currentLang:n}=Y(),i=g(()=>{var d;return typeof t.value.logoLink=="string"?t.value.logoLink:(d=t.value.logoLink)==null?void 0:d.link}),u=g(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.rel}),h=g(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.target});return(d,$)=>(a(),c("div",{class:w(["VPNavBarTitle",{"has-sidebar":r(s)}])},[p("a",{class:"title",href:i.value??r(fe)(r(n).link),rel:u.value,target:h.value},[l(d.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(X,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):f("",!0),r(t).siteTitle?(a(),c("span",Zs,T(r(t).siteTitle),1)):r(t).siteTitle===void 0?(a(),c("span",xs,T(r(e).title),1)):f("",!0),l(d.$slots,"nav-bar-title-after",{},void 0,!0)],8,Xs)],2))}}),ta=b(ea,[["__scopeId","data-v-73c882b0"]]),oa={class:"items"},na={class:"title"},sa=_({__name:"VPNavBarTranslations",setup(o){const{theme:e}=P(),{localeLinks:t,currentLang:s}=Y({correspondingLink:!0});return(n,i)=>r(t).length&&r(s).label?(a(),k(be,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:v(()=>[p("div",oa,[p("p",na,T(r(s).label),1),(a(!0),c(M,null,E(r(t),u=>(a(),k(ne,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),aa=b(sa,[["__scopeId","data-v-ba521018"]]),ra=o=>(C("data-v-af8d762d"),o=o(),H(),o),ia={class:"wrapper"},la={class:"container"},ca={class:"title"},ua={class:"content"},da={class:"content-body"},va=ra(()=>p("div",{class:"divider"},[p("div",{class:"divider-line"})],-1)),pa=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const e=o,{y:t}=Le(),{hasSidebar:s}=U(),{frontmatter:n}=P(),i=I({});return he(()=>{i.value={"has-sidebar":s.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(u,h)=>(a(),c("div",{class:w(["VPNavBar",i.value])},[p("div",ia,[p("div",la,[p("div",ca,[m(ta,null,{"nav-bar-title-before":v(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),p("div",ua,[p("div",da,[l(u.$slots,"nav-bar-content-before",{},void 0,!0),m(Rs,{class:"search"}),m(Ds,{class:"menu"}),m(aa,{class:"translations"}),m(Un,{class:"appearance"}),m(Qs,{class:"social-links"}),m(Ps,{class:"extra"}),l(u.$slots,"nav-bar-content-after",{},void 0,!0),m(ws,{class:"hamburger",active:u.isScreenOpen,onClick:h[0]||(h[0]=d=>u.$emit("toggle-screen"))},null,8,["active"])])])])]),va],2))}}),ha=b(pa,[["__scopeId","data-v-af8d762d"]]),fa={key:0,class:"VPNavScreenAppearance"},_a={class:"text"},ma=_({__name:"VPNavScreenAppearance",setup(o){const{site:e,theme:t}=P();return(s,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",fa,[p("p",_a,T(r(t).darkModeSwitchLabel||"Appearance"),1),m(me)])):f("",!0)}}),ka=b(ma,[["__scopeId","data-v-89b5e60a"]]),ba=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),$a=b(ba,[["__scopeId","data-v-1dbea2c1"]]),ga=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e)},{default:v(()=>[O(T(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),He=b(ga,[["__scopeId","data-v-bfeb9577"]]),ya={class:"VPNavScreenMenuGroupSection"},Pa={key:0,class:"title"},Va=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",ya,[e.text?(a(),c("p",Pa,T(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),k(He,{key:s.text,item:s},null,8,["item"]))),128))]))}}),La=b(Va,[["__scopeId","data-v-479edfcd"]]),Sa=o=>(C("data-v-c2cd7d8e"),o=o(),H(),o),Ta=["aria-controls","aria-expanded"],Ia=["innerHTML"],wa=Sa(()=>p("span",{class:"vpi-plus button-icon"},null,-1)),Na=["id"],Ma={key:0,class:"item"},Aa={key:1,class:"item"},Ba={key:2,class:"group"},Ca=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const e=o,t=I(!1),s=g(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,u)=>(a(),c("div",{class:w(["VPNavScreenMenuGroup",{open:t.value}])},[p("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:n},[p("span",{class:"button-text",innerHTML:i.text},null,8,Ia),wa],8,Ta),p("div",{id:s.value,class:"items"},[(a(!0),c(M,null,E(i.items,h=>(a(),c(M,{key:JSON.stringify(h)},["link"in h?(a(),c("div",Ma,[m(He,{item:h},null,8,["item"])])):"component"in h?(a(),c("div",Aa,[(a(),k(F(h.component),q({ref_for:!0},h.props,{"screen-menu":""}),null,16))])):(a(),c("div",Ba,[m(La,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Na)],2))}}),Ha=b(Ca,[["__scopeId","data-v-c2cd7d8e"]]),Ea={key:0,class:"VPNavScreenMenu"},Fa=_({__name:"VPNavScreenMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Ea,[(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k($a,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(Ha,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Da=_({__name:"VPNavScreenSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k($e,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Ee=o=>(C("data-v-7397f3c0"),o=o(),H(),o),Oa=Ee(()=>p("span",{class:"vpi-languages icon lang"},null,-1)),Ga=Ee(()=>p("span",{class:"vpi-chevron-down icon chevron"},null,-1)),Ua={class:"list"},ja=_({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:e,currentLang:t}=Y({correspondingLink:!0}),s=I(!1);function n(){s.value=!s.value}return(i,u)=>r(e).length&&r(t).label?(a(),c("div",{key:0,class:w(["VPNavScreenTranslations",{open:s.value}])},[p("button",{class:"title",onClick:n},[Oa,O(" "+T(r(t).label)+" ",1),Ga]),p("ul",Ua,[(a(!0),c(M,null,E(r(e),h=>(a(),c("li",{key:h.link,class:"item"},[m(D,{class:"link",href:h.link},{default:v(()=>[O(T(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),za=b(ja,[["__scopeId","data-v-7397f3c0"]]),qa={class:"container"},Wa=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const e=I(null),t=Se(oe?document.body:null);return(s,n)=>(a(),k(de,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:v(()=>[s.open?(a(),c("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[p("div",qa,[l(s.$slots,"nav-screen-content-before",{},void 0,!0),m(Fa,{class:"menu"}),m(za,{class:"translations"}),m(ka,{class:"appearance"}),m(Da,{class:"social-links"}),l(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),Ka=b(Wa,[["__scopeId","data-v-9061cc92"]]),Ja={key:0,class:"VPNav"},Ra=_({__name:"VPNav",setup(o){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=wn(),{frontmatter:n}=P(),i=g(()=>n.value.navbar!==!1);return Te("close-screen",t),Z(()=>{oe&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(u,h)=>i.value?(a(),c("header",Ja,[m(ha,{"is-screen-open":r(e),onToggleScreen:r(s)},{"nav-bar-title-before":v(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(Ka,{open:r(e)},{"nav-screen-content-before":v(()=>[l(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Ya=b(Ra,[["__scopeId","data-v-0c3b3583"]]),Fe=o=>(C("data-v-e6240f47"),o=o(),H(),o),Qa=["role","tabindex"],Xa=Fe(()=>p("div",{class:"indicator"},null,-1)),Za=Fe(()=>p("span",{class:"vpi-chevron-right caret-icon"},null,-1)),xa=[Za],er={key:1,class:"items"},tr=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const e=o,{collapsed:t,collapsible:s,isLink:n,isActiveLink:i,hasActiveLink:u,hasChildren:h,toggle:d}=kt(g(()=>e.item)),$=g(()=>h.value?"section":"div"),V=g(()=>n.value?"a":"div"),y=g(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),L=g(()=>n.value?void 0:"button"),N=g(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":u.value}]);function A(S){"key"in S&&S.key!=="Enter"||!e.item.link&&d()}function B(){e.item.link&&d()}return(S,j)=>{const z=J("VPSidebarItem",!0);return a(),k(F($.value),{class:w(["VPSidebarItem",N.value])},{default:v(()=>[S.item.text?(a(),c("div",q({key:0,class:"item",role:L.value},Ye(S.item.items?{click:A,keydown:A}:{},!0),{tabindex:S.item.items&&0}),[Xa,S.item.link?(a(),k(D,{key:0,tag:V.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:v(()=>[(a(),k(F(y.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(F(y.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),c("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:B,onKeydown:Re(B,["enter"]),tabindex:"0"},xa,32)):f("",!0)],16,Qa)):f("",!0),S.item.items&&S.item.items.length?(a(),c("div",er,[S.depth<5?(a(!0),c(M,{key:0},E(S.item.items,R=>(a(),k(z,{key:R.text,item:R,depth:S.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),or=b(tr,[["__scopeId","data-v-e6240f47"]]),nr=_({__name:"VPSidebarGroup",props:{items:{}},setup(o){const e=I(!0);let t=null;return K(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),Qe(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,n)=>(a(!0),c(M,null,E(s.items,i=>(a(),c("div",{key:i.text,class:w(["group",{"no-transition":e.value}])},[m(or,{item:i,depth:0},null,8,["item"])],2))),128))}}),sr=b(nr,[["__scopeId","data-v-c4d8cef8"]]),De=o=>(C("data-v-a2c838fb"),o=o(),H(),o),ar=De(()=>p("div",{class:"curtain"},null,-1)),rr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},ir=De(()=>p("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),lr=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:e,hasSidebar:t}=U(),s=o,n=I(null),i=Se(oe?document.body:null);G([s,n],()=>{var h;s.open?(i.value=!0,(h=n.value)==null||h.focus()):i.value=!1},{immediate:!0,flush:"post"});const u=I(0);return G(e,()=>{u.value+=1},{deep:!0}),(h,d)=>r(t)?(a(),c("aside",{key:0,class:w(["VPSidebar",{open:h.open}]),ref_key:"navEl",ref:n,onClick:d[0]||(d[0]=Xe(()=>{},["stop"]))},[ar,p("nav",rr,[ir,l(h.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(sr,{items:r(e),key:u.value},null,8,["items"])),l(h.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),cr=b(lr,[["__scopeId","data-v-a2c838fb"]]),ur=_({__name:"VPSkipLink",setup(o){const e=ee(),t=I();G(()=>e.path,()=>t.value.focus());function s({target:n}){const i=document.getElementById(decodeURIComponent(n.hash).slice(1));if(i){const u=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",u)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",u),i.focus(),window.scrollTo(0,0)}}return(n,i)=>(a(),c(M,null,[p("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),p("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}}),dr=b(ur,[["__scopeId","data-v-efdf7a7d"]]),vr=_({__name:"Layout",setup(o){const{isOpen:e,open:t,close:s}=U(),n=ee();G(()=>n.path,s),mt(e,s);const{frontmatter:i}=P(),u=Ze(),h=g(()=>!!u["home-hero-image"]);return Te("hero-image-slot-exists",h),(d,$)=>{const V=J("Content");return r(i).layout!==!1?(a(),c("div",{key:0,class:w(["Layout",r(i).pageClass])},[l(d.$slots,"layout-top",{},void 0,!0),m(dr),m(ot,{class:"backdrop",show:r(e),onClick:r(s)},null,8,["show","onClick"]),m(Ya,null,{"nav-bar-title-before":v(()=>[l(d.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(d.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(d.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(d.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[l(d.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(d.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(In,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),m(cr,{open:r(e)},{"sidebar-nav-before":v(()=>[l(d.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[l(d.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(ln,null,{"page-top":v(()=>[l(d.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(d.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[l(d.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[l(d.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(d.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(d.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(d.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(d.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(d.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(d.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(d.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(d.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[l(d.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(d.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(d.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[l(d.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(d.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[l(d.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(d.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(d.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(d.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(d.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(d.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(pn),l(d.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(V,{key:1}))}}}),pr=b(vr,[["__scopeId","data-v-8e016544"]]),fr={Layout:pr,enhanceApp:({app:o})=>{o.component("Badge",xe)}};export{fr as t}; +import{d as _,o as a,c,r as l,n as w,a as O,t as T,b as k,w as v,e as f,T as de,_ as b,u as Oe,i as Ge,f as Ue,g as ve,h as g,j as p,k as r,p as C,l as H,m as W,q as ie,s as I,v as G,x as Z,y as K,z as pe,A as he,B as je,C as ze,D as J,F as M,E,G as ye,H as x,I as m,J as F,K as Pe,L as ee,M as q,N as te,O as qe,P as Ve,Q as We,R as Ke,S as Le,U as oe,V as Je,W as Se,X as Te,Y as Re,Z as Ye,$ as Qe,a0 as Xe,a1 as Ze}from"./framework.C94oF1kp.js";const xe=_({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(o){return(e,t)=>(a(),c("span",{class:w(["VPBadge",e.type])},[l(e.$slots,"default",{},()=>[O(T(e.text),1)])],2))}}),et={key:0,class:"VPBackdrop"},tt=_({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(o){return(e,t)=>(a(),k(de,{name:"fade"},{default:v(()=>[e.show?(a(),c("div",et)):f("",!0)]),_:1}))}}),ot=b(tt,[["__scopeId","data-v-20b1d393"]]),P=Oe;function nt(o,e){let t,s=!1;return()=>{t&&clearTimeout(t),s?t=setTimeout(o,e):(o(),(s=!0)&&setTimeout(()=>s=!1,e))}}function le(o){return/^\//.test(o)?o:`/${o}`}function fe(o){const{pathname:e,search:t,hash:s,protocol:n}=new URL(o,"http://a.com");if(Ge(o)||o.startsWith("#")||!n.startsWith("http")||!Ue(e))return o;const{site:i}=P(),u=e.endsWith("/")||e.endsWith(".html")?o:o.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,i.value.cleanUrls?"":".html")}${t}${s}`);return ve(u)}function Y({correspondingLink:o=!1}={}){const{site:e,localeIndex:t,page:s,theme:n,hash:i}=P(),u=g(()=>{var d,$;return{label:(d=e.value.locales[t.value])==null?void 0:d.label,link:(($=e.value.locales[t.value])==null?void 0:$.link)||(t.value==="root"?"/":`/${t.value}/`)}});return{localeLinks:g(()=>Object.entries(e.value.locales).flatMap(([d,$])=>u.value.label===$.label?[]:{text:$.label,link:st($.link||(d==="root"?"/":`/${d}/`),n.value.i18nRouting!==!1&&o,s.value.relativePath.slice(u.value.link.length-1),!e.value.cleanUrls)+i.value})),currentLang:u}}function st(o,e,t,s){return e?o.replace(/\/$/,"")+le(t.replace(/(^|\/)index\.md$/,"$1").replace(/\.md$/,s?".html":"")):o}const at=o=>(C("data-v-21980364"),o=o(),H(),o),rt={class:"NotFound"},it={class:"code"},lt={class:"title"},ct=at(()=>p("div",{class:"divider"},null,-1)),ut={class:"quote"},dt={class:"action"},vt=["href","aria-label"],pt=_({__name:"NotFound",setup(o){const{theme:e}=P(),{currentLang:t}=Y();return(s,n)=>{var i,u,h,d,$;return a(),c("div",rt,[p("p",it,T(((i=r(e).notFound)==null?void 0:i.code)??"404"),1),p("h1",lt,T(((u=r(e).notFound)==null?void 0:u.title)??"PAGE NOT FOUND"),1),ct,p("blockquote",ut,T(((h=r(e).notFound)==null?void 0:h.quote)??"But if you don't change your direction, and if you keep looking, you may end up where you are heading."),1),p("div",dt,[p("a",{class:"link",href:r(ve)(r(t).link),"aria-label":((d=r(e).notFound)==null?void 0:d.linkLabel)??"go to home"},T((($=r(e).notFound)==null?void 0:$.linkText)??"Take me home"),9,vt)])])}}}),ht=b(pt,[["__scopeId","data-v-21980364"]]);function Ie(o,e){if(Array.isArray(o))return Q(o);if(o==null)return[];e=le(e);const t=Object.keys(o).sort((n,i)=>i.split("/").length-n.split("/").length).find(n=>e.startsWith(le(n))),s=t?o[t]:[];return Array.isArray(s)?Q(s):Q(s.items,s.base)}function ft(o){const e=[];let t=0;for(const s in o){const n=o[s];if(n.items){t=e.push(n);continue}e[t]||e.push({items:[]}),e[t].items.push(n)}return e}function _t(o){const e=[];function t(s){for(const n of s)n.text&&n.link&&e.push({text:n.text,link:n.link,docFooterText:n.docFooterText}),n.items&&t(n.items)}return t(o),e}function ce(o,e){return Array.isArray(e)?e.some(t=>ce(o,t)):W(o,e.link)?!0:e.items?ce(o,e.items):!1}function Q(o,e){return[...o].map(t=>{const s={...t},n=s.base||e;return n&&s.link&&(s.link=n+s.link),s.items&&(s.items=Q(s.items,n)),s})}function U(){const{frontmatter:o,page:e,theme:t}=P(),s=ie("(min-width: 960px)"),n=I(!1),i=g(()=>{const B=t.value.sidebar,S=e.value.relativePath;return B?Ie(B,S):[]}),u=I(i.value);G(i,(B,S)=>{JSON.stringify(B)!==JSON.stringify(S)&&(u.value=i.value)});const h=g(()=>o.value.sidebar!==!1&&u.value.length>0&&o.value.layout!=="home"),d=g(()=>$?o.value.aside==null?t.value.aside==="left":o.value.aside==="left":!1),$=g(()=>o.value.layout==="home"?!1:o.value.aside!=null?!!o.value.aside:t.value.aside!==!1),V=g(()=>h.value&&s.value),y=g(()=>h.value?ft(u.value):[]);function L(){n.value=!0}function N(){n.value=!1}function A(){n.value?N():L()}return{isOpen:n,sidebar:u,sidebarGroups:y,hasSidebar:h,hasAside:$,leftAside:d,isSidebarEnabled:V,open:L,close:N,toggle:A}}function mt(o,e){let t;Z(()=>{t=o.value?document.activeElement:void 0}),K(()=>{window.addEventListener("keyup",s)}),pe(()=>{window.removeEventListener("keyup",s)});function s(n){n.key==="Escape"&&o.value&&(e(),t==null||t.focus())}}function kt(o){const{page:e,hash:t}=P(),s=I(!1),n=g(()=>o.value.collapsed!=null),i=g(()=>!!o.value.link),u=I(!1),h=()=>{u.value=W(e.value.relativePath,o.value.link)};G([e,o,t],h),K(h);const d=g(()=>u.value?!0:o.value.items?ce(e.value.relativePath,o.value.items):!1),$=g(()=>!!(o.value.items&&o.value.items.length));Z(()=>{s.value=!!(n.value&&o.value.collapsed)}),he(()=>{(u.value||d.value)&&(s.value=!1)});function V(){n.value&&(s.value=!s.value)}return{collapsed:s,collapsible:n,isLink:i,isActiveLink:u,hasActiveLink:d,hasChildren:$,toggle:V}}function bt(){const{hasSidebar:o}=U(),e=ie("(min-width: 960px)"),t=ie("(min-width: 1280px)");return{isAsideEnabled:g(()=>!t.value&&!e.value?!1:o.value?t.value:e.value)}}const ue=[];function we(o){return typeof o.outline=="object"&&!Array.isArray(o.outline)&&o.outline.label||o.outlineTitle||"On this page"}function _e(o){const e=[...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)")].filter(t=>t.id&&t.hasChildNodes()).map(t=>{const s=Number(t.tagName[1]);return{element:t,title:$t(t),link:"#"+t.id,level:s}});return gt(e,o)}function $t(o){let e="";for(const t of o.childNodes)if(t.nodeType===1){if(t.classList.contains("VPBadge")||t.classList.contains("header-anchor")||t.classList.contains("ignore-header"))continue;e+=t.textContent}else t.nodeType===3&&(e+=t.textContent);return e.trim()}function gt(o,e){if(e===!1)return[];const t=(typeof e=="object"&&!Array.isArray(e)?e.level:e)||2,[s,n]=typeof t=="number"?[t,t]:t==="deep"?[2,6]:t;o=o.filter(u=>u.level>=s&&u.level<=n),ue.length=0;for(const{element:u,link:h}of o)ue.push({element:u,link:h});const i=[];e:for(let u=0;u=0;d--){const $=o[d];if($.level{requestAnimationFrame(i),window.addEventListener("scroll",s)}),je(()=>{u(location.hash)}),pe(()=>{window.removeEventListener("scroll",s)});function i(){if(!t.value)return;const h=window.scrollY,d=window.innerHeight,$=document.body.offsetHeight,V=Math.abs(h+d-$)<1,y=ue.map(({element:N,link:A})=>({link:A,top:Pt(N)})).filter(({top:N})=>!Number.isNaN(N)).sort((N,A)=>N.top-A.top);if(!y.length){u(null);return}if(h<1){u(null);return}if(V){u(y[y.length-1].link);return}let L=null;for(const{link:N,top:A}of y){if(A>h+ze()+4)break;L=N}u(L)}function u(h){n&&n.classList.remove("active"),h==null?n=null:n=o.value.querySelector(`a[href="${decodeURIComponent(h)}"]`);const d=n;d?(d.classList.add("active"),e.value.style.top=d.offsetTop+39+"px",e.value.style.opacity="1"):(e.value.style.top="33px",e.value.style.opacity="0")}}function Pt(o){let e=0;for(;o!==document.body;){if(o===null)return NaN;e+=o.offsetTop,o=o.offsetParent}return e}const Vt=["href","title"],Lt=_({__name:"VPDocOutlineItem",props:{headers:{},root:{type:Boolean}},setup(o){function e({target:t}){const s=t.href.split("#")[1],n=document.getElementById(decodeURIComponent(s));n==null||n.focus({preventScroll:!0})}return(t,s)=>{const n=J("VPDocOutlineItem",!0);return a(),c("ul",{class:w(["VPDocOutlineItem",t.root?"root":"nested"])},[(a(!0),c(M,null,E(t.headers,({children:i,link:u,title:h})=>(a(),c("li",null,[p("a",{class:"outline-link",href:u,onClick:e,title:h},T(h),9,Vt),i!=null&&i.length?(a(),k(n,{key:0,headers:i},null,8,["headers"])):f("",!0)]))),256))],2)}}}),Ne=b(Lt,[["__scopeId","data-v-51c2c770"]]),St={class:"content"},Tt={"aria-level":"2",class:"outline-title",id:"doc-outline-aria-label",role:"heading"},It=_({__name:"VPDocAsideOutline",setup(o){const{frontmatter:e,theme:t}=P(),s=ye([]);x(()=>{s.value=_e(e.value.outline??t.value.outline)});const n=I(),i=I();return yt(n,i),(u,h)=>(a(),c("nav",{"aria-labelledby":"doc-outline-aria-label",class:w(["VPDocAsideOutline",{"has-outline":s.value.length>0}]),ref_key:"container",ref:n},[p("div",St,[p("div",{class:"outline-marker",ref_key:"marker",ref:i},null,512),p("div",Tt,T(r(we)(r(t))),1),m(Ne,{headers:s.value,root:!0},null,8,["headers"])])],2))}}),wt=b(It,[["__scopeId","data-v-e7b12e6e"]]),Nt={class:"VPDocAsideCarbonAds"},Mt=_({__name:"VPDocAsideCarbonAds",props:{carbonAds:{}},setup(o){const e=()=>null;return(t,s)=>(a(),c("div",Nt,[m(r(e),{"carbon-ads":t.carbonAds},null,8,["carbon-ads"])]))}}),At=o=>(C("data-v-0ff3c77f"),o=o(),H(),o),Bt={class:"VPDocAside"},Ct=At(()=>p("div",{class:"spacer"},null,-1)),Ht=_({__name:"VPDocAside",setup(o){const{theme:e}=P();return(t,s)=>(a(),c("div",Bt,[l(t.$slots,"aside-top",{},void 0,!0),l(t.$slots,"aside-outline-before",{},void 0,!0),m(wt),l(t.$slots,"aside-outline-after",{},void 0,!0),Ct,l(t.$slots,"aside-ads-before",{},void 0,!0),r(e).carbonAds?(a(),k(Mt,{key:0,"carbon-ads":r(e).carbonAds},null,8,["carbon-ads"])):f("",!0),l(t.$slots,"aside-ads-after",{},void 0,!0),l(t.$slots,"aside-bottom",{},void 0,!0)]))}}),Et=b(Ht,[["__scopeId","data-v-0ff3c77f"]]);function Ft(){const{theme:o,page:e}=P();return g(()=>{const{text:t="Edit this page",pattern:s=""}=o.value.editLink||{};let n;return typeof s=="function"?n=s(e.value):n=s.replace(/:path/g,e.value.filePath),{url:n,text:t}})}function Dt(){const{page:o,theme:e,frontmatter:t}=P();return g(()=>{var $,V,y,L,N,A,B,S;const s=Ie(e.value.sidebar,o.value.relativePath),n=_t(s),i=Ot(n,j=>j.link.replace(/[?#].*$/,"")),u=i.findIndex(j=>W(o.value.relativePath,j.link)),h=(($=e.value.docFooter)==null?void 0:$.prev)===!1&&!t.value.prev||t.value.prev===!1,d=((V=e.value.docFooter)==null?void 0:V.next)===!1&&!t.value.next||t.value.next===!1;return{prev:h?void 0:{text:(typeof t.value.prev=="string"?t.value.prev:typeof t.value.prev=="object"?t.value.prev.text:void 0)??((y=i[u-1])==null?void 0:y.docFooterText)??((L=i[u-1])==null?void 0:L.text),link:(typeof t.value.prev=="object"?t.value.prev.link:void 0)??((N=i[u-1])==null?void 0:N.link)},next:d?void 0:{text:(typeof t.value.next=="string"?t.value.next:typeof t.value.next=="object"?t.value.next.text:void 0)??((A=i[u+1])==null?void 0:A.docFooterText)??((B=i[u+1])==null?void 0:B.text),link:(typeof t.value.next=="object"?t.value.next.link:void 0)??((S=i[u+1])==null?void 0:S.link)}}})}function Ot(o,e){const t=new Set;return o.filter(s=>{const n=e(s);return t.has(n)?!1:t.add(n)})}const D=_({__name:"VPLink",props:{tag:{},href:{},noIcon:{type:Boolean},target:{},rel:{}},setup(o){const e=o,t=g(()=>e.tag??(e.href?"a":"span")),s=g(()=>e.href&&Pe.test(e.href)||e.target==="_blank");return(n,i)=>(a(),k(F(t.value),{class:w(["VPLink",{link:n.href,"vp-external-link-icon":s.value,"no-icon":n.noIcon}]),href:n.href?r(fe)(n.href):void 0,target:n.target??(s.value?"_blank":void 0),rel:n.rel??(s.value?"noreferrer":void 0)},{default:v(()=>[l(n.$slots,"default")]),_:3},8,["class","href","target","rel"]))}}),Gt={class:"VPLastUpdated"},Ut=["datetime"],jt=_({__name:"VPDocFooterLastUpdated",setup(o){const{theme:e,page:t,lang:s}=P(),n=g(()=>new Date(t.value.lastUpdated)),i=g(()=>n.value.toISOString()),u=I("");return K(()=>{Z(()=>{var h,d,$;u.value=new Intl.DateTimeFormat((d=(h=e.value.lastUpdated)==null?void 0:h.formatOptions)!=null&&d.forceLocale?s.value:void 0,(($=e.value.lastUpdated)==null?void 0:$.formatOptions)??{dateStyle:"short",timeStyle:"short"}).format(n.value)})}),(h,d)=>{var $;return a(),c("p",Gt,[O(T((($=r(e).lastUpdated)==null?void 0:$.text)||r(e).lastUpdatedText||"Last updated")+": ",1),p("time",{datetime:i.value},T(u.value),9,Ut)])}}}),zt=b(jt,[["__scopeId","data-v-5cebc0fc"]]),Me=o=>(C("data-v-a4b38bd6"),o=o(),H(),o),qt={key:0,class:"VPDocFooter"},Wt={key:0,class:"edit-info"},Kt={key:0,class:"edit-link"},Jt=Me(()=>p("span",{class:"vpi-square-pen edit-link-icon"},null,-1)),Rt={key:1,class:"last-updated"},Yt={key:1,class:"prev-next","aria-labelledby":"doc-footer-aria-label"},Qt=Me(()=>p("span",{class:"visually-hidden",id:"doc-footer-aria-label"},"Pager",-1)),Xt={class:"pager"},Zt=["innerHTML"],xt=["innerHTML"],eo={class:"pager"},to=["innerHTML"],oo=["innerHTML"],no=_({__name:"VPDocFooter",setup(o){const{theme:e,page:t,frontmatter:s}=P(),n=Ft(),i=Dt(),u=g(()=>e.value.editLink&&s.value.editLink!==!1),h=g(()=>t.value.lastUpdated),d=g(()=>u.value||h.value||i.value.prev||i.value.next);return($,V)=>{var y,L,N,A;return d.value?(a(),c("footer",qt,[l($.$slots,"doc-footer-before",{},void 0,!0),u.value||h.value?(a(),c("div",Wt,[u.value?(a(),c("div",Kt,[m(D,{class:"edit-link-button",href:r(n).url,"no-icon":!0},{default:v(()=>[Jt,O(" "+T(r(n).text),1)]),_:1},8,["href"])])):f("",!0),h.value?(a(),c("div",Rt,[m(zt)])):f("",!0)])):f("",!0),(y=r(i).prev)!=null&&y.link||(L=r(i).next)!=null&&L.link?(a(),c("nav",Yt,[Qt,p("div",Xt,[(N=r(i).prev)!=null&&N.link?(a(),k(D,{key:0,class:"pager-link prev",href:r(i).prev.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.prev)||"Previous page"},null,8,Zt),p("span",{class:"title",innerHTML:r(i).prev.text},null,8,xt)]}),_:1},8,["href"])):f("",!0)]),p("div",eo,[(A=r(i).next)!=null&&A.link?(a(),k(D,{key:0,class:"pager-link next",href:r(i).next.link},{default:v(()=>{var B;return[p("span",{class:"desc",innerHTML:((B=r(e).docFooter)==null?void 0:B.next)||"Next page"},null,8,to),p("span",{class:"title",innerHTML:r(i).next.text},null,8,oo)]}),_:1},8,["href"])):f("",!0)])])):f("",!0)])):f("",!0)}}}),so=b(no,[["__scopeId","data-v-a4b38bd6"]]),ao=o=>(C("data-v-40342069"),o=o(),H(),o),ro={class:"container"},io=ao(()=>p("div",{class:"aside-curtain"},null,-1)),lo={class:"aside-container"},co={class:"aside-content"},uo={class:"content"},vo={class:"content-container"},po={class:"main"},ho=_({__name:"VPDoc",setup(o){const{theme:e}=P(),t=ee(),{hasSidebar:s,hasAside:n,leftAside:i}=U(),u=g(()=>t.path.replace(/[./]+/g,"_").replace(/_html$/,""));return(h,d)=>{const $=J("Content");return a(),c("div",{class:w(["VPDoc",{"has-sidebar":r(s),"has-aside":r(n)}])},[l(h.$slots,"doc-top",{},void 0,!0),p("div",ro,[r(n)?(a(),c("div",{key:0,class:w(["aside",{"left-aside":r(i)}])},[io,p("div",lo,[p("div",co,[m(Et,null,{"aside-top":v(()=>[l(h.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(h.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(h.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(h.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(h.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(h.$slots,"aside-ads-after",{},void 0,!0)]),_:3})])])],2)):f("",!0),p("div",uo,[p("div",vo,[l(h.$slots,"doc-before",{},void 0,!0),p("main",po,[m($,{class:w(["vp-doc",[u.value,r(e).externalLinkIcon&&"external-link-icon-enabled"]])},null,8,["class"])]),m(so,null,{"doc-footer-before":v(()=>[l(h.$slots,"doc-footer-before",{},void 0,!0)]),_:3}),l(h.$slots,"doc-after",{},void 0,!0)])])]),l(h.$slots,"doc-bottom",{},void 0,!0)],2)}}}),fo=b(ho,[["__scopeId","data-v-40342069"]]),_o=_({__name:"VPButton",props:{tag:{},size:{default:"medium"},theme:{default:"brand"},text:{},href:{},target:{},rel:{}},setup(o){const e=o,t=g(()=>e.href&&Pe.test(e.href)),s=g(()=>e.tag||e.href?"a":"button");return(n,i)=>(a(),k(F(s.value),{class:w(["VPButton",[n.size,n.theme]]),href:n.href?r(fe)(n.href):void 0,target:e.target??(t.value?"_blank":void 0),rel:e.rel??(t.value?"noreferrer":void 0)},{default:v(()=>[O(T(n.text),1)]),_:1},8,["class","href","target","rel"]))}}),mo=b(_o,[["__scopeId","data-v-885c6978"]]),ko=["src","alt"],bo=_({inheritAttrs:!1,__name:"VPImage",props:{image:{},alt:{}},setup(o){return(e,t)=>{const s=J("VPImage",!0);return e.image?(a(),c(M,{key:0},[typeof e.image=="string"||"src"in e.image?(a(),c("img",q({key:0,class:"VPImage"},typeof e.image=="string"?e.$attrs:{...e.image,...e.$attrs},{src:r(ve)(typeof e.image=="string"?e.image:e.image.src),alt:e.alt??(typeof e.image=="string"?"":e.image.alt||"")}),null,16,ko)):(a(),c(M,{key:1},[m(s,q({class:"dark",image:e.image.dark,alt:e.image.alt},e.$attrs),null,16,["image","alt"]),m(s,q({class:"light",image:e.image.light,alt:e.image.alt},e.$attrs),null,16,["image","alt"])],64))],64)):f("",!0)}}}),X=b(bo,[["__scopeId","data-v-f925500d"]]),$o=o=>(C("data-v-325add7b"),o=o(),H(),o),go={class:"container"},yo={class:"main"},Po={key:0,class:"name"},Vo=["innerHTML"],Lo=["innerHTML"],So=["innerHTML"],To={key:0,class:"actions"},Io={key:0,class:"image"},wo={class:"image-container"},No=$o(()=>p("div",{class:"image-bg"},null,-1)),Mo=_({__name:"VPHero",props:{name:{},text:{},tagline:{},image:{},actions:{}},setup(o){const e=te("hero-image-slot-exists");return(t,s)=>(a(),c("div",{class:w(["VPHero",{"has-image":t.image||r(e)}])},[p("div",go,[p("div",yo,[l(t.$slots,"home-hero-info-before",{},void 0,!0),l(t.$slots,"home-hero-info",{},()=>[t.name?(a(),c("h1",Po,[p("span",{innerHTML:t.name,class:"clip"},null,8,Vo)])):f("",!0),t.text?(a(),c("p",{key:1,innerHTML:t.text,class:"text"},null,8,Lo)):f("",!0),t.tagline?(a(),c("p",{key:2,innerHTML:t.tagline,class:"tagline"},null,8,So)):f("",!0)],!0),l(t.$slots,"home-hero-info-after",{},void 0,!0),t.actions?(a(),c("div",To,[(a(!0),c(M,null,E(t.actions,n=>(a(),c("div",{key:n.link,class:"action"},[m(mo,{tag:"a",size:"medium",theme:n.theme,text:n.text,href:n.link,target:n.target,rel:n.rel},null,8,["theme","text","href","target","rel"])]))),128))])):f("",!0),l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),t.image||r(e)?(a(),c("div",Io,[p("div",wo,[No,l(t.$slots,"home-hero-image",{},()=>[t.image?(a(),k(X,{key:0,class:"image-src",image:t.image},null,8,["image"])):f("",!0)],!0)])])):f("",!0)])],2))}}),Ao=b(Mo,[["__scopeId","data-v-325add7b"]]),Bo=_({__name:"VPHomeHero",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).hero?(a(),k(Ao,{key:0,class:"VPHomeHero",name:r(e).hero.name,text:r(e).hero.text,tagline:r(e).hero.tagline,image:r(e).hero.image,actions:r(e).hero.actions},{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before")]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info")]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after")]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after")]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image")]),_:3},8,["name","text","tagline","image","actions"])):f("",!0)}}),Co=o=>(C("data-v-248ed6b6"),o=o(),H(),o),Ho={class:"box"},Eo={key:0,class:"icon"},Fo=["innerHTML"],Do=["innerHTML"],Oo=["innerHTML"],Go={key:4,class:"link-text"},Uo={class:"link-text-value"},jo=Co(()=>p("span",{class:"vpi-arrow-right link-text-icon"},null,-1)),zo=_({__name:"VPFeature",props:{icon:{},title:{},details:{},link:{},linkText:{},rel:{},target:{}},setup(o){return(e,t)=>(a(),k(D,{class:"VPFeature",href:e.link,rel:e.rel,target:e.target,"no-icon":!0,tag:e.link?"a":"div"},{default:v(()=>[p("article",Ho,[typeof e.icon=="object"&&e.icon.wrap?(a(),c("div",Eo,[m(X,{image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])])):typeof e.icon=="object"?(a(),k(X,{key:1,image:e.icon,alt:e.icon.alt,height:e.icon.height||48,width:e.icon.width||48},null,8,["image","alt","height","width"])):e.icon?(a(),c("div",{key:2,class:"icon",innerHTML:e.icon},null,8,Fo)):f("",!0),p("h2",{class:"title",innerHTML:e.title},null,8,Do),e.details?(a(),c("p",{key:3,class:"details",innerHTML:e.details},null,8,Oo)):f("",!0),e.linkText?(a(),c("div",Go,[p("p",Uo,[O(T(e.linkText)+" ",1),jo])])):f("",!0)])]),_:1},8,["href","rel","target","tag"]))}}),qo=b(zo,[["__scopeId","data-v-248ed6b6"]]),Wo={key:0,class:"VPFeatures"},Ko={class:"container"},Jo={class:"items"},Ro=_({__name:"VPFeatures",props:{features:{}},setup(o){const e=o,t=g(()=>{const s=e.features.length;if(s){if(s===2)return"grid-2";if(s===3)return"grid-3";if(s%3===0)return"grid-6";if(s>3)return"grid-4"}else return});return(s,n)=>s.features?(a(),c("div",Wo,[p("div",Ko,[p("div",Jo,[(a(!0),c(M,null,E(s.features,i=>(a(),c("div",{key:i.title,class:w(["item",[t.value]])},[m(qo,{icon:i.icon,title:i.title,details:i.details,link:i.link,"link-text":i.linkText,rel:i.rel,target:i.target},null,8,["icon","title","details","link","link-text","rel","target"])],2))),128))])])])):f("",!0)}}),Yo=b(Ro,[["__scopeId","data-v-dbb08ed4"]]),Qo=_({__name:"VPHomeFeatures",setup(o){const{frontmatter:e}=P();return(t,s)=>r(e).features?(a(),k(Yo,{key:0,class:"VPHomeFeatures",features:r(e).features},null,8,["features"])):f("",!0)}}),Xo=_({__name:"VPHomeContent",setup(o){const{width:e}=qe({initialWidth:0,includeScrollbar:!1});return(t,s)=>(a(),c("div",{class:"vp-doc container",style:Ve(r(e)?{"--vp-offset":`calc(50% - ${r(e)/2}px)`}:{})},[l(t.$slots,"default",{},void 0,!0)],4))}}),Zo=b(Xo,[["__scopeId","data-v-bb690f02"]]),xo={class:"VPHome"},en=_({__name:"VPHome",setup(o){const{frontmatter:e}=P();return(t,s)=>{const n=J("Content");return a(),c("div",xo,[l(t.$slots,"home-hero-before",{},void 0,!0),m(Bo,null,{"home-hero-info-before":v(()=>[l(t.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(t.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(t.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(t.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(t.$slots,"home-hero-image",{},void 0,!0)]),_:3}),l(t.$slots,"home-hero-after",{},void 0,!0),l(t.$slots,"home-features-before",{},void 0,!0),m(Qo),l(t.$slots,"home-features-after",{},void 0,!0),r(e).markdownStyles!==!1?(a(),k(Zo,{key:0},{default:v(()=>[m(n)]),_:1})):(a(),k(n,{key:1}))])}}}),tn=b(en,[["__scopeId","data-v-972a96f9"]]),on={},nn={class:"VPPage"};function sn(o,e){const t=J("Content");return a(),c("div",nn,[l(o.$slots,"page-top"),m(t),l(o.$slots,"page-bottom")])}const an=b(on,[["render",sn]]),rn=_({__name:"VPContent",setup(o){const{page:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>(a(),c("div",{class:w(["VPContent",{"has-sidebar":r(s),"is-home":r(t).layout==="home"}]),id:"VPContent"},[r(e).isNotFound?l(n.$slots,"not-found",{key:0},()=>[m(ht)],!0):r(t).layout==="page"?(a(),k(an,{key:1},{"page-top":v(()=>[l(n.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(n.$slots,"page-bottom",{},void 0,!0)]),_:3})):r(t).layout==="home"?(a(),k(tn,{key:2},{"home-hero-before":v(()=>[l(n.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(n.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(n.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(n.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(n.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(n.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(n.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(n.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(n.$slots,"home-features-after",{},void 0,!0)]),_:3})):r(t).layout&&r(t).layout!=="doc"?(a(),k(F(r(t).layout),{key:3})):(a(),k(fo,{key:4},{"doc-top":v(()=>[l(n.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(n.$slots,"doc-bottom",{},void 0,!0)]),"doc-footer-before":v(()=>[l(n.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(n.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(n.$slots,"doc-after",{},void 0,!0)]),"aside-top":v(()=>[l(n.$slots,"aside-top",{},void 0,!0)]),"aside-outline-before":v(()=>[l(n.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(n.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(n.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(n.$slots,"aside-ads-after",{},void 0,!0)]),"aside-bottom":v(()=>[l(n.$slots,"aside-bottom",{},void 0,!0)]),_:3}))],2))}}),ln=b(rn,[["__scopeId","data-v-ec7dbf3e"]]),cn={class:"container"},un=["innerHTML"],dn=["innerHTML"],vn=_({__name:"VPFooter",setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U();return(n,i)=>r(e).footer&&r(t).footer!==!1?(a(),c("footer",{key:0,class:w(["VPFooter",{"has-sidebar":r(s)}])},[p("div",cn,[r(e).footer.message?(a(),c("p",{key:0,class:"message",innerHTML:r(e).footer.message},null,8,un)):f("",!0),r(e).footer.copyright?(a(),c("p",{key:1,class:"copyright",innerHTML:r(e).footer.copyright},null,8,dn)):f("",!0)])],2)):f("",!0)}}),pn=b(vn,[["__scopeId","data-v-e3ca6860"]]);function hn(){const{theme:o,frontmatter:e}=P(),t=ye([]),s=g(()=>t.value.length>0);return x(()=>{t.value=_e(e.value.outline??o.value.outline)}),{headers:t,hasLocalNav:s}}const fn=o=>(C("data-v-b418bf42"),o=o(),H(),o),_n={class:"menu-text"},mn=fn(()=>p("span",{class:"vpi-chevron-right icon"},null,-1)),kn={class:"header"},bn={class:"outline"},$n=_({__name:"VPLocalNavOutlineDropdown",props:{headers:{},navHeight:{}},setup(o){const e=o,{theme:t}=P(),s=I(!1),n=I(0),i=I(),u=I();function h(y){var L;(L=i.value)!=null&&L.contains(y.target)||(s.value=!1)}G(s,y=>{if(y){document.addEventListener("click",h);return}document.removeEventListener("click",h)}),We("Escape",()=>{s.value=!1}),x(()=>{s.value=!1});function d(){s.value=!s.value,n.value=window.innerHeight+Math.min(window.scrollY-e.navHeight,0)}function $(y){y.target.classList.contains("outline-link")&&(u.value&&(u.value.style.transition="none"),Ke(()=>{s.value=!1}))}function V(){s.value=!1,window.scrollTo({top:0,left:0,behavior:"smooth"})}return(y,L)=>(a(),c("div",{class:"VPLocalNavOutlineDropdown",style:Ve({"--vp-vh":n.value+"px"}),ref_key:"main",ref:i},[y.headers.length>0?(a(),c("button",{key:0,onClick:d,class:w({open:s.value})},[p("span",_n,T(r(we)(r(t))),1),mn],2)):(a(),c("button",{key:1,onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)),m(de,{name:"flyout"},{default:v(()=>[s.value?(a(),c("div",{key:0,ref_key:"items",ref:u,class:"items",onClick:$},[p("div",kn,[p("a",{class:"top-link",href:"#",onClick:V},T(r(t).returnToTopLabel||"Return to top"),1)]),p("div",bn,[m(Ne,{headers:y.headers},null,8,["headers"])])],512)):f("",!0)]),_:1})],4))}}),gn=b($n,[["__scopeId","data-v-b418bf42"]]),yn=o=>(C("data-v-8af612ea"),o=o(),H(),o),Pn={class:"container"},Vn=["aria-expanded"],Ln=yn(()=>p("span",{class:"vpi-align-left menu-icon"},null,-1)),Sn={class:"menu-text"},Tn=_({__name:"VPLocalNav",props:{open:{type:Boolean}},emits:["open-menu"],setup(o){const{theme:e,frontmatter:t}=P(),{hasSidebar:s}=U(),{headers:n}=hn(),{y:i}=Le(),u=I(0);K(()=>{u.value=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--vp-nav-height"))}),x(()=>{n.value=_e(t.value.outline??e.value.outline)});const h=g(()=>n.value.length===0),d=g(()=>h.value&&!s.value),$=g(()=>({VPLocalNav:!0,"has-sidebar":s.value,empty:h.value,fixed:d.value}));return(V,y)=>r(t).layout!=="home"&&(!d.value||r(i)>=u.value)?(a(),c("div",{key:0,class:w($.value)},[p("div",Pn,[r(s)?(a(),c("button",{key:0,class:"menu","aria-expanded":V.open,"aria-controls":"VPSidebarNav",onClick:y[0]||(y[0]=L=>V.$emit("open-menu"))},[Ln,p("span",Sn,T(r(e).sidebarMenuLabel||"Menu"),1)],8,Vn)):f("",!0),m(gn,{headers:r(n),navHeight:u.value},null,8,["headers","navHeight"])])],2)):f("",!0)}}),In=b(Tn,[["__scopeId","data-v-8af612ea"]]);function wn(){const o=I(!1);function e(){o.value=!0,window.addEventListener("resize",n)}function t(){o.value=!1,window.removeEventListener("resize",n)}function s(){o.value?t():e()}function n(){window.outerWidth>=768&&t()}const i=ee();return G(()=>i.path,t),{isScreenOpen:o,openScreen:e,closeScreen:t,toggleScreen:s}}const Nn={},Mn={class:"VPSwitch",type:"button",role:"switch"},An={class:"check"},Bn={key:0,class:"icon"};function Cn(o,e){return a(),c("button",Mn,[p("span",An,[o.$slots.default?(a(),c("span",Bn,[l(o.$slots,"default",{},void 0,!0)])):f("",!0)])])}const Hn=b(Nn,[["render",Cn],["__scopeId","data-v-d82e607b"]]),Ae=o=>(C("data-v-3a50aa5c"),o=o(),H(),o),En=Ae(()=>p("span",{class:"vpi-sun sun"},null,-1)),Fn=Ae(()=>p("span",{class:"vpi-moon moon"},null,-1)),Dn=_({__name:"VPSwitchAppearance",setup(o){const{isDark:e,theme:t}=P(),s=te("toggle-appearance",()=>{e.value=!e.value}),n=I("");return he(()=>{n.value=e.value?t.value.lightModeSwitchTitle||"Switch to light theme":t.value.darkModeSwitchTitle||"Switch to dark theme"}),(i,u)=>(a(),k(Hn,{title:n.value,class:"VPSwitchAppearance","aria-checked":r(e),onClick:r(s)},{default:v(()=>[En,Fn]),_:1},8,["title","aria-checked","onClick"]))}}),me=b(Dn,[["__scopeId","data-v-3a50aa5c"]]),On={key:0,class:"VPNavBarAppearance"},Gn=_({__name:"VPNavBarAppearance",setup(o){const{site:e}=P();return(t,s)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",On,[m(me)])):f("",!0)}}),Un=b(Gn,[["__scopeId","data-v-2a6692f8"]]),ke=I();let Be=!1,re=0;function jn(o){const e=I(!1);if(oe){!Be&&zn(),re++;const t=G(ke,s=>{var n,i,u;s===o.el.value||(n=o.el.value)!=null&&n.contains(s)?(e.value=!0,(i=o.onFocus)==null||i.call(o)):(e.value=!1,(u=o.onBlur)==null||u.call(o))});pe(()=>{t(),re--,re||qn()})}return Je(e)}function zn(){document.addEventListener("focusin",Ce),Be=!0,ke.value=document.activeElement}function qn(){document.removeEventListener("focusin",Ce)}function Ce(){ke.value=document.activeElement}const Wn={class:"VPMenuLink"},Kn=_({__name:"VPMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),c("div",Wn,[m(D,{class:w({active:r(W)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,target:t.item.target,rel:t.item.rel},{default:v(()=>[O(T(t.item.text),1)]),_:1},8,["class","href","target","rel"])]))}}),ne=b(Kn,[["__scopeId","data-v-79776a7a"]]),Jn={class:"VPMenuGroup"},Rn={key:0,class:"title"},Yn=_({__name:"VPMenuGroup",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",Jn,[e.text?(a(),c("p",Rn,T(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),c(M,null,["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):f("",!0)],64))),256))]))}}),Qn=b(Yn,[["__scopeId","data-v-fbf15ead"]]),Xn={class:"VPMenu"},Zn={key:0,class:"items"},xn=_({__name:"VPMenu",props:{items:{}},setup(o){return(e,t)=>(a(),c("div",Xn,[e.items?(a(),c("div",Zn,[(a(!0),c(M,null,E(e.items,s=>(a(),c(M,{key:JSON.stringify(s)},["link"in s?(a(),k(ne,{key:0,item:s},null,8,["item"])):"component"in s?(a(),k(F(s.component),q({key:1,ref_for:!0},s.props),null,16)):(a(),k(Qn,{key:2,text:s.text,items:s.items},null,8,["text","items"]))],64))),128))])):f("",!0),l(e.$slots,"default",{},void 0,!0)]))}}),es=b(xn,[["__scopeId","data-v-9990563e"]]),ts=o=>(C("data-v-ec8c49bc"),o=o(),H(),o),os=["aria-expanded","aria-label"],ns={key:0,class:"text"},ss=["innerHTML"],as=ts(()=>p("span",{class:"vpi-chevron-down text-icon"},null,-1)),rs={key:1,class:"vpi-more-horizontal icon"},is={class:"menu"},ls=_({__name:"VPFlyout",props:{icon:{},button:{},label:{},items:{}},setup(o){const e=I(!1),t=I();jn({el:t,onBlur:s});function s(){e.value=!1}return(n,i)=>(a(),c("div",{class:"VPFlyout",ref_key:"el",ref:t,onMouseenter:i[1]||(i[1]=u=>e.value=!0),onMouseleave:i[2]||(i[2]=u=>e.value=!1)},[p("button",{type:"button",class:"button","aria-haspopup":"true","aria-expanded":e.value,"aria-label":n.label,onClick:i[0]||(i[0]=u=>e.value=!e.value)},[n.button||n.icon?(a(),c("span",ns,[n.icon?(a(),c("span",{key:0,class:w([n.icon,"option-icon"])},null,2)):f("",!0),n.button?(a(),c("span",{key:1,innerHTML:n.button},null,8,ss)):f("",!0),as])):(a(),c("span",rs))],8,os),p("div",is,[m(es,{items:n.items},{default:v(()=>[l(n.$slots,"default",{},void 0,!0)]),_:3},8,["items"])])],544))}}),be=b(ls,[["__scopeId","data-v-ec8c49bc"]]),cs=["href","aria-label","innerHTML"],us=_({__name:"VPSocialLink",props:{icon:{},link:{},ariaLabel:{}},setup(o){const e=o,t=g(()=>typeof e.icon=="object"?e.icon.svg:``);return(s,n)=>(a(),c("a",{class:"VPSocialLink no-icon",href:s.link,"aria-label":s.ariaLabel??(typeof s.icon=="string"?s.icon:""),target:"_blank",rel:"noopener",innerHTML:t.value},null,8,cs))}}),ds=b(us,[["__scopeId","data-v-b0526bd7"]]),vs={class:"VPSocialLinks"},ps=_({__name:"VPSocialLinks",props:{links:{}},setup(o){return(e,t)=>(a(),c("div",vs,[(a(!0),c(M,null,E(e.links,({link:s,icon:n,ariaLabel:i})=>(a(),k(ds,{key:s,icon:n,link:s,ariaLabel:i},null,8,["icon","link","ariaLabel"]))),128))]))}}),$e=b(ps,[["__scopeId","data-v-fa18fe49"]]),hs={key:0,class:"group translations"},fs={class:"trans-title"},_s={key:1,class:"group"},ms={class:"item appearance"},ks={class:"label"},bs={class:"appearance-action"},$s={key:2,class:"group"},gs={class:"item social-links"},ys=_({__name:"VPNavBarExtra",setup(o){const{site:e,theme:t}=P(),{localeLinks:s,currentLang:n}=Y({correspondingLink:!0}),i=g(()=>s.value.length&&n.value.label||e.value.appearance||t.value.socialLinks);return(u,h)=>i.value?(a(),k(be,{key:0,class:"VPNavBarExtra",label:"extra navigation"},{default:v(()=>[r(s).length&&r(n).label?(a(),c("div",hs,[p("p",fs,T(r(n).label),1),(a(!0),c(M,null,E(r(s),d=>(a(),k(ne,{key:d.link,item:d},null,8,["item"]))),128))])):f("",!0),r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",_s,[p("div",ms,[p("p",ks,T(r(t).darkModeSwitchLabel||"Appearance"),1),p("div",bs,[m(me)])])])):f("",!0),r(t).socialLinks?(a(),c("div",$s,[p("div",gs,[m($e,{class:"social-links-list",links:r(t).socialLinks},null,8,["links"])])])):f("",!0)]),_:1})):f("",!0)}}),Ps=b(ys,[["__scopeId","data-v-2fc967b6"]]),Vs=o=>(C("data-v-be64de2d"),o=o(),H(),o),Ls=["aria-expanded"],Ss=Vs(()=>p("span",{class:"container"},[p("span",{class:"top"}),p("span",{class:"middle"}),p("span",{class:"bottom"})],-1)),Ts=[Ss],Is=_({__name:"VPNavBarHamburger",props:{active:{type:Boolean}},emits:["click"],setup(o){return(e,t)=>(a(),c("button",{type:"button",class:w(["VPNavBarHamburger",{active:e.active}]),"aria-label":"mobile navigation","aria-expanded":e.active,"aria-controls":"VPNavScreen",onClick:t[0]||(t[0]=s=>e.$emit("click"))},Ts,10,Ls))}}),ws=b(Is,[["__scopeId","data-v-be64de2d"]]),Ns=["innerHTML"],Ms=_({__name:"VPNavBarMenuLink",props:{item:{}},setup(o){const{page:e}=P();return(t,s)=>(a(),k(D,{class:w({VPNavBarMenuLink:!0,active:r(W)(r(e).relativePath,t.item.activeMatch||t.item.link,!!t.item.activeMatch)}),href:t.item.link,noIcon:t.item.noIcon,target:t.item.target,rel:t.item.rel,tabindex:"0"},{default:v(()=>[p("span",{innerHTML:t.item.text},null,8,Ns)]),_:1},8,["class","href","noIcon","target","rel"]))}}),As=b(Ms,[["__scopeId","data-v-ad4a8b64"]]),Bs=_({__name:"VPNavBarMenuGroup",props:{item:{}},setup(o){const e=o,{page:t}=P(),s=i=>"component"in i?!1:"link"in i?W(t.value.relativePath,i.link,!!e.item.activeMatch):i.items.some(s),n=g(()=>s(e.item));return(i,u)=>(a(),k(be,{class:w({VPNavBarMenuGroup:!0,active:r(W)(r(t).relativePath,i.item.activeMatch,!!i.item.activeMatch)||n.value}),button:i.item.text,items:i.item.items},null,8,["class","button","items"]))}}),Cs=o=>(C("data-v-0fb289c1"),o=o(),H(),o),Hs={key:0,"aria-labelledby":"main-nav-aria-label",class:"VPNavBarMenu"},Es=Cs(()=>p("span",{id:"main-nav-aria-label",class:"visually-hidden"}," Main Navigation ",-1)),Fs=_({__name:"VPNavBarMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Hs,[Es,(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k(As,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props),null,16)):(a(),k(Bs,{key:2,item:n},null,8,["item"]))],64))),128))])):f("",!0)}}),Ds=b(Fs,[["__scopeId","data-v-0fb289c1"]]);function Os(o){const{localeIndex:e,theme:t}=P();function s(n){var A,B,S;const i=n.split("."),u=(A=t.value.search)==null?void 0:A.options,h=u&&typeof u=="object",d=h&&((S=(B=u.locales)==null?void 0:B[e.value])==null?void 0:S.translations)||null,$=h&&u.translations||null;let V=d,y=$,L=o;const N=i.pop();for(const j of i){let z=null;const R=L==null?void 0:L[j];R&&(z=L=R);const se=y==null?void 0:y[j];se&&(z=y=se);const ae=V==null?void 0:V[j];ae&&(z=V=ae),R||(L=z),se||(y=z),ae||(V=z)}return(V==null?void 0:V[N])??(y==null?void 0:y[N])??(L==null?void 0:L[N])??""}return s}const Gs=["aria-label"],Us={class:"DocSearch-Button-Container"},js=p("span",{class:"vp-icon DocSearch-Search-Icon"},null,-1),zs={class:"DocSearch-Button-Placeholder"},qs=p("span",{class:"DocSearch-Button-Keys"},[p("kbd",{class:"DocSearch-Button-Key"}),p("kbd",{class:"DocSearch-Button-Key"},"K")],-1),ge=_({__name:"VPNavBarSearchButton",setup(o){const t=Os({button:{buttonText:"Search",buttonAriaLabel:"Search"}});return(s,n)=>(a(),c("button",{type:"button",class:"DocSearch DocSearch-Button","aria-label":r(t)("button.buttonAriaLabel")},[p("span",Us,[js,p("span",zs,T(r(t)("button.buttonText")),1)]),qs],8,Gs))}}),Ws={class:"VPNavBarSearch"},Ks={id:"local-search"},Js={key:1,id:"docsearch"},Rs=_({__name:"VPNavBarSearch",setup(o){const e=()=>null,t=()=>null,{theme:s}=P(),n=I(!1),i=I(!1);K(()=>{});function u(){n.value||(n.value=!0,setTimeout(h,16))}function h(){const V=new Event("keydown");V.key="k",V.metaKey=!0,window.dispatchEvent(V),setTimeout(()=>{document.querySelector(".DocSearch-Modal")||h()},16)}const d=I(!1),$="";return(V,y)=>{var L;return a(),c("div",Ws,[r($)==="local"?(a(),c(M,{key:0},[d.value?(a(),k(r(e),{key:0,onClose:y[0]||(y[0]=N=>d.value=!1)})):f("",!0),p("div",Ks,[m(ge,{onClick:y[1]||(y[1]=N=>d.value=!0)})])],64)):r($)==="algolia"?(a(),c(M,{key:1},[n.value?(a(),k(r(t),{key:0,algolia:((L=r(s).search)==null?void 0:L.options)??r(s).algolia,onVnodeBeforeMount:y[2]||(y[2]=N=>i.value=!0)},null,8,["algolia"])):f("",!0),i.value?f("",!0):(a(),c("div",Js,[m(ge,{onClick:u})]))],64)):f("",!0)])}}}),Ys=_({__name:"VPNavBarSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k($e,{key:0,class:"VPNavBarSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Qs=b(Ys,[["__scopeId","data-v-f3b91b3a"]]),Xs=["href","rel","target"],Zs={key:1},xs={key:2},ea=_({__name:"VPNavBarTitle",setup(o){const{site:e,theme:t}=P(),{hasSidebar:s}=U(),{currentLang:n}=Y(),i=g(()=>{var d;return typeof t.value.logoLink=="string"?t.value.logoLink:(d=t.value.logoLink)==null?void 0:d.link}),u=g(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.rel}),h=g(()=>{var d;return typeof t.value.logoLink=="string"||(d=t.value.logoLink)==null?void 0:d.target});return(d,$)=>(a(),c("div",{class:w(["VPNavBarTitle",{"has-sidebar":r(s)}])},[p("a",{class:"title",href:i.value??r(fe)(r(n).link),rel:u.value,target:h.value},[l(d.$slots,"nav-bar-title-before",{},void 0,!0),r(t).logo?(a(),k(X,{key:0,class:"logo",image:r(t).logo},null,8,["image"])):f("",!0),r(t).siteTitle?(a(),c("span",Zs,T(r(t).siteTitle),1)):r(t).siteTitle===void 0?(a(),c("span",xs,T(r(e).title),1)):f("",!0),l(d.$slots,"nav-bar-title-after",{},void 0,!0)],8,Xs)],2))}}),ta=b(ea,[["__scopeId","data-v-10b95b50"]]),oa={class:"items"},na={class:"title"},sa=_({__name:"VPNavBarTranslations",setup(o){const{theme:e}=P(),{localeLinks:t,currentLang:s}=Y({correspondingLink:!0});return(n,i)=>r(t).length&&r(s).label?(a(),k(be,{key:0,class:"VPNavBarTranslations",icon:"vpi-languages",label:r(e).langMenuLabel||"Change language"},{default:v(()=>[p("div",oa,[p("p",na,T(r(s).label),1),(a(!0),c(M,null,E(r(t),u=>(a(),k(ne,{key:u.link,item:u},null,8,["item"]))),128))])]),_:1},8,["label"])):f("",!0)}}),aa=b(sa,[["__scopeId","data-v-cd7b67e8"]]),ra=o=>(C("data-v-1303e283"),o=o(),H(),o),ia={class:"wrapper"},la={class:"container"},ca={class:"title"},ua={class:"content"},da={class:"content-body"},va=ra(()=>p("div",{class:"divider"},[p("div",{class:"divider-line"})],-1)),pa=_({__name:"VPNavBar",props:{isScreenOpen:{type:Boolean}},emits:["toggle-screen"],setup(o){const e=o,{y:t}=Le(),{hasSidebar:s}=U(),{frontmatter:n}=P(),i=I({});return he(()=>{i.value={"has-sidebar":s.value,home:n.value.layout==="home",top:t.value===0,"screen-open":e.isScreenOpen}}),(u,h)=>(a(),c("div",{class:w(["VPNavBar",i.value])},[p("div",ia,[p("div",la,[p("div",ca,[m(ta,null,{"nav-bar-title-before":v(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),_:3})]),p("div",ua,[p("div",da,[l(u.$slots,"nav-bar-content-before",{},void 0,!0),m(Rs,{class:"search"}),m(Ds,{class:"menu"}),m(aa,{class:"translations"}),m(Un,{class:"appearance"}),m(Qs,{class:"social-links"}),m(Ps,{class:"extra"}),l(u.$slots,"nav-bar-content-after",{},void 0,!0),m(ws,{class:"hamburger",active:u.isScreenOpen,onClick:h[0]||(h[0]=d=>u.$emit("toggle-screen"))},null,8,["active"])])])])]),va],2))}}),ha=b(pa,[["__scopeId","data-v-1303e283"]]),fa={key:0,class:"VPNavScreenAppearance"},_a={class:"text"},ma=_({__name:"VPNavScreenAppearance",setup(o){const{site:e,theme:t}=P();return(s,n)=>r(e).appearance&&r(e).appearance!=="force-dark"&&r(e).appearance!=="force-auto"?(a(),c("div",fa,[p("p",_a,T(r(t).darkModeSwitchLabel||"Appearance"),1),m(me)])):f("",!0)}}),ka=b(ma,[["__scopeId","data-v-79da70de"]]),ba=_({__name:"VPNavScreenMenuLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e),innerHTML:t.item.text},null,8,["href","target","rel","onClick","innerHTML"]))}}),$a=b(ba,[["__scopeId","data-v-9a3ef902"]]),ga=_({__name:"VPNavScreenMenuGroupLink",props:{item:{}},setup(o){const e=te("close-screen");return(t,s)=>(a(),k(D,{class:"VPNavScreenMenuGroupLink",href:t.item.link,target:t.item.target,rel:t.item.rel,onClick:r(e)},{default:v(()=>[O(T(t.item.text),1)]),_:1},8,["href","target","rel","onClick"]))}}),He=b(ga,[["__scopeId","data-v-03f7344f"]]),ya={class:"VPNavScreenMenuGroupSection"},Pa={key:0,class:"title"},Va=_({__name:"VPNavScreenMenuGroupSection",props:{text:{},items:{}},setup(o){return(e,t)=>(a(),c("div",ya,[e.text?(a(),c("p",Pa,T(e.text),1)):f("",!0),(a(!0),c(M,null,E(e.items,s=>(a(),k(He,{key:s.text,item:s},null,8,["item"]))),128))]))}}),La=b(Va,[["__scopeId","data-v-3b79ab2a"]]),Sa=o=>(C("data-v-496537ac"),o=o(),H(),o),Ta=["aria-controls","aria-expanded"],Ia=["innerHTML"],wa=Sa(()=>p("span",{class:"vpi-plus button-icon"},null,-1)),Na=["id"],Ma={key:0,class:"item"},Aa={key:1,class:"item"},Ba={key:2,class:"group"},Ca=_({__name:"VPNavScreenMenuGroup",props:{text:{},items:{}},setup(o){const e=o,t=I(!1),s=g(()=>`NavScreenGroup-${e.text.replace(" ","-").toLowerCase()}`);function n(){t.value=!t.value}return(i,u)=>(a(),c("div",{class:w(["VPNavScreenMenuGroup",{open:t.value}])},[p("button",{class:"button","aria-controls":s.value,"aria-expanded":t.value,onClick:n},[p("span",{class:"button-text",innerHTML:i.text},null,8,Ia),wa],8,Ta),p("div",{id:s.value,class:"items"},[(a(!0),c(M,null,E(i.items,h=>(a(),c(M,{key:JSON.stringify(h)},["link"in h?(a(),c("div",Ma,[m(He,{item:h},null,8,["item"])])):"component"in h?(a(),c("div",Aa,[(a(),k(F(h.component),q({ref_for:!0},h.props,{"screen-menu":""}),null,16))])):(a(),c("div",Ba,[m(La,{text:h.text,items:h.items},null,8,["text","items"])]))],64))),128))],8,Na)],2))}}),Ha=b(Ca,[["__scopeId","data-v-496537ac"]]),Ea={key:0,class:"VPNavScreenMenu"},Fa=_({__name:"VPNavScreenMenu",setup(o){const{theme:e}=P();return(t,s)=>r(e).nav?(a(),c("nav",Ea,[(a(!0),c(M,null,E(r(e).nav,n=>(a(),c(M,{key:JSON.stringify(n)},["link"in n?(a(),k($a,{key:0,item:n},null,8,["item"])):"component"in n?(a(),k(F(n.component),q({key:1,ref_for:!0},n.props,{"screen-menu":""}),null,16)):(a(),k(Ha,{key:2,text:n.text||"",items:n.items},null,8,["text","items"]))],64))),128))])):f("",!0)}}),Da=_({__name:"VPNavScreenSocialLinks",setup(o){const{theme:e}=P();return(t,s)=>r(e).socialLinks?(a(),k($e,{key:0,class:"VPNavScreenSocialLinks",links:r(e).socialLinks},null,8,["links"])):f("",!0)}}),Ee=o=>(C("data-v-c618ff37"),o=o(),H(),o),Oa=Ee(()=>p("span",{class:"vpi-languages icon lang"},null,-1)),Ga=Ee(()=>p("span",{class:"vpi-chevron-down icon chevron"},null,-1)),Ua={class:"list"},ja=_({__name:"VPNavScreenTranslations",setup(o){const{localeLinks:e,currentLang:t}=Y({correspondingLink:!0}),s=I(!1);function n(){s.value=!s.value}return(i,u)=>r(e).length&&r(t).label?(a(),c("div",{key:0,class:w(["VPNavScreenTranslations",{open:s.value}])},[p("button",{class:"title",onClick:n},[Oa,O(" "+T(r(t).label)+" ",1),Ga]),p("ul",Ua,[(a(!0),c(M,null,E(r(e),h=>(a(),c("li",{key:h.link,class:"item"},[m(D,{class:"link",href:h.link},{default:v(()=>[O(T(h.text),1)]),_:2},1032,["href"])]))),128))])],2)):f("",!0)}}),za=b(ja,[["__scopeId","data-v-c618ff37"]]),qa={class:"container"},Wa=_({__name:"VPNavScreen",props:{open:{type:Boolean}},setup(o){const e=I(null),t=Se(oe?document.body:null);return(s,n)=>(a(),k(de,{name:"fade",onEnter:n[0]||(n[0]=i=>t.value=!0),onAfterLeave:n[1]||(n[1]=i=>t.value=!1)},{default:v(()=>[s.open?(a(),c("div",{key:0,class:"VPNavScreen",ref_key:"screen",ref:e,id:"VPNavScreen"},[p("div",qa,[l(s.$slots,"nav-screen-content-before",{},void 0,!0),m(Fa,{class:"menu"}),m(za,{class:"translations"}),m(ka,{class:"appearance"}),m(Da,{class:"social-links"}),l(s.$slots,"nav-screen-content-after",{},void 0,!0)])],512)):f("",!0)]),_:3}))}}),Ka=b(Wa,[["__scopeId","data-v-c3a48aed"]]),Ja={key:0,class:"VPNav"},Ra=_({__name:"VPNav",setup(o){const{isScreenOpen:e,closeScreen:t,toggleScreen:s}=wn(),{frontmatter:n}=P(),i=g(()=>n.value.navbar!==!1);return Te("close-screen",t),Z(()=>{oe&&document.documentElement.classList.toggle("hide-nav",!i.value)}),(u,h)=>i.value?(a(),c("header",Ja,[m(ha,{"is-screen-open":r(e),onToggleScreen:r(s)},{"nav-bar-title-before":v(()=>[l(u.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(u.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(u.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(u.$slots,"nav-bar-content-after",{},void 0,!0)]),_:3},8,["is-screen-open","onToggleScreen"]),m(Ka,{open:r(e)},{"nav-screen-content-before":v(()=>[l(u.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(u.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3},8,["open"])])):f("",!0)}}),Ya=b(Ra,[["__scopeId","data-v-2a4e514e"]]),Fe=o=>(C("data-v-9035698b"),o=o(),H(),o),Qa=["role","tabindex"],Xa=Fe(()=>p("div",{class:"indicator"},null,-1)),Za=Fe(()=>p("span",{class:"vpi-chevron-right caret-icon"},null,-1)),xa=[Za],er={key:1,class:"items"},tr=_({__name:"VPSidebarItem",props:{item:{},depth:{}},setup(o){const e=o,{collapsed:t,collapsible:s,isLink:n,isActiveLink:i,hasActiveLink:u,hasChildren:h,toggle:d}=kt(g(()=>e.item)),$=g(()=>h.value?"section":"div"),V=g(()=>n.value?"a":"div"),y=g(()=>h.value?e.depth+2===7?"p":`h${e.depth+2}`:"p"),L=g(()=>n.value?void 0:"button"),N=g(()=>[[`level-${e.depth}`],{collapsible:s.value},{collapsed:t.value},{"is-link":n.value},{"is-active":i.value},{"has-active":u.value}]);function A(S){"key"in S&&S.key!=="Enter"||!e.item.link&&d()}function B(){e.item.link&&d()}return(S,j)=>{const z=J("VPSidebarItem",!0);return a(),k(F($.value),{class:w(["VPSidebarItem",N.value])},{default:v(()=>[S.item.text?(a(),c("div",q({key:0,class:"item",role:L.value},Ye(S.item.items?{click:A,keydown:A}:{},!0),{tabindex:S.item.items&&0}),[Xa,S.item.link?(a(),k(D,{key:0,tag:V.value,class:"link",href:S.item.link,rel:S.item.rel,target:S.item.target},{default:v(()=>[(a(),k(F(y.value),{class:"text",innerHTML:S.item.text},null,8,["innerHTML"]))]),_:1},8,["tag","href","rel","target"])):(a(),k(F(y.value),{key:1,class:"text",innerHTML:S.item.text},null,8,["innerHTML"])),S.item.collapsed!=null&&S.item.items&&S.item.items.length?(a(),c("div",{key:2,class:"caret",role:"button","aria-label":"toggle section",onClick:B,onKeydown:Re(B,["enter"]),tabindex:"0"},xa,32)):f("",!0)],16,Qa)):f("",!0),S.item.items&&S.item.items.length?(a(),c("div",er,[S.depth<5?(a(!0),c(M,{key:0},E(S.item.items,R=>(a(),k(z,{key:R.text,item:R,depth:S.depth+1},null,8,["item","depth"]))),128)):f("",!0)])):f("",!0)]),_:1},8,["class"])}}}),or=b(tr,[["__scopeId","data-v-9035698b"]]),nr=_({__name:"VPSidebarGroup",props:{items:{}},setup(o){const e=I(!0);let t=null;return K(()=>{t=setTimeout(()=>{t=null,e.value=!1},300)}),Qe(()=>{t!=null&&(clearTimeout(t),t=null)}),(s,n)=>(a(!0),c(M,null,E(s.items,i=>(a(),c("div",{key:i.text,class:w(["group",{"no-transition":e.value}])},[m(or,{item:i,depth:0},null,8,["item"])],2))),128))}}),sr=b(nr,[["__scopeId","data-v-c3eaeb1a"]]),De=o=>(C("data-v-edd7de80"),o=o(),H(),o),ar=De(()=>p("div",{class:"curtain"},null,-1)),rr={class:"nav",id:"VPSidebarNav","aria-labelledby":"sidebar-aria-label",tabindex:"-1"},ir=De(()=>p("span",{class:"visually-hidden",id:"sidebar-aria-label"}," Sidebar Navigation ",-1)),lr=_({__name:"VPSidebar",props:{open:{type:Boolean}},setup(o){const{sidebarGroups:e,hasSidebar:t}=U(),s=o,n=I(null),i=Se(oe?document.body:null);G([s,n],()=>{var h;s.open?(i.value=!0,(h=n.value)==null||h.focus()):i.value=!1},{immediate:!0,flush:"post"});const u=I(0);return G(e,()=>{u.value+=1},{deep:!0}),(h,d)=>r(t)?(a(),c("aside",{key:0,class:w(["VPSidebar",{open:h.open}]),ref_key:"navEl",ref:n,onClick:d[0]||(d[0]=Xe(()=>{},["stop"]))},[ar,p("nav",rr,[ir,l(h.$slots,"sidebar-nav-before",{},void 0,!0),(a(),k(sr,{items:r(e),key:u.value},null,8,["items"])),l(h.$slots,"sidebar-nav-after",{},void 0,!0)])],2)):f("",!0)}}),cr=b(lr,[["__scopeId","data-v-edd7de80"]]),ur=_({__name:"VPSkipLink",setup(o){const e=ee(),t=I();G(()=>e.path,()=>t.value.focus());function s({target:n}){const i=document.getElementById(decodeURIComponent(n.hash).slice(1));if(i){const u=()=>{i.removeAttribute("tabindex"),i.removeEventListener("blur",u)};i.setAttribute("tabindex","-1"),i.addEventListener("blur",u),i.focus(),window.scrollTo(0,0)}}return(n,i)=>(a(),c(M,null,[p("span",{ref_key:"backToTop",ref:t,tabindex:"-1"},null,512),p("a",{href:"#VPContent",class:"VPSkipLink visually-hidden",onClick:s}," Skip to content ")],64))}}),dr=b(ur,[["__scopeId","data-v-3e86afbf"]]),vr=_({__name:"Layout",setup(o){const{isOpen:e,open:t,close:s}=U(),n=ee();G(()=>n.path,s),mt(e,s);const{frontmatter:i}=P(),u=Ze(),h=g(()=>!!u["home-hero-image"]);return Te("hero-image-slot-exists",h),(d,$)=>{const V=J("Content");return r(i).layout!==!1?(a(),c("div",{key:0,class:w(["Layout",r(i).pageClass])},[l(d.$slots,"layout-top",{},void 0,!0),m(dr),m(ot,{class:"backdrop",show:r(e),onClick:r(s)},null,8,["show","onClick"]),m(Ya,null,{"nav-bar-title-before":v(()=>[l(d.$slots,"nav-bar-title-before",{},void 0,!0)]),"nav-bar-title-after":v(()=>[l(d.$slots,"nav-bar-title-after",{},void 0,!0)]),"nav-bar-content-before":v(()=>[l(d.$slots,"nav-bar-content-before",{},void 0,!0)]),"nav-bar-content-after":v(()=>[l(d.$slots,"nav-bar-content-after",{},void 0,!0)]),"nav-screen-content-before":v(()=>[l(d.$slots,"nav-screen-content-before",{},void 0,!0)]),"nav-screen-content-after":v(()=>[l(d.$slots,"nav-screen-content-after",{},void 0,!0)]),_:3}),m(In,{open:r(e),onOpenMenu:r(t)},null,8,["open","onOpenMenu"]),m(cr,{open:r(e)},{"sidebar-nav-before":v(()=>[l(d.$slots,"sidebar-nav-before",{},void 0,!0)]),"sidebar-nav-after":v(()=>[l(d.$slots,"sidebar-nav-after",{},void 0,!0)]),_:3},8,["open"]),m(ln,null,{"page-top":v(()=>[l(d.$slots,"page-top",{},void 0,!0)]),"page-bottom":v(()=>[l(d.$slots,"page-bottom",{},void 0,!0)]),"not-found":v(()=>[l(d.$slots,"not-found",{},void 0,!0)]),"home-hero-before":v(()=>[l(d.$slots,"home-hero-before",{},void 0,!0)]),"home-hero-info-before":v(()=>[l(d.$slots,"home-hero-info-before",{},void 0,!0)]),"home-hero-info":v(()=>[l(d.$slots,"home-hero-info",{},void 0,!0)]),"home-hero-info-after":v(()=>[l(d.$slots,"home-hero-info-after",{},void 0,!0)]),"home-hero-actions-after":v(()=>[l(d.$slots,"home-hero-actions-after",{},void 0,!0)]),"home-hero-image":v(()=>[l(d.$slots,"home-hero-image",{},void 0,!0)]),"home-hero-after":v(()=>[l(d.$slots,"home-hero-after",{},void 0,!0)]),"home-features-before":v(()=>[l(d.$slots,"home-features-before",{},void 0,!0)]),"home-features-after":v(()=>[l(d.$slots,"home-features-after",{},void 0,!0)]),"doc-footer-before":v(()=>[l(d.$slots,"doc-footer-before",{},void 0,!0)]),"doc-before":v(()=>[l(d.$slots,"doc-before",{},void 0,!0)]),"doc-after":v(()=>[l(d.$slots,"doc-after",{},void 0,!0)]),"doc-top":v(()=>[l(d.$slots,"doc-top",{},void 0,!0)]),"doc-bottom":v(()=>[l(d.$slots,"doc-bottom",{},void 0,!0)]),"aside-top":v(()=>[l(d.$slots,"aside-top",{},void 0,!0)]),"aside-bottom":v(()=>[l(d.$slots,"aside-bottom",{},void 0,!0)]),"aside-outline-before":v(()=>[l(d.$slots,"aside-outline-before",{},void 0,!0)]),"aside-outline-after":v(()=>[l(d.$slots,"aside-outline-after",{},void 0,!0)]),"aside-ads-before":v(()=>[l(d.$slots,"aside-ads-before",{},void 0,!0)]),"aside-ads-after":v(()=>[l(d.$slots,"aside-ads-after",{},void 0,!0)]),_:3}),m(pn),l(d.$slots,"layout-bottom",{},void 0,!0)],2)):(a(),k(V,{key:1}))}}}),pr=b(vr,[["__scopeId","data-v-22f859ac"]]),fr={Layout:pr,enhanceApp:({app:o})=>{o.component("Badge",xe)}};export{fr as t}; diff --git a/assets/demo_index.md.D-H9zRUE.js b/assets/demo_index.md.D-H9zRUE.js new file mode 100644 index 0000000..b0246fb --- /dev/null +++ b/assets/demo_index.md.D-H9zRUE.js @@ -0,0 +1 @@ +import{_ as a,c as t,o,j as e,a as d}from"./chunks/framework.C94oF1kp.js";const x=JSON.parse('{"title":"demo","description":"","frontmatter":{},"headers":[],"relativePath":"demo/index.md","filePath":"zh/demo/index.md"}'),n={name:"demo/index.md"},r=e("h1",{id:"demo",tabindex:"-1"},[d("demo "),e("a",{class:"header-anchor",href:"#demo","aria-label":'Permalink to "demo"'},"​")],-1),s=[r];function c(i,m,_,l,h,p){return o(),t("div",null,s)}const u=a(n,[["render",c]]);export{x as __pageData,u as default}; diff --git a/assets/demo_index.md.D-H9zRUE.lean.js b/assets/demo_index.md.D-H9zRUE.lean.js new file mode 100644 index 0000000..b0246fb --- /dev/null +++ b/assets/demo_index.md.D-H9zRUE.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o,j as e,a as d}from"./chunks/framework.C94oF1kp.js";const x=JSON.parse('{"title":"demo","description":"","frontmatter":{},"headers":[],"relativePath":"demo/index.md","filePath":"zh/demo/index.md"}'),n={name:"demo/index.md"},r=e("h1",{id:"demo",tabindex:"-1"},[d("demo "),e("a",{class:"header-anchor",href:"#demo","aria-label":'Permalink to "demo"'},"​")],-1),s=[r];function c(i,m,_,l,h,p){return o(),t("div",null,s)}const u=a(n,[["render",c]]);export{x as __pageData,u as default}; diff --git a/assets/en_api_index.md.BaqBYqY8.js b/assets/en_api_index.md.BaqBYqY8.js new file mode 100644 index 0000000..0fb9529 --- /dev/null +++ b/assets/en_api_index.md.BaqBYqY8.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as c,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),o={name:"en/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return c(),n("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/en_api_index.md.BaqBYqY8.lean.js b/assets/en_api_index.md.BaqBYqY8.lean.js new file mode 100644 index 0000000..0fb9529 --- /dev/null +++ b/assets/en_api_index.md.BaqBYqY8.lean.js @@ -0,0 +1 @@ +import{_ as a,c as n,o as c,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),o={name:"en/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"Description"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return c(),n("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/en_api_index.md.Bgu-LD1B.js b/assets/en_api_index.md.Bgu-LD1B.js deleted file mode 100644 index 2792da6..0000000 --- a/assets/en_api_index.md.Bgu-LD1B.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),n={name:"en/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/en_api_index.md.Bgu-LD1B.lean.js b/assets/en_api_index.md.Bgu-LD1B.lean.js deleted file mode 100644 index 2792da6..0000000 --- a/assets/en_api_index.md.Bgu-LD1B.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"en/api/index.md","filePath":"en/api/index.md"}'),n={name:"en/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/en_api_mp_math_angle.md.BuhpKHnt.js b/assets/en_api_mp_math_angle.md.z39I-qRz.js similarity index 87% rename from assets/en_api_mp_math_angle.md.BuhpKHnt.js rename to assets/en_api_mp_math_angle.md.z39I-qRz.js index 94ef475..f4e83e1 100644 --- a/assets/en_api_mp_math_angle.md.BuhpKHnt.js +++ b/assets/en_api_mp_math_angle.md.z39I-qRz.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n(`

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

Description: 任意角度。

Arguments:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
Source code
python
def __init__(self, value: float, is_radian: bool=False):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n(`

mbcp.mp_math.angle

Description: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

Description: 任意角度。

Arguments:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
Source code
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -8,92 +8,92 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const c
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

Description: 余角:两角的和为90°。

Return: 余角

Source code
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

Description: 余角:两角的和为90°。

Return: 余角

Source code
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

Description: 补角:两角的和为180°。

Return: 补角

Source code
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

Description: 补角:两角的和为180°。

Return: 补角

Source code
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

Description: 角度。

Return: 弧度

Source code
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

Description: 角度。

Return: 弧度

Source code
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

Description: 最小正角。

Return: 最小正角度

Source code
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

Description: 最小正角。

Return: 最小正角度

Source code
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

Description: 最大负角。

Return: 最大负角度

Source code
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

Description: 最大负角。

Return: 最大负角度

Source code
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

Description: 正弦值。

Return: 正弦值

Source code
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

Description: 正弦值。

Return: 正弦值

Source code
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

Description: 余弦值。

Return: 余弦值

Source code
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

Description: 余弦值。

Return: 余弦值

Source code
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

Description: 正切值。

Return: 正切值

Source code
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

Description: 正切值。

Return: 正切值

Source code
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

Description: 余切值。

Return: 余切值

Source code
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

Description: 余切值。

Return: 余切值

Source code
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

Description: 正割值。

Return: 正割值

Source code
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

Description: 正割值。

Return: 正割值

Source code
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

Description: 余割值。

Return: 余割值

Source code
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

Description: 余割值。

Return: 余割值

Source code
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

Source code
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

Source code
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

Source code
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

Source code
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

Source code
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

Source code
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

Source code
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

Source code
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

Source code
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

Source code
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

Source code
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

Source code
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

Source code
python
def __truediv__(self, other):
+    ...

method self / other

Source code
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
`,78),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default}; + return AnyAngle(self.radian / other, is_radian=True)
`,80),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_api_mp_math_angle.md.BuhpKHnt.lean.js b/assets/en_api_mp_math_angle.md.z39I-qRz.lean.js similarity index 57% rename from assets/en_api_mp_math_angle.md.BuhpKHnt.lean.js rename to assets/en_api_mp_math_angle.md.z39I-qRz.lean.js index 89f6a58..b1e5da2 100644 --- a/assets/en_api_mp_math_angle.md.BuhpKHnt.lean.js +++ b/assets/en_api_mp_math_angle.md.z39I-qRz.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n("",78),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const c=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"en/api/mp_math/angle.md","filePath":"en/api/mp_math/angle.md"}'),t={name:"en/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(t,[["render",h]]);export{c as __pageData,F as default}; diff --git a/assets/en_api_mp_math_const.md.CSc4Ut1v.js b/assets/en_api_mp_math_const.md.CSc4Ut1v.js new file mode 100644 index 0000000..714c29e --- /dev/null +++ b/assets/en_api_mp_math_const.md.CSc4Ut1v.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},i=o('

mbcp.mp_math.const

Description: 本模块定义了一些常用的常量

var PI = math.pi

  • Description: 常量 π

var E = math.e

  • Description: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • Description: 黄金分割比

var GAMMA = 0.5772156649015329

  • Description: 欧拉常数

var EPSILON = 0.0001

  • Description: 精度误差

var APPROX = 0.001

  • Description: 约等于判定误差
',14),c=[i];function n(s,l,h,d,m,p){return e(),t("div",null,c)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/en_api_mp_math_const.md.CSc4Ut1v.lean.js b/assets/en_api_mp_math_const.md.CSc4Ut1v.lean.js new file mode 100644 index 0000000..8778859 --- /dev/null +++ b/assets/en_api_mp_math_const.md.CSc4Ut1v.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},i=o("",14),c=[i];function n(s,l,h,d,m,p){return e(),t("div",null,c)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/en_api_mp_math_const.md.D_Flpj8t.js b/assets/en_api_mp_math_const.md.D_Flpj8t.js deleted file mode 100644 index 0e09b57..0000000 --- a/assets/en_api_mp_math_const.md.D_Flpj8t.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},n=o('

var EPSILON = 0.0001

  • Description: ε

var APPROX = 0.001

  • Description: 约等于误差
',4),s=[n];function c(i,_,p,l,m,d){return e(),a("div",null,s)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js b/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js deleted file mode 100644 index f0c92b4..0000000 --- a/assets/en_api_mp_math_const.md.D_Flpj8t.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"en/api/mp_math/const.md","filePath":"en/api/mp_math/const.md"}'),r={name:"en/api/mp_math/const.md"},n=o("",4),s=[n];function c(i,_,p,l,m,d){return e(),a("div",null,s)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/api_mp_math_equation.md.Bx8s1yFf.js b/assets/en_api_mp_math_equation.md.0VnHCQQ4.js similarity index 68% rename from assets/api_mp_math_equation.md.Bx8s1yFf.js rename to assets/en_api_mp_math_equation.md.0VnHCQQ4.js index a74b0fa..5e220ff 100644 --- a/assets/api_mp_math_equation.md.Bx8s1yFf.js +++ b/assets/en_api_mp_math_equation.md.0VnHCQQ4.js @@ -1,4 +1,26 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"api/mp_math/equation.md","filePath":"api/mp_math/equation.md"}'),l={name:"api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

说明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

参数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

引发:

  • ValueError 无效变量类型
源代码
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),t={name:"en/api/mp_math/equation.md"},l=n(`

mbcp.mp_math.equation

Description: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

Description: 计算曲线上的点。

Arguments:

  • *t:
  • 参数:

Return: 目标点

Source code
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

Description: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

Arguments:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

Return: 偏导函数

Raises:

  • ValueError 无效变量类型
Source code
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -40,7 +62,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

说明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

参数:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源代码
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

Description: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

Arguments:

  • func: 函数
  • *args: 参数

Return: 柯里化后的函数

Source code
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -55,26 +77,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

说明: 曲线方程。

参数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源代码
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

说明: 计算曲线上的点。

参数:

  • *t:
  • 参数:
源代码
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; + return curried_func
`,30),p=[l];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/en_api_mp_math_equation.md.0VnHCQQ4.lean.js b/assets/en_api_mp_math_equation.md.0VnHCQQ4.lean.js new file mode 100644 index 0000000..9967043 --- /dev/null +++ b/assets/en_api_mp_math_equation.md.0VnHCQQ4.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),t={name:"en/api/mp_math/equation.md"},l=n("",30),p=[l];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/en_api_mp_math_equation.md.BuG3Sd0K.lean.js b/assets/en_api_mp_math_equation.md.BuG3Sd0K.lean.js deleted file mode 100644 index 6d1c39b..0000000 --- a/assets/en_api_mp_math_equation.md.BuG3Sd0K.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"en/api/mp_math/equation.md","filePath":"en/api/mp_math/equation.md"}'),l={name:"en/api/mp_math/equation.md"},t=n("",27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const F=s(l,[["render",p]]);export{u as __pageData,F as default}; diff --git a/assets/en_api_mp_math_function.md.BzQ8FTPC.js b/assets/en_api_mp_math_function.md.BzQ8FTPC.js new file mode 100644 index 0000000..c088319 --- /dev/null +++ b/assets/en_api_mp_math_function.md.BzQ8FTPC.js @@ -0,0 +1,17 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"en/api/mp_math/function.md","filePath":"en/api/mp_math/function.md"}'),n={name:"en/api/mp_math/function.md"},l=a('

mbcp.mp_math.function

Description: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

Description: 计算三元函数在某点的梯度向量。

',4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a('',1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a('',1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a('',1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a(`

Arguments:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

Return: 梯度

Source code
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\\\nabla f(x_0, y_0, z_0) = \\\\left(\\\\frac{\\\\partial f}{\\\\partial x}, \\\\frac{\\\\partial f}{\\\\partial y}, \\\\frac{\\\\partial f}{\\\\partial z}\\\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)
`,4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/en_api_mp_math_function.md.BzQ8FTPC.lean.js b/assets/en_api_mp_math_function.md.BzQ8FTPC.lean.js new file mode 100644 index 0000000..249d8a6 --- /dev/null +++ b/assets/en_api_mp_math_function.md.BzQ8FTPC.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"en/api/mp_math/function.md","filePath":"en/api/mp_math/function.md"}'),n={name:"en/api/mp_math/function.md"},l=a("",4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a("",1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a("",1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a("",4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/en_api_mp_math_index.md.DrjDUYBY.js b/assets/en_api_mp_math_index.md.DrjDUYBY.js deleted file mode 100644 index 42ab20b..0000000 --- a/assets/en_api_mp_math_index.md.DrjDUYBY.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"en/api/mp_math/index.md","filePath":"en/api/mp_math/index.md"}'),n={name:"en/api/mp_math/index.md"};function m(p,i,r,c,o,s){return a(),t("div")}const h=e(n,[["render",m]]);export{d as __pageData,h as default}; diff --git a/assets/en_api_mp_math_index.md.DrjDUYBY.lean.js b/assets/en_api_mp_math_index.md.DrjDUYBY.lean.js deleted file mode 100644 index 42ab20b..0000000 --- a/assets/en_api_mp_math_index.md.DrjDUYBY.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"en/api/mp_math/index.md","filePath":"en/api/mp_math/index.md"}'),n={name:"en/api/mp_math/index.md"};function m(p,i,r,c,o,s){return a(),t("div")}const h=e(n,[["render",m]]);export{d as __pageData,h as default}; diff --git a/assets/en_api_mp_math_index.md.Gx9tQ_Za.js b/assets/en_api_mp_math_index.md.Gx9tQ_Za.js new file mode 100644 index 0000000..8fce09b --- /dev/null +++ b/assets/en_api_mp_math_index.md.Gx9tQ_Za.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"en/api/mp_math/index.md","filePath":"en/api/mp_math/index.md"}'),c={name:"en/api/mp_math/index.md"},i=o('

mbcp.mp_math

Description: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),m=[i];function n(d,p,_,l,r,s){return a(),t("div",null,m)}const b=e(c,[["render",n]]);export{u as __pageData,b as default}; diff --git a/assets/en_api_mp_math_index.md.Gx9tQ_Za.lean.js b/assets/en_api_mp_math_index.md.Gx9tQ_Za.lean.js new file mode 100644 index 0000000..e78dea1 --- /dev/null +++ b/assets/en_api_mp_math_index.md.Gx9tQ_Za.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"en/api/mp_math/index.md","filePath":"en/api/mp_math/index.md"}'),c={name:"en/api/mp_math/index.md"},i=o("",3),m=[i];function n(d,p,_,l,r,s){return a(),t("div",null,m)}const b=e(c,[["render",n]]);export{u as __pageData,b as default}; diff --git a/assets/en_api_mp_math_line.md.BEvxdWYQ.js b/assets/en_api_mp_math_line.md.e8dK90h_.js similarity index 93% rename from assets/en_api_mp_math_line.md.BEvxdWYQ.js rename to assets/en_api_mp_math_line.md.e8dK90h_.js index 4003bd5..88be222 100644 --- a/assets/en_api_mp_math_line.md.BEvxdWYQ.js +++ b/assets/en_api_mp_math_line.md.e8dK90h_.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n(`

class Line3

method __init__(self, point: Point3, direction: Vector3)

Description: 三维空间中的直线。由一个点和一个方向向量确定。

Arguments:

  • point: 直线上的一点
  • direction: 直线的方向向量
Source code
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n(`

mbcp.mp_math.line

Description: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

Description: 三维空间中的直线。由一个点和一个方向向量确定。

Arguments:

  • point: 直线上的一点
  • direction: 直线的方向向量
Source code
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

Description: 判断两条直线是否近似相等。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

Description: 判断两条直线是否近似相等。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

Description: 计算直线和直线之间的夹角。

Arguments:

  • other: 另一条直线

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

Description: 计算直线和直线之间的夹角。

Arguments:

  • other: 另一条直线

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -25,7 +25,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

Description: 计算直线和直线或点之间的距离。

Arguments:

  • other: 平行直线或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

Description: 计算直线和直线或点之间的距离。

Arguments:

  • other: 平行直线或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -48,7 +48,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

Description: 计算两条直线的交点。

Arguments:

  • other: 另一条直线

Return: 交点

Raises:

  • ValueError 直线平行
  • ValueError 直线不共面
Source code
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

Description: 计算两条直线的交点。

Arguments:

  • other: 另一条直线

Return: 交点

Raises:

  • ValueError 直线平行
  • ValueError 直线不共面
Source code
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

Description: 计算直线经过指定点p的垂线。

Arguments:

  • point: 指定点

Return: 垂线

Source code
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

Description: 计算直线经过指定点p的垂线。

Arguments:

  • point: 指定点

Return: 垂线

Source code
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -71,7 +71,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

Description: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

Arguments:

  • t: 参数t

Return: 点

Source code
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

Description: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

Arguments:

  • t: 参数t

Return: 点

Source code
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -79,13 +79,13 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

Description: 获取直线的参数方程。

Return: x(t), y(t), z(t)

Source code
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

Description: 获取直线的参数方程。

Return: x(t), y(t), z(t)

Source code
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

Description: 判断两条直线是否近似平行。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

Description: 判断两条直线是否近似平行。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -94,7 +94,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

Description: 判断两条直线是否平行。

Arguments:

  • other: 另一条直线

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

Description: 判断两条直线是否平行。

Arguments:

  • other: 另一条直线

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -102,7 +102,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

Description: 判断两条直线是否共线。

Arguments:

  • other: 另一条直线

Return: 是否共线

Source code
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

Description: 判断两条直线是否共线。

Arguments:

  • other: 另一条直线

Return: 是否共线

Source code
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -110,7 +110,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

Description: 判断点是否在直线上。

Arguments:

  • point: 点

Return: 是否在直线上

Source code
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

Description: 判断点是否在直线上。

Arguments:

  • point: 点

Return: 是否在直线上

Source code
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -118,7 +118,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

Description: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

Arguments:

  • other: 另一条直线

Return: 是否共面

Source code
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

Description: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

Arguments:

  • other: 另一条直线

Return: 是否共面

Source code
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -127,7 +127,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

Description: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

Source code
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

Description: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

Source code
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -140,7 +140,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

Description: 工厂函数 由两点构造直线。

Arguments:

  • p1: 点1
  • p2: 点2

Return: 直线

Source code
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

Description: 工厂函数 由两点构造直线。

Arguments:

  • p1: 点1
  • p2: 点2

Return: 直线

Source code
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -151,7 +151,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

Description: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

Arguments:

  • other: 另一条直线

Return: 交点

Source code
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

Description: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

Arguments:

  • other: 另一条直线

Return: 交点

Source code
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -164,7 +164,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

Description: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

Arguments:

  • other:
Source code
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

Description: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

Arguments:

  • other:
Source code
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -175,4 +175,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,105),e=[l];function h(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(t,[["render",h]]);export{E as __pageData,c as default}; + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,107),e=[l];function h(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(t,[["render",h]]);export{E as __pageData,c as default}; diff --git a/assets/en_api_mp_math_line.md.BEvxdWYQ.lean.js b/assets/en_api_mp_math_line.md.e8dK90h_.lean.js similarity index 56% rename from assets/en_api_mp_math_line.md.BEvxdWYQ.lean.js rename to assets/en_api_mp_math_line.md.e8dK90h_.lean.js index 7e81d3b..f99fb6a 100644 --- a/assets/en_api_mp_math_line.md.BEvxdWYQ.lean.js +++ b/assets/en_api_mp_math_line.md.e8dK90h_.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n("",105),e=[l];function h(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(t,[["render",h]]);export{E as __pageData,c as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"en/api/mp_math/line.md","filePath":"en/api/mp_math/line.md"}'),t={name:"en/api/mp_math/line.md"},l=n("",107),e=[l];function h(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(t,[["render",h]]);export{E as __pageData,c as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js deleted file mode 100644 index e2c985d..0000000 --- a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as r,c as a,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • Description: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • Description: 数组变量

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

',34),i=[o];function t(s,c,u,g,p,v){return e(),a("div",null,i)}const h=r(n,[["render",t]]);export{y as __pageData,h as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js b/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js deleted file mode 100644 index ff586e8..0000000 --- a/assets/en_api_mp_math_mp_math_typing.md.CyXXFdS4.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as r,c as a,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,p,v){return e(),a("div",null,i)}const h=r(n,[["render",t]]);export{y as __pageData,h as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.js b/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.js new file mode 100644 index 0000000..3a10baf --- /dev/null +++ b/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},i=l('

mbcp.mp_math.mp_math_typing

Description: 本模块用于内部类型提示

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • Description: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • Description: 数组变量

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

',36),o=[i];function c(t,s,u,d,p,g){return e(),r("div",null,o)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.lean.js b/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.lean.js new file mode 100644 index 0000000..6be5dc4 --- /dev/null +++ b/assets/en_api_mp_math_mp_math_typing.md.DByFpCMm.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"en/api/mp_math/mp_math_typing.md","filePath":"en/api/mp_math/mp_math_typing.md"}'),n={name:"en/api/mp_math/mp_math_typing.md"},i=l("",36),o=[i];function c(t,s,u,d,p,g){return e(),r("div",null,o)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/en_api_mp_math_plane.md.DUu9P3nM.lean.js b/assets/en_api_mp_math_plane.md.DUu9P3nM.lean.js deleted file mode 100644 index 6043c0a..0000000 --- a/assets/en_api_mp_math_plane.md.DUu9P3nM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},h=n("",103),t=[h];function p(e,k,r,d,o,E){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/en_api_mp_math_plane.md.DUu9P3nM.js b/assets/en_api_mp_math_plane.md.DYLAU1Re.js similarity index 93% rename from assets/en_api_mp_math_plane.md.DUu9P3nM.js rename to assets/en_api_mp_math_plane.md.DYLAU1Re.js index 16d8458..57c7c75 100644 --- a/assets/en_api_mp_math_plane.md.DUu9P3nM.js +++ b/assets/en_api_mp_math_plane.md.DYLAU1Re.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},h=n(`

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

Description: 平面方程:ax + by + cz + d = 0

Arguments:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
Source code
python
def __init__(self, a: float, b: float, c: float, d: float):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},t=n(`

mbcp.mp_math.plane

Description: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

Description: 平面方程:ax + by + cz + d = 0

Arguments:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
Source code
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

Description: 判断两个平面是否近似相等。

Arguments:

  • other: 另一个平面

Return: 是否近似相等

Source code
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

Description: 判断两个平面是否近似相等。

Arguments:

  • other: 另一个平面

Return: 是否近似相等

Source code
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

Description: 计算平面与平面之间的夹角。

Arguments:

  • other: 另一个平面

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

Description: 计算平面与平面之间的夹角。

Arguments:

  • other: 另一个平面

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

Description: 计算平面与平面或点之间的距离。

Arguments:

  • other: 另一个平面或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

Description: 计算平面与平面或点之间的距离。

Arguments:

  • other: 另一个平面或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

Description: 计算两平面的交线。

Arguments:

  • other: 另一个平面

Return: 两平面的交线

Source code
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

Description: 计算两平面的交线。

Arguments:

  • other: 另一个平面

Return: 两平面的交线

Source code
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

Description: 计算平面与直线的交点。

Arguments:

  • other: 不与平面平行或在平面上的直线

Return: 交点

Raises:

  • ValueError 平面与直线平行或重合
Source code
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

Description: 计算平面与直线的交点。

Arguments:

  • other: 不与平面平行或在平面上的直线

Return: 交点

Raises:

  • ValueError 平面与直线平行或重合
Source code
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -97,7 +97,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

Description: 计算平行于该平面且过指定点的平面。

Arguments:

  • point: 指定点

Return: 所求平面

Source code
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

Description: 计算平行于该平面且过指定点的平面。

Arguments:

  • point: 指定点

Return: 所求平面

Source code
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -105,7 +105,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

Description: 判断两个平面是否平行。

Arguments:

  • other: 另一个平面

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

Description: 判断两个平面是否平行。

Arguments:

  • other: 另一个平面

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -113,14 +113,14 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

Description: 平面的法向量。

Return: 法向量

Source code
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

Description: 平面的法向量。

Return: 法向量

Source code
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

Description: 工厂函数 由点和法向量构造平面(点法式构造)。

Arguments:

  • point: 平面上的一点
  • normal: 法向量

Return: 平面

Source code
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

Description: 工厂函数 由点和法向量构造平面(点法式构造)。

Arguments:

  • point: 平面上的一点
  • normal: 法向量

Return: 平面

Source code
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -132,7 +132,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

Description: 工厂函数 由三点构造平面。

Arguments:

  • p1: 点1
  • p2: 点2
  • p3: 点3

Return: 平面

Source code
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

Description: 工厂函数 由三点构造平面。

Arguments:

  • p1: 点1
  • p2: 点2
  • p3: 点3

Return: 平面

Source code
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

Description: 工厂函数 由两直线构造平面。

Arguments:

  • l1: 直线1
  • l2: 直线2

Return: 平面

Source code
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

Description: 工厂函数 由两直线构造平面。

Arguments:

  • l1: 直线1
  • l2: 直线2

Return: 平面

Source code
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -160,7 +160,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

Description: 工厂函数 由点和直线构造平面。

Arguments:

  • point: 面上一点
  • line: 面上直线,不包含点

Return: 平面

Source code
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

Description: 工厂函数 由点和直线构造平面。

Arguments:

  • point: 面上一点
  • line: 面上直线,不包含点

Return: 平面

Source code
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -170,11 +170,11 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

Source code
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

Source code
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

Source code
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

Source code
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

Description: 取两平面的交集(人话:交线)

Arguments:

  • other:

Return: 不平行平面的交线,平面平行返回None

Source code
python
def __and__(self, other):
+    ...

method __and__(self, other)

Description: 取两平面的交集(人话:交线)

Arguments:

  • other:

Return: 不平行平面的交线,平面平行返回None

Source code
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -191,6 +191,6 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

Source code
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
`,103),t=[h];function p(e,k,r,d,o,E){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

Source code
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)
`,105),h=[t];function p(e,k,r,d,o,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/en_api_mp_math_plane.md.DYLAU1Re.lean.js b/assets/en_api_mp_math_plane.md.DYLAU1Re.lean.js new file mode 100644 index 0000000..05541b4 --- /dev/null +++ b/assets/en_api_mp_math_plane.md.DYLAU1Re.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"en/api/mp_math/plane.md","filePath":"en/api/mp_math/plane.md"}'),l={name:"en/api/mp_math/plane.md"},t=n("",105),h=[t];function p(e,k,r,d,o,E){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/en_api_mp_math_point.md.DMig0FI1.lean.js b/assets/en_api_mp_math_point.md.DMig0FI1.lean.js deleted file mode 100644 index f995429..0000000 --- a/assets/en_api_mp_math_point.md.DMig0FI1.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},l=t("",34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/en_api_mp_math_point.md.DMig0FI1.js b/assets/en_api_mp_math_point.md.DYCVxK7m.js similarity index 84% rename from assets/en_api_mp_math_point.md.DMig0FI1.js rename to assets/en_api_mp_math_point.md.DYCVxK7m.js index 534c390..a487e6c 100644 --- a/assets/en_api_mp_math_point.md.DMig0FI1.js +++ b/assets/en_api_mp_math_point.md.DYCVxK7m.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},l=t(`

class Point3

method __init__(self, x: float, y: float, z: float)

Description: 笛卡尔坐标系中的点。

Arguments:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
Source code
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const c=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},h=t(`

mbcp.mp_math.point

Description: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

Description: 笛卡尔坐标系中的点。

Arguments:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
Source code
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

Description: 判断两个点是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

Description: 判断两个点是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -18,11 +18,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

Source code
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

Description: P + V -> P P + P -> P

Arguments:

  • other:
Source code
python
def __add__(self, other):
+    ...

method self + other

Description: P + V -> P P + P -> P

Arguments:

  • other:
Source code
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -30,14 +30,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

Description: 判断两个点是否相等。

Arguments:

  • other:
Source code
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

Description: 判断两个点是否相等。

Arguments:

  • other:
Source code
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

Description: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

Arguments:

  • other:
Source code
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

Description: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

Arguments:

  • other:
Source code
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -48,4 +48,4 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const y=s(n,[["render",e]]);export{c as __pageData,y as default}; diff --git a/assets/en_api_mp_math_point.md.DYCVxK7m.lean.js b/assets/en_api_mp_math_point.md.DYCVxK7m.lean.js new file mode 100644 index 0000000..932220b --- /dev/null +++ b/assets/en_api_mp_math_point.md.DYCVxK7m.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const c=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"en/api/mp_math/point.md","filePath":"en/api/mp_math/point.md"}'),n={name:"en/api/mp_math/point.md"},h=t("",36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const y=s(n,[["render",e]]);export{c as __pageData,y as default}; diff --git a/assets/en_api_mp_math_segment.md.CcaokAF8.js b/assets/en_api_mp_math_segment.md.CUQLS_qv.js similarity index 70% rename from assets/en_api_mp_math_segment.md.CcaokAF8.js rename to assets/en_api_mp_math_segment.md.CUQLS_qv.js index 9a9610c..2cbc331 100644 --- a/assets/en_api_mp_math_segment.md.CcaokAF8.js +++ b/assets/en_api_mp_math_segment.md.CUQLS_qv.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},h=n(`

class Segment3

method __init__(self, p1: Point3, p2: Point3)

Description: 三维空间中的线段。 :param p1: :param p2:

Source code
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},h=n(`

mbcp.mp_math.segment

Description: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

Description: 三维空间中的线段。 :param p1: :param p2:

Source code
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -11,4 +11,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,6),p=[h];function e(l,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{F as __pageData,y as default}; diff --git a/assets/en_api_mp_math_segment.md.CUQLS_qv.lean.js b/assets/en_api_mp_math_segment.md.CUQLS_qv.lean.js new file mode 100644 index 0000000..3159f59 --- /dev/null +++ b/assets/en_api_mp_math_segment.md.CUQLS_qv.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},h=n("",6),p=[h];function e(l,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",e]]);export{F as __pageData,y as default}; diff --git a/assets/en_api_mp_math_segment.md.CcaokAF8.lean.js b/assets/en_api_mp_math_segment.md.CcaokAF8.lean.js deleted file mode 100644 index 31daebf..0000000 --- a/assets/en_api_mp_math_segment.md.CcaokAF8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"en/api/mp_math/segment.md","filePath":"en/api/mp_math/segment.md"}'),t={name:"en/api/mp_math/segment.md"},h=n("",4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; diff --git a/assets/en_api_mp_math_utils.md.DZohqw2b.js b/assets/en_api_mp_math_utils.md.B4NFHkPz.js similarity index 65% rename from assets/en_api_mp_math_utils.md.DZohqw2b.js rename to assets/en_api_mp_math_utils.md.B4NFHkPz.js index 01cddac..26fde5b 100644 --- a/assets/en_api_mp_math_utils.md.DZohqw2b.js +++ b/assets/en_api_mp_math_utils.md.B4NFHkPz.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n(`

func clamp() -> float

Description: 区间限定函数

Arguments:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

Return: 限制后的值

Source code
python
def clamp(x: float, min_: float, max_: float) -> float:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n(`

mbcp.mp_math.utils

Description: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

Description: 区间限定函数

Arguments:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

Return: 限制后的值

Source code
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -9,7 +9,20 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

Description: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

Arguments:

  • x: 数1
  • y: 数2
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

Source code
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

Source code
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

Source code
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

Source code
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

Description: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

Arguments:

  • x: 数1
  • y: 数2
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -19,7 +32,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

Description: 获取数的符号。

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

Description: 获取数的符号。

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -32,7 +45,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

Description: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

Description: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -48,17 +61,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

Source code
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

Source code
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

Source code
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

Source code
python
def __ne__(self, other):
-    return not self.__eq__(other)
`,33),h=[l];function p(e,k,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return ''
`,35),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/en_api_mp_math_utils.md.DZohqw2b.lean.js b/assets/en_api_mp_math_utils.md.B4NFHkPz.lean.js similarity index 57% rename from assets/en_api_mp_math_utils.md.DZohqw2b.lean.js rename to assets/en_api_mp_math_utils.md.B4NFHkPz.lean.js index f7f1f3a..7d0c625 100644 --- a/assets/en_api_mp_math_utils.md.DZohqw2b.lean.js +++ b/assets/en_api_mp_math_utils.md.B4NFHkPz.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n("",33),h=[l];function p(e,k,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"en/api/mp_math/utils.md","filePath":"en/api/mp_math/utils.md"}'),t={name:"en/api/mp_math/utils.md"},l=n("",35),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/en_api_mp_math_vector.md.Sd_IZsgE.js b/assets/en_api_mp_math_vector.md.BJF5J3QY.js similarity index 90% rename from assets/en_api_mp_math_vector.md.Sd_IZsgE.js rename to assets/en_api_mp_math_vector.md.BJF5J3QY.js index 26709e7..548c77f 100644 --- a/assets/en_api_mp_math_vector.md.Sd_IZsgE.js +++ b/assets/en_api_mp_math_vector.md.BJF5J3QY.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},h=t(`

class Vector3

method __init__(self, x: float, y: float, z: float)

Description: 3维向量

Arguments:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
Source code
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},h=t(`

mbcp.mp_math.vector

Description: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

Description: 3维向量

Arguments:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
Source code
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

Description: 计算两个向量之间的夹角。

Arguments:

  • other: 另一个向量

Return: 夹角

Source code
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

Description: 计算两个向量之间的夹角。

Arguments:

  • other: 另一个向量

Return: 夹角

Source code
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

Description: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

Arguments:

  • other:

Return: 行列式的结果

Source code
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

Description: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

Arguments:

  • other:

Return: 行列式的结果

Source code
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似平行。

Arguments:

  • other: 另一个向量
  • epsilon: 允许的误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似平行。

Arguments:

  • other: 另一个向量
  • epsilon: 允许的误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

Description: 判断两个向量是否平行。

Arguments:

  • other: 另一个向量

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

Description: 判断两个向量是否平行。

Arguments:

  • other: 另一个向量

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

Description: 将向量归一化。

自体归一化,不返回值。

Source code
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

Description: 将向量归一化。

自体归一化,不返回值。

Source code
python
def normalize(self):
     """
         将向量归一化。
 
@@ -72,32 +72,32 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

Source code
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

Source code
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

Description: 向量的模。

Return: 模

Source code
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

Description: 向量的模。

Return: 模

Source code
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

Description: 获取该向量的单位向量。

Return: 单位向量

Source code
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

Description: 获取该向量的单位向量。

Return: 单位向量

Source code
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

Source code
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

Source code
python
@overload
+    return self / self.length

method __abs__(self)

Source code
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

Source code
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

Description: V + P -> P

V + V -> V

Arguments:

  • other:
Source code
python
def __add__(self, other):
+    ...

method self + other

Description: V + P -> P

V + V -> V

Arguments:

  • other:
Source code
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -112,7 +112,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

Description: 判断两个向量是否相等。

Arguments:

  • other:

Return: 是否相等

Source code
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

Description: 判断两个向量是否相等。

Arguments:

  • other:

Return: 是否相等

Source code
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -120,7 +120,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

Description: P + V -> P

别去点那边实现了。 :param other: :return:

Source code
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

Description: P + V -> P

别去点那边实现了。 :param other: :return:

Source code
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -128,11 +128,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

Source code
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

Source code
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

Source code
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

Description: V - P -> P

V - V -> V

Arguments:

  • other:
Source code
python
def __sub__(self, other):
+    ...

method self - other

Description: V - P -> P

V - V -> V

Arguments:

  • other:
Source code
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

Description: P - V -> P

Arguments:

  • other:
Source code
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

Description: P - V -> P

Arguments:

  • other:
Source code
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -157,11 +157,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

Source code
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

Source code
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

Source code
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

Source code
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

Description: 数组运算 非点乘。点乘使用@,叉乘使用cross。

Arguments:

  • other:
Source code
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

Description: 数组运算 非点乘。点乘使用@,叉乘使用cross。

Arguments:

  • other:
Source code
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -174,14 +174,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

Source code
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

Description: 点乘。

Arguments:

  • other:
Source code
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

Source code
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

Description: 点乘。

Arguments:

  • other:
Source code
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

Source code
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

Source code
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • Type: Vector3

  • Description: 零向量

var x_axis = Vector3(1, 0, 0)

  • Type: Vector3

  • Description: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • Type: Vector3

  • Description: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • Type: Vector3

  • Description: z轴单位向量

`,125),e=[h];function l(p,k,r,o,d,g){return a(),i("div",null,e)}const F=s(n,[["render",l]]);export{y as __pageData,F as default}; + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

Source code
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

Source code
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • Type: Vector3

  • Description: 零向量

var x_axis = Vector3(1, 0, 0)

  • Type: Vector3

  • Description: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • Type: Vector3

  • Description: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • Type: Vector3

  • Description: z轴单位向量

`,127),e=[h];function l(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(n,[["render",l]]);export{y as __pageData,c as default}; diff --git a/assets/en_api_mp_math_vector.md.BJF5J3QY.lean.js b/assets/en_api_mp_math_vector.md.BJF5J3QY.lean.js new file mode 100644 index 0000000..5db5c89 --- /dev/null +++ b/assets/en_api_mp_math_vector.md.BJF5J3QY.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},h=t("",127),e=[h];function l(p,k,r,o,d,g){return a(),i("div",null,e)}const c=s(n,[["render",l]]);export{y as __pageData,c as default}; diff --git a/assets/en_api_mp_math_vector.md.Sd_IZsgE.lean.js b/assets/en_api_mp_math_vector.md.Sd_IZsgE.lean.js deleted file mode 100644 index 6e6f85e..0000000 --- a/assets/en_api_mp_math_vector.md.Sd_IZsgE.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"en/api/mp_math/vector.md","filePath":"en/api/mp_math/vector.md"}'),n={name:"en/api/mp_math/vector.md"},h=t("",125),e=[h];function l(p,k,r,o,d,g){return a(),i("div",null,e)}const F=s(n,[["render",l]]);export{y as __pageData,F as default}; diff --git a/assets/en_api_particle_index.md.CmC1QX5o.js b/assets/en_api_particle_index.md.CmC1QX5o.js deleted file mode 100644 index 94f89ef..0000000 --- a/assets/en_api_particle_index.md.CmC1QX5o.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"en/api/particle/index.md","filePath":"en/api/particle/index.md"}'),i={name:"en/api/particle/index.md"};function r(c,n,p,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/en_api_particle_index.md.CmC1QX5o.lean.js b/assets/en_api_particle_index.md.CmC1QX5o.lean.js deleted file mode 100644 index 94f89ef..0000000 --- a/assets/en_api_particle_index.md.CmC1QX5o.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"en/api/particle/index.md","filePath":"en/api/particle/index.md"}'),i={name:"en/api/particle/index.md"};function r(c,n,p,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/en_api_particle_index.md.f-q0HsfK.js b/assets/en_api_particle_index.md.f-q0HsfK.js new file mode 100644 index 0000000..4374b9a --- /dev/null +++ b/assets/en_api_particle_index.md.f-q0HsfK.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"en/api/particle/index.md","filePath":"en/api/particle/index.md"}'),i={name:"en/api/particle/index.md"},n=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),p=e("p",null,[e("strong",null,"Description"),t(": 本模块定义了粒子生成相关的工具")],-1),o=[n,p];function s(l,d,_,m,h,f){return r(),c("div",null,o)}const u=a(i,[["render",s]]);export{b as __pageData,u as default}; diff --git a/assets/en_api_particle_index.md.f-q0HsfK.lean.js b/assets/en_api_particle_index.md.f-q0HsfK.lean.js new file mode 100644 index 0000000..4374b9a --- /dev/null +++ b/assets/en_api_particle_index.md.f-q0HsfK.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"en/api/particle/index.md","filePath":"en/api/particle/index.md"}'),i={name:"en/api/particle/index.md"},n=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),p=e("p",null,[e("strong",null,"Description"),t(": 本模块定义了粒子生成相关的工具")],-1),o=[n,p];function s(l,d,_,m,h,f){return r(),c("div",null,o)}const u=a(i,[["render",s]]);export{b as __pageData,u as default}; diff --git a/assets/en_api_presets_index.md.CAyxYhKI.js b/assets/en_api_presets_index.md.CAyxYhKI.js new file mode 100644 index 0000000..5e329e3 --- /dev/null +++ b/assets/en_api_presets_index.md.CAyxYhKI.js @@ -0,0 +1 @@ +import{_ as s,c as o,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"en/api/presets/index.md","filePath":"en/api/presets/index.md"}'),a={name:"en/api/presets/index.md"},n=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),c=[n,i,p];function l(d,m,_,h,u,f){return r(),o("div",null,c)}const x=s(a,[["render",l]]);export{b as __pageData,x as default}; diff --git a/assets/en_api_presets_index.md.CAyxYhKI.lean.js b/assets/en_api_presets_index.md.CAyxYhKI.lean.js new file mode 100644 index 0000000..5e329e3 --- /dev/null +++ b/assets/en_api_presets_index.md.CAyxYhKI.lean.js @@ -0,0 +1 @@ +import{_ as s,c as o,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"en/api/presets/index.md","filePath":"en/api/presets/index.md"}'),a={name:"en/api/presets/index.md"},n=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),c=[n,i,p];function l(d,m,_,h,u,f){return r(),o("div",null,c)}const x=s(a,[["render",l]]);export{b as __pageData,x as default}; diff --git a/assets/en_api_presets_index.md.CZ5hl_7D.js b/assets/en_api_presets_index.md.CZ5hl_7D.js deleted file mode 100644 index 920047e..0000000 --- a/assets/en_api_presets_index.md.CZ5hl_7D.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"en/api/presets/index.md","filePath":"en/api/presets/index.md"}'),a={name:"en/api/presets/index.md"};function r(n,p,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/en_api_presets_index.md.CZ5hl_7D.lean.js b/assets/en_api_presets_index.md.CZ5hl_7D.lean.js deleted file mode 100644 index 920047e..0000000 --- a/assets/en_api_presets_index.md.CZ5hl_7D.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"en/api/presets/index.md","filePath":"en/api/presets/index.md"}'),a={name:"en/api/presets/index.md"};function r(n,p,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/en_api_presets_model_index.md.Cs8vON2C.lean.js b/assets/en_api_presets_model_index.md.Cs8vON2C.lean.js deleted file mode 100644 index dcdc11c..0000000 --- a/assets/en_api_presets_model_index.md.Cs8vON2C.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n("",8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_presets_model_index.md.SQ5PPdaL.js b/assets/en_api_presets_model_index.md.DypEdCdE.js similarity index 76% rename from assets/zht_api_presets_model_index.md.SQ5PPdaL.js rename to assets/en_api_presets_model_index.md.DypEdCdE.js index dfc5749..3203498 100644 --- a/assets/zht_api_presets_model_index.md.SQ5PPdaL.js +++ b/assets/en_api_presets_model_index.md.DypEdCdE.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"zht/api/presets/model/index.md","filePath":"zht/api/presets/model/index.md"}'),t={name:"zht/api/presets/model/index.md"},h=n(`

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

變數説明:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源碼
python
@staticmethod
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n(`

mbcp.presets.model

Description: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

Return: List[Point3]: 球体上的点集。

Source code
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -15,4 +15,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(e,k,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_api_presets_model_index.md.DypEdCdE.lean.js b/assets/en_api_presets_model_index.md.DypEdCdE.lean.js new file mode 100644 index 0000000..b8472c9 --- /dev/null +++ b/assets/en_api_presets_model_index.md.DypEdCdE.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n("",10),l=[h];function p(e,k,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_guide_index.md.DrDHTYCZ.js b/assets/en_guide_index.md.DrDHTYCZ.js new file mode 100644 index 0000000..adc0101 --- /dev/null +++ b/assets/en_guide_index.md.DrDHTYCZ.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o('',1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/en_guide_index.md.DrDHTYCZ.lean.js b/assets/en_guide_index.md.DrDHTYCZ.lean.js new file mode 100644 index 0000000..333af5b --- /dev/null +++ b/assets/en_guide_index.md.DrDHTYCZ.lean.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"en/guide/index.md","filePath":"en/guide/index.md"}'),n={name:"en/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o("",1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/en_index.md.MCm69eyE.js b/assets/en_index.md.MCm69eyE.js new file mode 100644 index 0000000..7cea417 --- /dev/null +++ b/assets/en_index.md.MCm69eyE.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"A Library for Python to create particle effects and geometric figures","actions":[{"theme":"brand","text":"Get Started","link":"./guide/"},{"theme":"alt","text":"API Reference","link":"./api/"}]},"features":[{"title":"Easy to use","details":"Through a simple interface, most of the geometric operations and particle production requirements have been achieved"},{"title":"Integrated","details":"Encapsulated and integratednumpy, scipy and sympy, making script writing as simple as using Geogebra"},{"title":"Rich presets","details":"Rich presets and examples, you can use it directly, and you can also customize the parameters to create your own effects"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),i={name:"en/index.md"};function n(r,o,s,c,d,p){return a(),t("div")}const u=e(i,[["render",n]]);export{m as __pageData,u as default}; diff --git a/assets/en_index.md.MCm69eyE.lean.js b/assets/en_index.md.MCm69eyE.lean.js new file mode 100644 index 0000000..7cea417 --- /dev/null +++ b/assets/en_index.md.MCm69eyE.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"A Library for Python to create particle effects and geometric figures","actions":[{"theme":"brand","text":"Get Started","link":"./guide/"},{"theme":"alt","text":"API Reference","link":"./api/"}]},"features":[{"title":"Easy to use","details":"Through a simple interface, most of the geometric operations and particle production requirements have been achieved"},{"title":"Integrated","details":"Encapsulated and integratednumpy, scipy and sympy, making script writing as simple as using Geogebra"},{"title":"Rich presets","details":"Rich presets and examples, you can use it directly, and you can also customize the parameters to create your own effects"}]},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md"}'),i={name:"en/index.md"};function n(r,o,s,c,d,p){return a(),t("div")}const u=e(i,[["render",n]]);export{m as __pageData,u as default}; diff --git a/assets/guide_index.md.BE2yloik.js b/assets/guide_index.md.BE2yloik.js deleted file mode 100644 index b53aa86..0000000 --- a/assets/guide_index.md.BE2yloik.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as n,j as e,a as o}from"./chunks/framework.BV61Qrc0.js";const x=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),r={name:"guide/index.md"},s=e("h1",{id:"开始不了一点",tabindex:"-1"},[o("开始不了一点 "),e("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),d=[s];function i(c,_,l,p,h,m){return n(),t("div",null,d)}const u=a(r,[["render",i]]);export{x as __pageData,u as default}; diff --git a/assets/guide_index.md.BE2yloik.lean.js b/assets/guide_index.md.BE2yloik.lean.js deleted file mode 100644 index b53aa86..0000000 --- a/assets/guide_index.md.BE2yloik.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as n,j as e,a as o}from"./chunks/framework.BV61Qrc0.js";const x=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"guide/index.md"}'),r={name:"guide/index.md"},s=e("h1",{id:"开始不了一点",tabindex:"-1"},[o("开始不了一点 "),e("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),d=[s];function i(c,_,l,p,h,m){return n(),t("div",null,d)}const u=a(r,[["render",i]]);export{x as __pageData,u as default}; diff --git a/assets/guide_index.md.NVx3l2Cr.js b/assets/guide_index.md.NVx3l2Cr.js new file mode 100644 index 0000000..eaad12c --- /dev/null +++ b/assets/guide_index.md.NVx3l2Cr.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"zh/guide/index.md"}'),n={name:"guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o('',1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/guide_index.md.NVx3l2Cr.lean.js b/assets/guide_index.md.NVx3l2Cr.lean.js new file mode 100644 index 0000000..77a8e3e --- /dev/null +++ b/assets/guide_index.md.NVx3l2Cr.lean.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"guide/index.md","filePath":"zh/guide/index.md"}'),n={name:"guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o("",1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/index.md.BE1qChTt.js b/assets/index.md.BE1qChTt.js deleted file mode 100644 index 27ccc20..0000000 --- a/assets/index.md.BE1qChTt.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用于几何运算和粒子制作的库","actions":[{"theme":"brand","text":"快速开始","link":"guide/"},{"theme":"alt","text":"API文档","link":"api/"}]},"features":[{"title":"高可用性","details":"通过简单的接口,实现了大部分几何运算和粒子制作的需求"},{"title":"高集成度","details":"对numpyscipysumpy进行了封装和集成,使脚本编写像使用Geogebra一样简单"},{"title":"内置预设","details":"提供了大量的预设,包括常见的几何图形、粒子效果等,方便快速制作"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),o={name:"index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/index.md.BE1qChTt.lean.js b/assets/index.md.BE1qChTt.lean.js deleted file mode 100644 index 27ccc20..0000000 --- a/assets/index.md.BE1qChTt.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用于几何运算和粒子制作的库","actions":[{"theme":"brand","text":"快速开始","link":"guide/"},{"theme":"alt","text":"API文档","link":"api/"}]},"features":[{"title":"高可用性","details":"通过简单的接口,实现了大部分几何运算和粒子制作的需求"},{"title":"高集成度","details":"对numpyscipysumpy进行了封装和集成,使脚本编写像使用Geogebra一样简单"},{"title":"内置预设","details":"提供了大量的预设,包括常见的几何图形、粒子效果等,方便快速制作"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),o={name:"index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/index.md.BjJ9-kbE.js b/assets/index.md.BjJ9-kbE.js new file mode 100644 index 0000000..95ca389 --- /dev/null +++ b/assets/index.md.BjJ9-kbE.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用于几何运算和粒子制作的库","actions":[{"theme":"brand","text":"快速开始","link":"./guide/"},{"theme":"alt","text":"API文档","link":"./api/"}]},"features":[{"title":"高可用性","details":"通过简单的接口,实现了大部分几何运算和粒子制作的需求"},{"title":"高集成度","details":"对numpyscipysumpy进行了封装和集成,使脚本编写像使用Geogebra一样简单"},{"title":"内置预设","details":"提供了大量的预设,包括常见的几何图形、粒子效果等,方便快速制作"}]},"headers":[],"relativePath":"index.md","filePath":"zh/index.md"}'),o={name:"index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/index.md.BjJ9-kbE.lean.js b/assets/index.md.BjJ9-kbE.lean.js new file mode 100644 index 0000000..95ca389 --- /dev/null +++ b/assets/index.md.BjJ9-kbE.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用于几何运算和粒子制作的库","actions":[{"theme":"brand","text":"快速开始","link":"./guide/"},{"theme":"alt","text":"API文档","link":"./api/"}]},"features":[{"title":"高可用性","details":"通过简单的接口,实现了大部分几何运算和粒子制作的需求"},{"title":"高集成度","details":"对numpyscipysumpy进行了封装和集成,使脚本编写像使用Geogebra一样简单"},{"title":"内置预设","details":"提供了大量的预设,包括常见的几何图形、粒子效果等,方便快速制作"}]},"headers":[],"relativePath":"index.md","filePath":"zh/index.md"}'),o={name:"index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/ja_api_index.md.4BnflFIm.js b/assets/ja_api_index.md.4BnflFIm.js deleted file mode 100644 index 2f8ab8e..0000000 --- a/assets/ja_api_index.md.4BnflFIm.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),n={name:"ja/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/ja_api_index.md.4BnflFIm.lean.js b/assets/ja_api_index.md.4BnflFIm.lean.js deleted file mode 100644 index 2f8ab8e..0000000 --- a/assets/ja_api_index.md.4BnflFIm.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),n={name:"ja/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/ja_api_index.md.DW7hb-YH.js b/assets/ja_api_index.md.DW7hb-YH.js new file mode 100644 index 0000000..723a176 --- /dev/null +++ b/assets/ja_api_index.md.DW7hb-YH.js @@ -0,0 +1 @@ +import{_ as t,c,o as n,j as e,a}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),o={name:"ja/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=t(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/ja_api_index.md.DW7hb-YH.lean.js b/assets/ja_api_index.md.DW7hb-YH.lean.js new file mode 100644 index 0000000..723a176 --- /dev/null +++ b/assets/ja_api_index.md.DW7hb-YH.lean.js @@ -0,0 +1 @@ +import{_ as t,c,o as n,j as e,a}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"ja/api/index.md","filePath":"ja/api/index.md"}'),o={name:"ja/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=t(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/ja_api_mp_math_angle.md.DL9J6RE2.js b/assets/ja_api_mp_math_angle.md.Cac0Crec.js similarity index 87% rename from assets/ja_api_mp_math_angle.md.DL9J6RE2.js rename to assets/ja_api_mp_math_angle.md.Cac0Crec.js index bc97db1..2896cad 100644 --- a/assets/ja_api_mp_math_angle.md.DL9J6RE2.js +++ b/assets/ja_api_mp_math_angle.md.Cac0Crec.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n(`

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

引数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
ソースコード
python
def __init__(self, value: float, is_radian: bool=False):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n(`

mbcp.mp_math.angle

説明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

引数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
ソースコード
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -8,92 +8,92 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

戻り値: 余角

ソースコード
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

戻り値: 余角

ソースコード
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

戻り値: 补角

ソースコード
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

戻り値: 补角

ソースコード
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

戻り値: 弧度

ソースコード
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

戻り値: 弧度

ソースコード
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

戻り値: 最小正角度

ソースコード
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

戻り値: 最小正角度

ソースコード
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

戻り値: 最大负角度

ソースコード
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

戻り値: 最大负角度

ソースコード
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

戻り値: 正弦值

ソースコード
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

戻り値: 正弦值

ソースコード
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

戻り値: 余弦值

ソースコード
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

戻り値: 余弦值

ソースコード
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

戻り値: 正切值

ソースコード
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

戻り値: 正切值

ソースコード
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

戻り値: 余切值

ソースコード
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

戻り値: 余切值

ソースコード
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

戻り値: 正割值

ソースコード
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

戻り値: 正割值

ソースコード
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

戻り値: 余割值

ソースコード
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

戻り値: 余割值

ソースコード
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

ソースコード
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

ソースコード
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

ソースコード
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

ソースコード
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

ソースコード
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

ソースコード
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

ソースコード
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

ソースコード
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

ソースコード
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

ソースコード
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

ソースコード
python
def __truediv__(self, other):
+    ...

method self / other

ソースコード
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
`,78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; + return AnyAngle(self.radian / other, is_radian=True)
`,80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/ja_api_mp_math_angle.md.DL9J6RE2.lean.js b/assets/ja_api_mp_math_angle.md.Cac0Crec.lean.js similarity index 57% rename from assets/ja_api_mp_math_angle.md.DL9J6RE2.lean.js rename to assets/ja_api_mp_math_angle.md.Cac0Crec.lean.js index 0985b57..a464f33 100644 --- a/assets/ja_api_mp_math_angle.md.DL9J6RE2.lean.js +++ b/assets/ja_api_mp_math_angle.md.Cac0Crec.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n("",78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"ja/api/mp_math/angle.md","filePath":"ja/api/mp_math/angle.md"}'),t={name:"ja/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/ja_api_mp_math_const.md.ClLsNkM_.js b/assets/ja_api_mp_math_const.md.ClLsNkM_.js new file mode 100644 index 0000000..f0ddcc5 --- /dev/null +++ b/assets/ja_api_mp_math_const.md.ClLsNkM_.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},c=o('

mbcp.mp_math.const

説明: 本模块定义了一些常用的常量

var PI = math.pi

  • 説明: 常量 π

var E = math.e

  • 説明: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • 説明: 黄金分割比

var GAMMA = 0.5772156649015329

  • 説明: 欧拉常数

var EPSILON = 0.0001

  • 説明: 精度误差

var APPROX = 0.001

  • 説明: 约等于判定误差
',14),i=[c];function n(l,s,h,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/ja_api_mp_math_const.md.ClLsNkM_.lean.js b/assets/ja_api_mp_math_const.md.ClLsNkM_.lean.js new file mode 100644 index 0000000..3c5cbf7 --- /dev/null +++ b/assets/ja_api_mp_math_const.md.ClLsNkM_.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},c=o("",14),i=[c];function n(l,s,h,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/ja_api_mp_math_const.md.CyaIJkFx.js b/assets/ja_api_mp_math_const.md.CyaIJkFx.js deleted file mode 100644 index 9af4692..0000000 --- a/assets/ja_api_mp_math_const.md.CyaIJkFx.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

  • 説明: ε

var APPROX = 0.001

  • 説明: 约等于误差
',4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js b/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js deleted file mode 100644 index 50ff41e..0000000 --- a/assets/ja_api_mp_math_const.md.CyaIJkFx.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"ja/api/mp_math/const.md","filePath":"ja/api/mp_math/const.md"}'),r={name:"ja/api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,d){return e(),t("div",null,n)}const P=a(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/zht_api_mp_math_equation.md.CtFwMbbV.js b/assets/ja_api_mp_math_equation.md.8i-WXc7A.js similarity index 70% rename from assets/zht_api_mp_math_equation.md.CtFwMbbV.js rename to assets/ja_api_mp_math_equation.md.8i-WXc7A.js index 968d760..d73b6c3 100644 --- a/assets/zht_api_mp_math_equation.md.CtFwMbbV.js +++ b/assets/ja_api_mp_math_equation.md.8i-WXc7A.js @@ -1,4 +1,26 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

變數説明:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

抛出:

  • ValueError 无效变量类型
源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n(`

mbcp.mp_math.equation

説明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

引数:

  • *t:
  • 参数:

戻り値: 目标点

ソースコード
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

引数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

戻り値: 偏导函数

例外:

  • ValueError 无效变量类型
ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -40,7 +62,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

變數説明:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源碼
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

引数:

  • func: 函数
  • *args: 参数

戻り値: 柯里化后的函数

ソースコード
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -55,26 +77,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

變數説明:

  • *t:
  • 参数:
源碼
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; + return curried_func
`,30),p=[t];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(l,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_equation.md.8i-WXc7A.lean.js b/assets/ja_api_mp_math_equation.md.8i-WXc7A.lean.js new file mode 100644 index 0000000..c140908 --- /dev/null +++ b/assets/ja_api_mp_math_equation.md.8i-WXc7A.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n("",30),p=[t];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(l,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_equation.md.DvgEtgmw.lean.js b/assets/ja_api_mp_math_equation.md.DvgEtgmw.lean.js deleted file mode 100644 index b4603c7..0000000 --- a/assets/ja_api_mp_math_equation.md.DvgEtgmw.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n("",27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; diff --git a/assets/ja_api_mp_math_function.md.GLsPZWha.js b/assets/ja_api_mp_math_function.md.GLsPZWha.js new file mode 100644 index 0000000..fda7939 --- /dev/null +++ b/assets/ja_api_mp_math_function.md.GLsPZWha.js @@ -0,0 +1,17 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"ja/api/mp_math/function.md","filePath":"ja/api/mp_math/function.md"}'),n={name:"ja/api/mp_math/function.md"},l=a('

mbcp.mp_math.function

説明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

説明: 计算三元函数在某点的梯度向量。

',4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a('',1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a('',1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a('',1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a(`

引数:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

戻り値: 梯度

ソースコード
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\\\nabla f(x_0, y_0, z_0) = \\\\left(\\\\frac{\\\\partial f}{\\\\partial x}, \\\\frac{\\\\partial f}{\\\\partial y}, \\\\frac{\\\\partial f}{\\\\partial z}\\\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)
`,4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/ja_api_mp_math_function.md.GLsPZWha.lean.js b/assets/ja_api_mp_math_function.md.GLsPZWha.lean.js new file mode 100644 index 0000000..ac13516 --- /dev/null +++ b/assets/ja_api_mp_math_function.md.GLsPZWha.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"ja/api/mp_math/function.md","filePath":"ja/api/mp_math/function.md"}'),n={name:"ja/api/mp_math/function.md"},l=a("",4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a("",1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a("",1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a("",4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/ja_api_mp_math_index.md.BBAQ-AOT.js b/assets/ja_api_mp_math_index.md.BBAQ-AOT.js new file mode 100644 index 0000000..f2ad3b5 --- /dev/null +++ b/assets/ja_api_mp_math_index.md.BBAQ-AOT.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"ja/api/mp_math/index.md","filePath":"ja/api/mp_math/index.md"}'),c={name:"ja/api/mp_math/index.md"},i=o('

mbcp.mp_math

説明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/ja_api_mp_math_index.md.BBAQ-AOT.lean.js b/assets/ja_api_mp_math_index.md.BBAQ-AOT.lean.js new file mode 100644 index 0000000..78f24b8 --- /dev/null +++ b/assets/ja_api_mp_math_index.md.BBAQ-AOT.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"ja/api/mp_math/index.md","filePath":"ja/api/mp_math/index.md"}'),c={name:"ja/api/mp_math/index.md"},i=o("",3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/ja_api_mp_math_index.md.CSAMHYsB.js b/assets/ja_api_mp_math_index.md.CSAMHYsB.js deleted file mode 100644 index dfaa4b1..0000000 --- a/assets/ja_api_mp_math_index.md.CSAMHYsB.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"ja/api/mp_math/index.md","filePath":"ja/api/mp_math/index.md"}'),m={name:"ja/api/mp_math/index.md"};function p(n,i,r,c,o,s){return e(),a("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/ja_api_mp_math_index.md.CSAMHYsB.lean.js b/assets/ja_api_mp_math_index.md.CSAMHYsB.lean.js deleted file mode 100644 index dfaa4b1..0000000 --- a/assets/ja_api_mp_math_index.md.CSAMHYsB.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"ja/api/mp_math/index.md","filePath":"ja/api/mp_math/index.md"}'),m={name:"ja/api/mp_math/index.md"};function p(n,i,r,c,o,s){return e(),a("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/ja_api_mp_math_line.md.fj-_s5Ug.js b/assets/ja_api_mp_math_line.md.BwZJXqnL.js similarity index 93% rename from assets/ja_api_mp_math_line.md.fj-_s5Ug.js rename to assets/ja_api_mp_math_line.md.BwZJXqnL.js index 7694534..ba2bb95 100644 --- a/assets/ja_api_mp_math_line.md.fj-_s5Ug.js +++ b/assets/ja_api_mp_math_line.md.BwZJXqnL.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n(`

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

引数:

  • point: 直线上的一点
  • direction: 直线的方向向量
ソースコード
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n(`

mbcp.mp_math.line

説明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

引数:

  • point: 直线上的一点
  • direction: 直线的方向向量
ソースコード
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

引数:

  • other: 另一条直线

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

引数:

  • other: 另一条直线

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -25,7 +25,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

引数:

  • other: 平行直线或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

引数:

  • other: 平行直线或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -48,7 +48,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

引数:

  • other: 另一条直线

戻り値: 交点

例外:

  • ValueError 直线平行
  • ValueError 直线不共面
ソースコード
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

引数:

  • other: 另一条直线

戻り値: 交点

例外:

  • ValueError 直线平行
  • ValueError 直线不共面
ソースコード
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

引数:

  • point: 指定点

戻り値: 垂线

ソースコード
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

引数:

  • point: 指定点

戻り値: 垂线

ソースコード
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -71,7 +71,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

引数:

  • t: 参数t

戻り値: 点

ソースコード
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

引数:

  • t: 参数t

戻り値: 点

ソースコード
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -79,13 +79,13 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

戻り値: x(t), y(t), z(t)

ソースコード
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

戻り値: x(t), y(t), z(t)

ソースコード
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -94,7 +94,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

引数:

  • other: 另一条直线

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

引数:

  • other: 另一条直线

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -102,7 +102,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

引数:

  • other: 另一条直线

戻り値: 是否共线

ソースコード
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

引数:

  • other: 另一条直线

戻り値: 是否共线

ソースコード
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -110,7 +110,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

引数:

  • point: 点

戻り値: 是否在直线上

ソースコード
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

引数:

  • point: 点

戻り値: 是否在直线上

ソースコード
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -118,7 +118,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

引数:

  • other: 另一条直线

戻り値: 是否共面

ソースコード
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

引数:

  • other: 另一条直线

戻り値: 是否共面

ソースコード
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -127,7 +127,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

ソースコード
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

ソースコード
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -140,7 +140,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

引数:

  • p1: 点1
  • p2: 点2

戻り値: 直线

ソースコード
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

引数:

  • p1: 点1
  • p2: 点2

戻り値: 直线

ソースコード
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -151,7 +151,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

引数:

  • other: 另一条直线

戻り値: 交点

ソースコード
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

引数:

  • other: 另一条直线

戻り値: 交点

ソースコード
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -164,7 +164,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

引数:

  • other:
ソースコード
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

引数:

  • other:
ソースコード
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -175,4 +175,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_line.md.fj-_s5Ug.lean.js b/assets/ja_api_mp_math_line.md.BwZJXqnL.lean.js similarity index 56% rename from assets/ja_api_mp_math_line.md.fj-_s5Ug.lean.js rename to assets/ja_api_mp_math_line.md.BwZJXqnL.lean.js index f7adf8e..6bbd2a1 100644 --- a/assets/ja_api_mp_math_line.md.fj-_s5Ug.lean.js +++ b/assets/ja_api_mp_math_line.md.BwZJXqnL.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n("",105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"ja/api/mp_math/line.md","filePath":"ja/api/mp_math/line.md"}'),t={name:"ja/api/mp_math/line.md"},l=n("",107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js deleted file mode 100644 index d1e13d1..0000000 --- a/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js b/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js deleted file mode 100644 index 3825ba5..0000000 --- a/assets/ja_api_mp_math_mp_math_typing.md.Bl5kyhpI.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.js b/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.js new file mode 100644 index 0000000..db53e8b --- /dev/null +++ b/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l('

mbcp.mp_math.mp_math_typing

説明: 本模块用于内部类型提示

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

',36),i=[o];function c(t,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.lean.js b/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.lean.js new file mode 100644 index 0000000..e0e58fd --- /dev/null +++ b/assets/ja_api_mp_math_mp_math_typing.md.DHbmIzMT.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"ja/api/mp_math/mp_math_typing.md","filePath":"ja/api/mp_math/mp_math_typing.md"}'),n={name:"ja/api/mp_math/mp_math_typing.md"},o=l("",36),i=[o];function c(t,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",c]]);export{h as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_plane.md.yLekgCvK.js b/assets/ja_api_mp_math_plane.md.Ck5Q7igW.js similarity index 93% rename from assets/ja_api_mp_math_plane.md.yLekgCvK.js rename to assets/ja_api_mp_math_plane.md.Ck5Q7igW.js index 8f6ea20..316ca90 100644 --- a/assets/ja_api_mp_math_plane.md.yLekgCvK.js +++ b/assets/ja_api_mp_math_plane.md.Ck5Q7igW.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},h=n(`

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

引数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
ソースコード
python
def __init__(self, a: float, b: float, c: float, d: float):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},h=n(`

mbcp.mp_math.plane

説明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

引数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
ソースコード
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

引数:

  • other: 另一个平面

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

引数:

  • other: 另一个平面

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

引数:

  • other: 另一个平面

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

引数:

  • other: 另一个平面

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

引数:

  • other: 另一个平面或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

引数:

  • other: 另一个平面或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

引数:

  • other: 另一个平面

戻り値: 两平面的交线

ソースコード
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

引数:

  • other: 另一个平面

戻り値: 两平面的交线

ソースコード
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

引数:

  • other: 不与平面平行或在平面上的直线

戻り値: 交点

例外:

  • ValueError 平面与直线平行或重合
ソースコード
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

引数:

  • other: 不与平面平行或在平面上的直线

戻り値: 交点

例外:

  • ValueError 平面与直线平行或重合
ソースコード
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -97,7 +97,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

引数:

  • point: 指定点

戻り値: 所求平面

ソースコード
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

引数:

  • point: 指定点

戻り値: 所求平面

ソースコード
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -105,7 +105,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

引数:

  • other: 另一个平面

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

引数:

  • other: 另一个平面

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -113,14 +113,14 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

戻り値: 法向量

ソースコード
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

戻り値: 法向量

ソースコード
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

引数:

  • point: 平面上的一点
  • normal: 法向量

戻り値: 平面

ソースコード
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

引数:

  • point: 平面上的一点
  • normal: 法向量

戻り値: 平面

ソースコード
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -132,7 +132,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

引数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

戻り値: 平面

ソースコード
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

引数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

戻り値: 平面

ソースコード
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

引数:

  • l1: 直线1
  • l2: 直线2

戻り値: 平面

ソースコード
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

引数:

  • l1: 直线1
  • l2: 直线2

戻り値: 平面

ソースコード
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -160,7 +160,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

引数:

  • point: 面上一点
  • line: 面上直线,不包含点

戻り値: 平面

ソースコード
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

引数:

  • point: 面上一点
  • line: 面上直线,不包含点

戻り値: 平面

ソースコード
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -170,11 +170,11 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

ソースコード
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

ソースコード
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

ソースコード
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

ソースコード
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

引数:

  • other:

戻り値: 不平行平面的交线,平面平行返回None

ソースコード
python
def __and__(self, other):
+    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

引数:

  • other:

戻り値: 不平行平面的交线,平面平行返回None

ソースコード
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -191,6 +191,6 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

ソースコード
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
`,103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

ソースコード
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)
`,105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_plane.md.yLekgCvK.lean.js b/assets/ja_api_mp_math_plane.md.Ck5Q7igW.lean.js similarity index 57% rename from assets/ja_api_mp_math_plane.md.yLekgCvK.lean.js rename to assets/ja_api_mp_math_plane.md.Ck5Q7igW.lean.js index f33e85f..4956280 100644 --- a/assets/ja_api_mp_math_plane.md.yLekgCvK.lean.js +++ b/assets/ja_api_mp_math_plane.md.Ck5Q7igW.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},h=n("",103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"ja/api/mp_math/plane.md","filePath":"ja/api/mp_math/plane.md"}'),l={name:"ja/api/mp_math/plane.md"},h=n("",105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_point.md.CpHHrSk8.js b/assets/ja_api_mp_math_point.md.CbFZXfAJ.js similarity index 84% rename from assets/ja_api_mp_math_point.md.CpHHrSk8.js rename to assets/ja_api_mp_math_point.md.CbFZXfAJ.js index 8348b94..1fcf4c6 100644 --- a/assets/ja_api_mp_math_point.md.CpHHrSk8.js +++ b/assets/ja_api_mp_math_point.md.CbFZXfAJ.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t(`

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

引数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
ソースコード
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},h=t(`

mbcp.mp_math.point

説明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

引数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
ソースコード
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -18,11 +18,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

ソースコード
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: P + V -> P P + P -> P

引数:

  • other:
ソースコード
python
def __add__(self, other):
+    ...

method self + other

説明: P + V -> P P + P -> P

引数:

  • other:
ソースコード
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -30,14 +30,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

引数:

  • other:
ソースコード
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

引数:

  • other:
ソースコード
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

引数:

  • other:
ソースコード
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

引数:

  • other:
ソースコード
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -48,4 +48,4 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_point.md.CbFZXfAJ.lean.js b/assets/ja_api_mp_math_point.md.CbFZXfAJ.lean.js new file mode 100644 index 0000000..6a96b8b --- /dev/null +++ b/assets/ja_api_mp_math_point.md.CbFZXfAJ.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},h=t("",36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_point.md.CpHHrSk8.lean.js b/assets/ja_api_mp_math_point.md.CpHHrSk8.lean.js deleted file mode 100644 index 735a512..0000000 --- a/assets/ja_api_mp_math_point.md.CpHHrSk8.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"ja/api/mp_math/point.md","filePath":"ja/api/mp_math/point.md"}'),n={name:"ja/api/mp_math/point.md"},l=t("",34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_segment.md.CB1_z-rn.lean.js b/assets/ja_api_mp_math_segment.md.CB1_z-rn.lean.js deleted file mode 100644 index 72f6bf5..0000000 --- a/assets/ja_api_mp_math_segment.md.CB1_z-rn.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},h=n("",4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_segment.md.CB1_z-rn.js b/assets/ja_api_mp_math_segment.md.DbTMeZAn.js similarity index 70% rename from assets/ja_api_mp_math_segment.md.CB1_z-rn.js rename to assets/ja_api_mp_math_segment.md.DbTMeZAn.js index c807dfc..baa0841 100644 --- a/assets/ja_api_mp_math_segment.md.CB1_z-rn.js +++ b/assets/ja_api_mp_math_segment.md.DbTMeZAn.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},h=n(`

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

ソースコード
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},h=n(`

mbcp.mp_math.segment

説明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

ソースコード
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -11,4 +11,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_segment.md.DbTMeZAn.lean.js b/assets/ja_api_mp_math_segment.md.DbTMeZAn.lean.js new file mode 100644 index 0000000..836de36 --- /dev/null +++ b/assets/ja_api_mp_math_segment.md.DbTMeZAn.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"ja/api/mp_math/segment.md","filePath":"ja/api/mp_math/segment.md"}'),t={name:"ja/api/mp_math/segment.md"},h=n("",6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_utils.md.BrfEEfl-.lean.js b/assets/ja_api_mp_math_utils.md.BrfEEfl-.lean.js deleted file mode 100644 index b58e91e..0000000 --- a/assets/ja_api_mp_math_utils.md.BrfEEfl-.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),t={name:"ja/api/mp_math/utils.md"},l=n("",33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_utils.md.BrfEEfl-.js b/assets/ja_api_mp_math_utils.md.D2dcQ_ET.js similarity index 67% rename from assets/ja_api_mp_math_utils.md.BrfEEfl-.js rename to assets/ja_api_mp_math_utils.md.D2dcQ_ET.js index 6ab1432..3818bba 100644 --- a/assets/ja_api_mp_math_utils.md.BrfEEfl-.js +++ b/assets/ja_api_mp_math_utils.md.D2dcQ_ET.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),t={name:"ja/api/mp_math/utils.md"},l=n(`

func clamp() -> float

説明: 区间限定函数

引数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),l={name:"ja/api/mp_math/utils.md"},t=n(`

mbcp.mp_math.utils

説明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

説明: 区间限定函数

引数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -9,7 +9,20 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

引数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

ソースコード
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

ソースコード
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

ソースコード
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

引数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -19,7 +32,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

説明: 获取数的符号。

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

説明: 获取数的符号。

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -32,7 +45,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -48,17 +61,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

ソースコード
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

ソースコード
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

ソースコード
python
def __ne__(self, other):
-    return not self.__eq__(other)
`,33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return ''
`,35),h=[t];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_utils.md.D2dcQ_ET.lean.js b/assets/ja_api_mp_math_utils.md.D2dcQ_ET.lean.js new file mode 100644 index 0000000..07e14e6 --- /dev/null +++ b/assets/ja_api_mp_math_utils.md.D2dcQ_ET.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"ja/api/mp_math/utils.md","filePath":"ja/api/mp_math/utils.md"}'),l={name:"ja/api/mp_math/utils.md"},t=n("",35),h=[t];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(l,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_vector.md.p54TKACE.js b/assets/ja_api_mp_math_vector.md.DBPPUIlc.js similarity index 90% rename from assets/ja_api_mp_math_vector.md.p54TKACE.js rename to assets/ja_api_mp_math_vector.md.DBPPUIlc.js index 9e30d60..c78ed79 100644 --- a/assets/ja_api_mp_math_vector.md.p54TKACE.js +++ b/assets/ja_api_mp_math_vector.md.DBPPUIlc.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},h=t(`

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

引数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
ソースコード
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},h=t(`

mbcp.mp_math.vector

説明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

引数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
ソースコード
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

引数:

  • other: 另一个向量

戻り値: 夹角

ソースコード
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

引数:

  • other: 另一个向量

戻り値: 夹角

ソースコード
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

引数:

  • other:

戻り値: 行列式的结果

ソースコード
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

引数:

  • other:

戻り値: 行列式的结果

ソースコード
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

引数:

  • other: 另一个向量
  • epsilon: 允许的误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

引数:

  • other: 另一个向量
  • epsilon: 允许的误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

引数:

  • other: 另一个向量

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

引数:

  • other: 另一个向量

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

ソースコード
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

ソースコード
python
def normalize(self):
     """
         将向量归一化。
 
@@ -72,32 +72,32 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

ソースコード
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

ソースコード
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

戻り値: 模

ソースコード
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

戻り値: 模

ソースコード
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

戻り値: 单位向量

ソースコード
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

戻り値: 单位向量

ソースコード
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

ソースコード
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

ソースコード
python
@overload
+    return self / self.length

method __abs__(self)

ソースコード
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

ソースコード
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: V + P -> P

V + V -> V

引数:

  • other:
ソースコード
python
def __add__(self, other):
+    ...

method self + other

説明: V + P -> P

V + V -> V

引数:

  • other:
ソースコード
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -112,7 +112,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

引数:

  • other:

戻り値: 是否相等

ソースコード
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

引数:

  • other:

戻り値: 是否相等

ソースコード
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -120,7 +120,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

ソースコード
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

ソースコード
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -128,11 +128,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

ソースコード
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

ソースコード
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

ソースコード
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

説明: V - P -> P

V - V -> V

引数:

  • other:
ソースコード
python
def __sub__(self, other):
+    ...

method self - other

説明: V - P -> P

V - V -> V

引数:

  • other:
ソースコード
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

引数:

  • other:
ソースコード
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

引数:

  • other:
ソースコード
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -157,11 +157,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

ソースコード
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

ソースコード
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

ソースコード
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

ソースコード
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

引数:

  • other:
ソースコード
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

引数:

  • other:
ソースコード
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -174,14 +174,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

ソースコード
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

引数:

  • other:
ソースコード
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

ソースコード
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

引数:

  • other:
ソースコード
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

ソースコード
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • タイプ: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • タイプ: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • タイプ: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • タイプ: Vector3

  • 説明: z轴单位向量

`,125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

ソースコード
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • タイプ: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • タイプ: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • タイプ: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • タイプ: Vector3

  • 説明: z轴单位向量

`,127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_mp_math_vector.md.p54TKACE.lean.js b/assets/ja_api_mp_math_vector.md.DBPPUIlc.lean.js similarity index 57% rename from assets/ja_api_mp_math_vector.md.p54TKACE.lean.js rename to assets/ja_api_mp_math_vector.md.DBPPUIlc.lean.js index 78815d4..ce21ff2 100644 --- a/assets/ja_api_mp_math_vector.md.p54TKACE.lean.js +++ b/assets/ja_api_mp_math_vector.md.DBPPUIlc.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},h=t("",125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"ja/api/mp_math/vector.md","filePath":"ja/api/mp_math/vector.md"}'),n={name:"ja/api/mp_math/vector.md"},h=t("",127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_particle_index.md.C9QFJ8EN.js b/assets/ja_api_particle_index.md.C9QFJ8EN.js new file mode 100644 index 0000000..3f75fc5 --- /dev/null +++ b/assets/ja_api_particle_index.md.C9QFJ8EN.js @@ -0,0 +1 @@ +import{_ as t,c,o as r,j as e,a}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"ja/api/particle/index.md","filePath":"ja/api/particle/index.md"}'),i={name:"ja/api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[a("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),a(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=t(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/ja_api_particle_index.md.C9QFJ8EN.lean.js b/assets/ja_api_particle_index.md.C9QFJ8EN.lean.js new file mode 100644 index 0000000..3f75fc5 --- /dev/null +++ b/assets/ja_api_particle_index.md.C9QFJ8EN.lean.js @@ -0,0 +1 @@ +import{_ as t,c,o as r,j as e,a}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"ja/api/particle/index.md","filePath":"ja/api/particle/index.md"}'),i={name:"ja/api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[a("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),a(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=t(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/ja_api_particle_index.md.E2YnH7EN.js b/assets/ja_api_particle_index.md.E2YnH7EN.js deleted file mode 100644 index e479d57..0000000 --- a/assets/ja_api_particle_index.md.E2YnH7EN.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"ja/api/particle/index.md","filePath":"ja/api/particle/index.md"}'),i={name:"ja/api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/ja_api_particle_index.md.E2YnH7EN.lean.js b/assets/ja_api_particle_index.md.E2YnH7EN.lean.js deleted file mode 100644 index e479d57..0000000 --- a/assets/ja_api_particle_index.md.E2YnH7EN.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"ja/api/particle/index.md","filePath":"ja/api/particle/index.md"}'),i={name:"ja/api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/ja_api_presets_index.md.ATGcHt9d.js b/assets/ja_api_presets_index.md.ATGcHt9d.js deleted file mode 100644 index ae5922f..0000000 --- a/assets/ja_api_presets_index.md.ATGcHt9d.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"ja/api/presets/index.md","filePath":"ja/api/presets/index.md"}'),s={name:"ja/api/presets/index.md"};function r(p,n,i,c,o,d){return a(),t("div")}const f=e(s,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/ja_api_presets_index.md.ATGcHt9d.lean.js b/assets/ja_api_presets_index.md.ATGcHt9d.lean.js deleted file mode 100644 index ae5922f..0000000 --- a/assets/ja_api_presets_index.md.ATGcHt9d.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"ja/api/presets/index.md","filePath":"ja/api/presets/index.md"}'),s={name:"ja/api/presets/index.md"};function r(p,n,i,c,o,d){return a(),t("div")}const f=e(s,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/ja_api_presets_index.md.BZKh7pEG.js b/assets/ja_api_presets_index.md.BZKh7pEG.js new file mode 100644 index 0000000..fd6e431 --- /dev/null +++ b/assets/ja_api_presets_index.md.BZKh7pEG.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"ja/api/presets/index.md","filePath":"ja/api/presets/index.md"}'),r={name:"ja/api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,_,h,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/ja_api_presets_index.md.BZKh7pEG.lean.js b/assets/ja_api_presets_index.md.BZKh7pEG.lean.js new file mode 100644 index 0000000..fd6e431 --- /dev/null +++ b/assets/ja_api_presets_index.md.BZKh7pEG.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"ja/api/presets/index.md","filePath":"ja/api/presets/index.md"}'),r={name:"ja/api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,_,h,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/ja_api_presets_model_index.md.D8yZmO5R.lean.js b/assets/ja_api_presets_model_index.md.D8yZmO5R.lean.js deleted file mode 100644 index 6239e6f..0000000 --- a/assets/ja_api_presets_model_index.md.D8yZmO5R.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n("",8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; diff --git a/assets/api_presets_model_index.md.DUZx13AW.js b/assets/ja_api_presets_model_index.md.DzI-SA0H.js similarity index 76% rename from assets/api_presets_model_index.md.DUZx13AW.js rename to assets/ja_api_presets_model_index.md.DzI-SA0H.js index 703cf6b..5bf63f1 100644 --- a/assets/api_presets_model_index.md.DUZx13AW.js +++ b/assets/ja_api_presets_model_index.md.DzI-SA0H.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"api/presets/model/index.md","filePath":"api/presets/model/index.md"}'),t={name:"api/presets/model/index.md"},h=n(`

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

说明: 生成球体上的点集。

参数:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源代码
python
@staticmethod
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n(`

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -15,4 +15,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/ja_api_presets_model_index.md.DzI-SA0H.lean.js b/assets/ja_api_presets_model_index.md.DzI-SA0H.lean.js new file mode 100644 index 0000000..497c78d --- /dev/null +++ b/assets/ja_api_presets_model_index.md.DzI-SA0H.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/index.md","filePath":"ja/api/presets/model/index.md"}'),t={name:"ja/api/presets/model/index.md"},h=n("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/ja_guide_index.md.BxGnZYwR.js b/assets/ja_guide_index.md.BxGnZYwR.js new file mode 100644 index 0000000..feb113f --- /dev/null +++ b/assets/ja_guide_index.md.BxGnZYwR.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"ja/guide/index.md","filePath":"ja/guide/index.md"}'),n={name:"ja/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o('',1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/ja_guide_index.md.BxGnZYwR.lean.js b/assets/ja_guide_index.md.BxGnZYwR.lean.js new file mode 100644 index 0000000..68e94f4 --- /dev/null +++ b/assets/ja_guide_index.md.BxGnZYwR.lean.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"ja/guide/index.md","filePath":"ja/guide/index.md"}'),n={name:"ja/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o("",1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/ja_index.md.CtozMsIU.js b/assets/ja_index.md.CtozMsIU.js new file mode 100644 index 0000000..31f9768 --- /dev/null +++ b/assets/ja_index.md.CtozMsIU.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"ジオメトリ演算とパーティクル作成のためのライブラリ","actions":[{"theme":"brand","text":"はじめる","link":"./guide/"},{"theme":"alt","text":"API リファレンス","link":"./api/"}]},"features":[{"title":"高可用性","details":"シンプルなインターフェースを通じて、ほとんどのジオメトリ演算とパーティクル作成のニーズを実現しました"},{"title":"高集積度","details":"numpyscipy、およびsympyをラップして統合し、Geogebraを使用するように簡単にスクリプトを作成できます"},{"title":"組み込みプリセット","details":"多くのプリセットを提供しており、一般的なジオメトリ図形やパーティクル効果など、迅速に作成できます"}]},"headers":[],"relativePath":"ja/index.md","filePath":"ja/index.md"}'),o={name:"ja/index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/ja_index.md.CtozMsIU.lean.js b/assets/ja_index.md.CtozMsIU.lean.js new file mode 100644 index 0000000..31f9768 --- /dev/null +++ b/assets/ja_index.md.CtozMsIU.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"ジオメトリ演算とパーティクル作成のためのライブラリ","actions":[{"theme":"brand","text":"はじめる","link":"./guide/"},{"theme":"alt","text":"API リファレンス","link":"./api/"}]},"features":[{"title":"高可用性","details":"シンプルなインターフェースを通じて、ほとんどのジオメトリ演算とパーティクル作成のニーズを実現しました"},{"title":"高集積度","details":"numpyscipy、およびsympyをラップして統合し、Geogebraを使用するように簡単にスクリプトを作成できます"},{"title":"組み込みプリセット","details":"多くのプリセットを提供しており、一般的なジオメトリ図形やパーティクル効果など、迅速に作成できます"}]},"headers":[],"relativePath":"ja/index.md","filePath":"ja/index.md"}'),o={name:"ja/index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const _=e(o,[["render",i]]);export{m as __pageData,_ as default}; diff --git a/assets/md-ex.md.BX0WqOqv.js b/assets/md-ex.md.BX0WqOqv.js deleted file mode 100644 index 31360cd..0000000 --- a/assets/md-ex.md.BX0WqOqv.js +++ /dev/null @@ -1,33 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const g=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"md-ex.md","filePath":"md-ex.md"}'),t={name:"md-ex.md"},e=n(`

Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

Syntax Highlighting

VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:

Input

md
\`\`\`js{4}
-export default {
-  data () {
-    return {
-      msg: 'Highlighted!'
-    }
-  }
-}
-\`\`\`

Output

js
export default {
-  data () {
-    return {
-      msg: 'Highlighted!'
-    }
-  }
-}

Custom Containers

Input

md
::: info
-This is an info box.
-:::
-
-::: tip
-This is a tip.
-:::
-
-::: warning
-This is a warning.
-:::
-
-::: danger
-This is a dangerous warning.
-:::
-
-::: details
-This is a details block.
-:::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

`,19),l=[e];function p(h,k,r,d,o,E){return a(),i("div",null,l)}const m=s(t,[["render",p]]);export{g as __pageData,m as default}; diff --git a/assets/md-ex.md.BX0WqOqv.lean.js b/assets/md-ex.md.BX0WqOqv.lean.js deleted file mode 100644 index f08e7fd..0000000 --- a/assets/md-ex.md.BX0WqOqv.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const g=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"md-ex.md","filePath":"md-ex.md"}'),t={name:"md-ex.md"},e=n("",19),l=[e];function p(h,k,r,d,o,E){return a(),i("div",null,l)}const m=s(t,[["render",p]]);export{g as __pageData,m as default}; diff --git a/assets/style.Bb0QBJmh.css b/assets/style.CTLFORxu.css similarity index 72% rename from assets/style.Bb0QBJmh.css rename to assets/style.CTLFORxu.css index b26e9bf..e8cfaf7 100644 --- a/assets/style.Bb0QBJmh.css +++ b/assets/style.CTLFORxu.css @@ -1 +1 @@ -@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-3cecd3dd]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-3cecd3dd],.VPBackdrop.fade-leave-to[data-v-3cecd3dd]{opacity:0}.VPBackdrop.fade-leave-active[data-v-3cecd3dd]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-3cecd3dd]{display:none}}.NotFound[data-v-794c8617]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-794c8617]{padding:96px 32px 168px}}.code[data-v-794c8617]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-794c8617]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-794c8617]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-794c8617]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-794c8617]{padding-top:20px}.link[data-v-794c8617]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-794c8617]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-f55eb20b]{position:relative;z-index:1}.nested[data-v-f55eb20b]{padding-right:16px;padding-left:16px}.outline-link[data-v-f55eb20b]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-f55eb20b]:hover,.outline-link.active[data-v-f55eb20b]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-f55eb20b]{padding-left:13px}.VPDocAsideOutline[data-v-e9eccece]{display:none}.VPDocAsideOutline.has-outline[data-v-e9eccece]{display:block}.content[data-v-e9eccece]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-e9eccece]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-e9eccece]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-9030d96a]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-9030d96a]{flex-grow:1}.VPDocAside[data-v-9030d96a] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-9030d96a] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-9030d96a] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-0d7790be]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-0d7790be]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-f33b051d]{margin-top:64px}.edit-info[data-v-f33b051d]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-f33b051d]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-f33b051d]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-f33b051d]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-f33b051d]{margin-right:8px}.prev-next[data-v-f33b051d]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-f33b051d]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-f33b051d]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-f33b051d]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-f33b051d]{margin-left:auto;text-align:right}.desc[data-v-f33b051d]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-f33b051d]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-aa782c77]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-aa782c77]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-aa782c77]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-aa782c77]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-aa782c77]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-aa782c77]{display:flex;justify-content:center}.VPDoc .aside[data-v-aa782c77]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-aa782c77]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-aa782c77]{max-width:1104px}}.container[data-v-aa782c77]{margin:0 auto;width:100%}.aside[data-v-aa782c77]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-aa782c77]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-aa782c77]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-aa782c77]::-webkit-scrollbar{display:none}.aside-curtain[data-v-aa782c77]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-aa782c77]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-aa782c77]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-aa782c77]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-aa782c77]{order:1;margin:0;min-width:640px}}.content-container[data-v-aa782c77]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-aa782c77]{max-width:688px}.VPButton[data-v-2c313aad]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-2c313aad]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-2c313aad]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-2c313aad]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-2c313aad]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-2c313aad]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-2c313aad]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-2c313aad]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-2c313aad]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-2c313aad]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-2c313aad]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-2c313aad]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-2c313aad]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-778ce7b3]{display:none}.dark .VPImage.light[data-v-778ce7b3]{display:none}.VPHero[data-v-1e5b8ae1]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-1e5b8ae1]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-1e5b8ae1]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-1e5b8ae1]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-1e5b8ae1]{flex-direction:row}}.main[data-v-1e5b8ae1]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-1e5b8ae1]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-1e5b8ae1]{text-align:left}}@media (min-width: 960px){.main[data-v-1e5b8ae1]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-1e5b8ae1]{max-width:592px}}.name[data-v-1e5b8ae1],.text[data-v-1e5b8ae1]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-1e5b8ae1],.VPHero.has-image .text[data-v-1e5b8ae1]{margin:0 auto}.name[data-v-1e5b8ae1]{color:var(--vp-home-hero-name-color)}.clip[data-v-1e5b8ae1]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-1e5b8ae1],.text[data-v-1e5b8ae1]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-1e5b8ae1],.text[data-v-1e5b8ae1]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-1e5b8ae1],.VPHero.has-image .text[data-v-1e5b8ae1]{margin:0}}.tagline[data-v-1e5b8ae1]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-1e5b8ae1]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-1e5b8ae1]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-1e5b8ae1]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-1e5b8ae1]{margin:0}}.actions[data-v-1e5b8ae1]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-1e5b8ae1]{justify-content:center}@media (min-width: 640px){.actions[data-v-1e5b8ae1]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-1e5b8ae1]{justify-content:flex-start}}.action[data-v-1e5b8ae1]{flex-shrink:0;padding:6px}.image[data-v-1e5b8ae1]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-1e5b8ae1]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-1e5b8ae1]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-1e5b8ae1]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-1e5b8ae1]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-1e5b8ae1]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-1e5b8ae1]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-1e5b8ae1]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-1e5b8ae1]{width:320px;height:320px}}[data-v-1e5b8ae1] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-1e5b8ae1] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-1e5b8ae1] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-dc42ca30]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-dc42ca30]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-dc42ca30]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-dc42ca30]>.VPImage{margin-bottom:20px}.icon[data-v-dc42ca30]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-dc42ca30]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-dc42ca30]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-dc42ca30]{padding-top:8px}.link-text-value[data-v-dc42ca30]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-dc42ca30]{margin-left:6px}.VPFeatures[data-v-d6e8dd35]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-d6e8dd35]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-d6e8dd35]{padding:0 64px}}.container[data-v-d6e8dd35]{margin:0 auto;max-width:1152px}.items[data-v-d6e8dd35]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-d6e8dd35]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-d6e8dd35],.item.grid-4[data-v-d6e8dd35],.item.grid-6[data-v-d6e8dd35]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-d6e8dd35],.item.grid-4[data-v-d6e8dd35]{width:50%}.item.grid-3[data-v-d6e8dd35],.item.grid-6[data-v-d6e8dd35]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-d6e8dd35]{width:25%}}.container[data-v-811aea7b]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-811aea7b]{padding:0 48px}}@media (min-width: 960px){.container[data-v-811aea7b]{width:100%;padding:0 64px}}.vp-doc[data-v-811aea7b] .VPHomeSponsors,.vp-doc[data-v-811aea7b] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-811aea7b] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-811aea7b] .VPHomeSponsors a,.vp-doc[data-v-811aea7b] .VPTeamPage a{text-decoration:none}.VPHome[data-v-4dea4f14]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-4dea4f14]{margin-bottom:128px}}.VPContent[data-v-4fa77a91]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-4fa77a91]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-4fa77a91]{margin:0}@media (min-width: 960px){.VPContent[data-v-4fa77a91]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-4fa77a91]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-4fa77a91]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-50f76801]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-50f76801]{display:none}.VPFooter[data-v-50f76801] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-50f76801] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-50f76801]{padding:32px}}.container[data-v-50f76801]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-50f76801],.copyright[data-v-50f76801]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-c4b0adf9]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-c4b0adf9]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-c4b0adf9]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-c4b0adf9]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-c4b0adf9]{color:var(--vp-c-text-1)}.icon[data-v-c4b0adf9]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-c4b0adf9]{font-size:14px}.icon[data-v-c4b0adf9]{font-size:16px}}.open>.icon[data-v-c4b0adf9]{transform:rotate(90deg)}.items[data-v-c4b0adf9]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-c4b0adf9]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-c4b0adf9]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-c4b0adf9]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-c4b0adf9]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-c4b0adf9]{transition:all .2s ease-out}.flyout-leave-active[data-v-c4b0adf9]{transition:all .15s ease-in}.flyout-enter-from[data-v-c4b0adf9],.flyout-leave-to[data-v-c4b0adf9]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-513d39e6]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-513d39e6]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-513d39e6]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-513d39e6]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-513d39e6]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-513d39e6]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-513d39e6]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-513d39e6]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-513d39e6]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-513d39e6]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-513d39e6]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-513d39e6]{display:none}}.menu-icon[data-v-513d39e6]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-513d39e6]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-513d39e6]{padding:12px 32px 11px}}.VPSwitch[data-v-793caf05]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-793caf05]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-793caf05]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-793caf05]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-793caf05] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-793caf05] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-38c704f2]{opacity:1}.moon[data-v-38c704f2],.dark .sun[data-v-38c704f2]{opacity:0}.dark .moon[data-v-38c704f2]{opacity:1}.dark .VPSwitchAppearance[data-v-38c704f2] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-fd625bab]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-fd625bab]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-a9b5eada]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-a9b5eada]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-a9b5eada]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-a9b5eada]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-6d568c27]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-6d568c27]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-6d568c27]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-6d568c27]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-36a6a4be]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-36a6a4be] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-36a6a4be] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-36a6a4be] .group:last-child{padding-bottom:0}.VPMenu[data-v-36a6a4be] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-36a6a4be] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-36a6a4be] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-36a6a4be] .action{padding-left:24px}.VPFlyout[data-v-6d56b0ed]{position:relative}.VPFlyout[data-v-6d56b0ed]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-6d56b0ed]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-6d56b0ed]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-6d56b0ed]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-6d56b0ed]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-6d56b0ed],.button[aria-expanded=true]+.menu[data-v-6d56b0ed]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-6d56b0ed]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-6d56b0ed]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-6d56b0ed]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-6d56b0ed]{margin-right:0;font-size:16px}.text-icon[data-v-6d56b0ed]{margin-left:4px;font-size:14px}.icon[data-v-6d56b0ed]{font-size:20px;transition:fill .25s}.menu[data-v-6d56b0ed]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-36d54f99]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-36d54f99]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-36d54f99]>svg,.VPSocialLink[data-v-36d54f99]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-0ada25a4]{display:flex;justify-content:center}.VPNavBarExtra[data-v-8ac0e455]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-8ac0e455]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-8ac0e455]{display:none}}.trans-title[data-v-8ac0e455]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-8ac0e455],.item.social-links[data-v-8ac0e455]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-8ac0e455]{min-width:176px}.appearance-action[data-v-8ac0e455]{margin-right:-2px}.social-links-list[data-v-8ac0e455]{margin:-4px -8px}.VPNavBarHamburger[data-v-9b302893]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-9b302893]{display:none}}.container[data-v-9b302893]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-9b302893]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-9b302893]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-9b302893]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-9b302893]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-9b302893]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-9b302893]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-9b302893],.VPNavBarHamburger.active:hover .middle[data-v-9b302893],.VPNavBarHamburger.active:hover .bottom[data-v-9b302893]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-9b302893],.middle[data-v-9b302893],.bottom[data-v-9b302893]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-9b302893]{top:0;left:0;transform:translate(0)}.middle[data-v-9b302893]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-9b302893]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-4ca2fdac]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-4ca2fdac],.VPNavBarMenuLink[data-v-4ca2fdac]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-ae469694]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-ae469694]{display:flex}}/*! @docsearch/css 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-9b3d2141]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-9b3d2141]{display:flex;align-items:center}}.title[data-v-73c882b0]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-73c882b0]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-73c882b0]{border-bottom-color:var(--vp-c-divider)}}[data-v-73c882b0] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-ba521018]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-ba521018]{display:flex;align-items:center}}.title[data-v-ba521018]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-af8d762d]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-af8d762d]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-af8d762d]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-af8d762d]:not(.home){background-color:transparent}.VPNavBar[data-v-af8d762d]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-af8d762d]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-af8d762d]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-af8d762d]{padding:0}}.container[data-v-af8d762d]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-af8d762d],.container>.content[data-v-af8d762d]{pointer-events:none}.container[data-v-af8d762d] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-af8d762d]{max-width:100%}}.title[data-v-af8d762d]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-af8d762d]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-af8d762d]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-af8d762d]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-af8d762d]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-af8d762d]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-af8d762d]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-af8d762d]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-af8d762d]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-af8d762d]{column-gap:.5rem}}.menu+.translations[data-v-af8d762d]:before,.menu+.appearance[data-v-af8d762d]:before,.menu+.social-links[data-v-af8d762d]:before,.translations+.appearance[data-v-af8d762d]:before,.appearance+.social-links[data-v-af8d762d]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-af8d762d]:before,.translations+.appearance[data-v-af8d762d]:before{margin-right:16px}.appearance+.social-links[data-v-af8d762d]:before{margin-left:16px}.social-links[data-v-af8d762d]{margin-right:-8px}.divider[data-v-af8d762d]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-af8d762d]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-af8d762d]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-af8d762d]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-af8d762d]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-af8d762d]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-af8d762d]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-89b5e60a]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-89b5e60a]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-1dbea2c1]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-1dbea2c1]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-bfeb9577]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-bfeb9577]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-479edfcd]{display:block}.title[data-v-479edfcd]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-c2cd7d8e]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-c2cd7d8e]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-c2cd7d8e]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-c2cd7d8e]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-c2cd7d8e]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-c2cd7d8e]{transform:rotate(45deg)}.button[data-v-c2cd7d8e]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-c2cd7d8e]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-c2cd7d8e]{transition:transform .25s}.group[data-v-c2cd7d8e]:first-child{padding-top:0}.group+.group[data-v-c2cd7d8e],.group+.item[data-v-c2cd7d8e]{padding-top:4px}.VPNavScreenTranslations[data-v-7397f3c0]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-7397f3c0]{height:auto}.title[data-v-7397f3c0]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-7397f3c0]{font-size:16px}.icon.lang[data-v-7397f3c0]{margin-right:8px}.icon.chevron[data-v-7397f3c0]{margin-left:4px}.list[data-v-7397f3c0]{padding:4px 0 0 24px}.link[data-v-7397f3c0]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-9061cc92]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-9061cc92],.VPNavScreen.fade-leave-active[data-v-9061cc92]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-9061cc92],.VPNavScreen.fade-leave-active .container[data-v-9061cc92]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-9061cc92],.VPNavScreen.fade-leave-to[data-v-9061cc92]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-9061cc92],.VPNavScreen.fade-leave-to .container[data-v-9061cc92]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-9061cc92]{display:none}}.container[data-v-9061cc92]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-9061cc92],.menu+.appearance[data-v-9061cc92],.translations+.appearance[data-v-9061cc92]{margin-top:24px}.menu+.social-links[data-v-9061cc92]{margin-top:16px}.appearance+.social-links[data-v-9061cc92]{margin-top:16px}.VPNav[data-v-0c3b3583]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-0c3b3583]{position:fixed}}.VPSidebarItem.level-0[data-v-e6240f47]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-e6240f47]{padding-bottom:10px}.item[data-v-e6240f47]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-e6240f47]{cursor:pointer}.indicator[data-v-e6240f47]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-e6240f47],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-e6240f47],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-e6240f47],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-e6240f47]{background-color:var(--vp-c-brand-1)}.link[data-v-e6240f47]{display:flex;align-items:center;flex-grow:1}.text[data-v-e6240f47]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-e6240f47]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-e6240f47],.VPSidebarItem.level-2 .text[data-v-e6240f47],.VPSidebarItem.level-3 .text[data-v-e6240f47],.VPSidebarItem.level-4 .text[data-v-e6240f47],.VPSidebarItem.level-5 .text[data-v-e6240f47]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-e6240f47],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-e6240f47],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-e6240f47],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-e6240f47],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-e6240f47],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-e6240f47]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-1.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-2.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-3.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-4.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-5.has-active>.item>.text[data-v-e6240f47],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-e6240f47],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-e6240f47],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-e6240f47],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-e6240f47],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-e6240f47],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-e6240f47]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-e6240f47],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-e6240f47],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-e6240f47],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-e6240f47],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-e6240f47],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-e6240f47]{color:var(--vp-c-brand-1)}.caret[data-v-e6240f47]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-e6240f47]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-e6240f47]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-e6240f47]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-e6240f47]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-e6240f47],.VPSidebarItem.level-2 .items[data-v-e6240f47],.VPSidebarItem.level-3 .items[data-v-e6240f47],.VPSidebarItem.level-4 .items[data-v-e6240f47],.VPSidebarItem.level-5 .items[data-v-e6240f47]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-e6240f47]{display:none}.no-transition[data-v-c4d8cef8] .caret-icon{transition:none}.group+.group[data-v-c4d8cef8]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-c4d8cef8]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-a2c838fb]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-a2c838fb]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-a2c838fb]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-a2c838fb]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-a2c838fb]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-a2c838fb]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-a2c838fb]{outline:0}.VPSkipLink[data-v-efdf7a7d]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-efdf7a7d]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-efdf7a7d]{top:14px;left:16px}}.Layout[data-v-8e016544]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-af52d356]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-af52d356]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-af52d356]{margin:128px 0}}.VPHomeSponsors[data-v-af52d356]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-af52d356]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-af52d356]{padding:0 64px}}.container[data-v-af52d356]{margin:0 auto;max-width:1152px}.love[data-v-af52d356]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-af52d356]{display:inline-block}.message[data-v-af52d356]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-af52d356]{padding-top:32px}.action[data-v-af52d356]{padding-top:40px;text-align:center}.VPTeamPage[data-v-27a8b650]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-27a8b650]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-27a8b650-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-27a8b650-s],.VPTeamMembers+.VPTeamPageSection[data-v-27a8b650-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-27a8b650-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-27a8b650-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-27a8b650-s],.VPTeamMembers+.VPTeamPageSection[data-v-27a8b650-s]{margin-top:96px}}.VPTeamMembers[data-v-27a8b650-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-27a8b650-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-27a8b650-s]{padding:0 64px}}.VPTeamPageTitle[data-v-3b9ba24c]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-3b9ba24c]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-3b9ba24c]{padding:80px 64px 48px}}.title[data-v-3b9ba24c]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-3b9ba24c]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-3b9ba24c]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-3b9ba24c]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-efb85c77]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-efb85c77]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-efb85c77]{padding:0 64px}}.title[data-v-efb85c77]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-efb85c77]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-efb85c77]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-efb85c77]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-efb85c77]{padding-top:40px}.VPTeamMembersItem[data-v-38cef690]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-38cef690]{padding:32px}.VPTeamMembersItem.small .data[data-v-38cef690]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-38cef690]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-38cef690]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-38cef690]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-38cef690]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-38cef690]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-38cef690]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-38cef690]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-38cef690]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-38cef690]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-38cef690]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-38cef690]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-38cef690]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-38cef690]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-38cef690]{text-align:center}.avatar[data-v-38cef690]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-38cef690]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-38cef690]{margin:0;font-weight:600}.affiliation[data-v-38cef690]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-38cef690]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-38cef690]:hover{color:var(--vp-c-brand-1)}.desc[data-v-38cef690]{margin:0 auto}.desc[data-v-38cef690] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-38cef690]{display:flex;justify-content:center;height:56px}.sp-link[data-v-38cef690]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-38cef690]:hover,.sp .sp-link.link[data-v-38cef690]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-38cef690]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-41c192cb]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-41c192cb]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-41c192cb]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-41c192cb]{max-width:876px}.VPTeamMembers.medium .container[data-v-41c192cb]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-41c192cb]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-41c192cb]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-41c192cb]{max-width:760px}.container[data-v-41c192cb]{display:grid;gap:24px;margin:0 auto;max-width:1152px} +@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-cyrillic.C5lxZ8CY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek-ext.CqjqNYQ-.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-greek.BBVDIX6e.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-vietnamese.BjW4sHH5.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin-ext.4ZJIpNVo.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:normal;font-weight:100 900;font-display:swap;src:url(/assets/inter-roman-latin.Di8DUHzh.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic-ext.r48I6akx.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-cyrillic.By2_1cv3.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek-ext.1u6EdAuj.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-greek.DJ8dCoTZ.woff2) format("woff2");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-vietnamese.BSbpV94h.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin-ext.CN1xVJS-.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter;font-style:italic;font-weight:100 900;font-display:swap;src:url(/assets/inter-italic-latin.C2AdPX0b.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Punctuation SC;font-weight:400;src:local("PingFang SC Regular"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:500;src:local("PingFang SC Medium"),local("Noto Sans CJK SC"),local("Microsoft YaHei");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:600;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}@font-face{font-family:Punctuation SC;font-weight:700;src:local("PingFang SC Semibold"),local("Noto Sans CJK SC Bold"),local("Microsoft YaHei Bold");unicode-range:U+201C,U+201D,U+2018,U+2019,U+2E3A,U+2014,U+2013,U+2026,U+00B7,U+007E,U+002F}:root{--vp-c-white: #ffffff;--vp-c-black: #000000;--vp-c-neutral: var(--vp-c-black);--vp-c-neutral-inverse: var(--vp-c-white)}.dark{--vp-c-neutral: var(--vp-c-white);--vp-c-neutral-inverse: var(--vp-c-black)}:root{--vp-c-gray-1: #dddde3;--vp-c-gray-2: #e4e4e9;--vp-c-gray-3: #ebebef;--vp-c-gray-soft: rgba(142, 150, 170, .14);--vp-c-indigo-1: #3451b2;--vp-c-indigo-2: #3a5ccc;--vp-c-indigo-3: #5672cd;--vp-c-indigo-soft: rgba(100, 108, 255, .14);--vp-c-purple-1: #6f42c1;--vp-c-purple-2: #7e4cc9;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .14);--vp-c-green-1: #18794e;--vp-c-green-2: #299764;--vp-c-green-3: #30a46c;--vp-c-green-soft: rgba(16, 185, 129, .14);--vp-c-yellow-1: #915930;--vp-c-yellow-2: #946300;--vp-c-yellow-3: #9f6a00;--vp-c-yellow-soft: rgba(234, 179, 8, .14);--vp-c-red-1: #b8272c;--vp-c-red-2: #d5393e;--vp-c-red-3: #e0575b;--vp-c-red-soft: rgba(244, 63, 94, .14);--vp-c-sponsor: #db2777}.dark{--vp-c-gray-1: #515c67;--vp-c-gray-2: #414853;--vp-c-gray-3: #32363f;--vp-c-gray-soft: rgba(101, 117, 133, .16);--vp-c-indigo-1: #a8b1ff;--vp-c-indigo-2: #5c73e7;--vp-c-indigo-3: #3e63dd;--vp-c-indigo-soft: rgba(100, 108, 255, .16);--vp-c-purple-1: #c8abfa;--vp-c-purple-2: #a879e6;--vp-c-purple-3: #8e5cd9;--vp-c-purple-soft: rgba(159, 122, 234, .16);--vp-c-green-1: #3dd68c;--vp-c-green-2: #30a46c;--vp-c-green-3: #298459;--vp-c-green-soft: rgba(16, 185, 129, .16);--vp-c-yellow-1: #f9b44e;--vp-c-yellow-2: #da8b17;--vp-c-yellow-3: #a46a0a;--vp-c-yellow-soft: rgba(234, 179, 8, .16);--vp-c-red-1: #f66f81;--vp-c-red-2: #f14158;--vp-c-red-3: #b62a3c;--vp-c-red-soft: rgba(244, 63, 94, .16)}:root{--vp-c-bg: #ffffff;--vp-c-bg-alt: #f6f6f7;--vp-c-bg-elv: #ffffff;--vp-c-bg-soft: #f6f6f7}.dark{--vp-c-bg: #1b1b1f;--vp-c-bg-alt: #161618;--vp-c-bg-elv: #202127;--vp-c-bg-soft: #202127}:root{--vp-c-border: #c2c2c4;--vp-c-divider: #e2e2e3;--vp-c-gutter: #e2e2e3}.dark{--vp-c-border: #3c3f44;--vp-c-divider: #2e2e32;--vp-c-gutter: #000000}:root{--vp-c-text-1: rgba(60, 60, 67);--vp-c-text-2: rgba(60, 60, 67, .78);--vp-c-text-3: rgba(60, 60, 67, .56)}.dark{--vp-c-text-1: rgba(255, 255, 245, .86);--vp-c-text-2: rgba(235, 235, 245, .6);--vp-c-text-3: rgba(235, 235, 245, .38)}:root{--vp-c-default-1: var(--vp-c-gray-1);--vp-c-default-2: var(--vp-c-gray-2);--vp-c-default-3: var(--vp-c-gray-3);--vp-c-default-soft: var(--vp-c-gray-soft);--vp-c-brand-1: var(--vp-c-indigo-1);--vp-c-brand-2: var(--vp-c-indigo-2);--vp-c-brand-3: var(--vp-c-indigo-3);--vp-c-brand-soft: var(--vp-c-indigo-soft);--vp-c-brand: var(--vp-c-brand-1);--vp-c-tip-1: var(--vp-c-brand-1);--vp-c-tip-2: var(--vp-c-brand-2);--vp-c-tip-3: var(--vp-c-brand-3);--vp-c-tip-soft: var(--vp-c-brand-soft);--vp-c-note-1: var(--vp-c-brand-1);--vp-c-note-2: var(--vp-c-brand-2);--vp-c-note-3: var(--vp-c-brand-3);--vp-c-note-soft: var(--vp-c-brand-soft);--vp-c-success-1: var(--vp-c-green-1);--vp-c-success-2: var(--vp-c-green-2);--vp-c-success-3: var(--vp-c-green-3);--vp-c-success-soft: var(--vp-c-green-soft);--vp-c-important-1: var(--vp-c-purple-1);--vp-c-important-2: var(--vp-c-purple-2);--vp-c-important-3: var(--vp-c-purple-3);--vp-c-important-soft: var(--vp-c-purple-soft);--vp-c-warning-1: var(--vp-c-yellow-1);--vp-c-warning-2: var(--vp-c-yellow-2);--vp-c-warning-3: var(--vp-c-yellow-3);--vp-c-warning-soft: var(--vp-c-yellow-soft);--vp-c-danger-1: var(--vp-c-red-1);--vp-c-danger-2: var(--vp-c-red-2);--vp-c-danger-3: var(--vp-c-red-3);--vp-c-danger-soft: var(--vp-c-red-soft);--vp-c-caution-1: var(--vp-c-red-1);--vp-c-caution-2: var(--vp-c-red-2);--vp-c-caution-3: var(--vp-c-red-3);--vp-c-caution-soft: var(--vp-c-red-soft)}:root{--vp-font-family-base: "Inter", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--vp-font-family-mono: ui-monospace, "Menlo", "Monaco", "Consolas", "Liberation Mono", "Courier New", monospace;font-optical-sizing:auto}:root:where(:lang(zh)){--vp-font-family-base: "Punctuation SC", "Inter", ui-sans-serif, system-ui, "PingFang SC", "Noto Sans CJK SC", "Noto Sans SC", "Heiti SC", "Microsoft YaHei", "DengXian", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"}:root{--vp-shadow-1: 0 1px 2px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .06);--vp-shadow-2: 0 3px 12px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .07);--vp-shadow-3: 0 12px 32px rgba(0, 0, 0, .1), 0 2px 6px rgba(0, 0, 0, .08);--vp-shadow-4: 0 14px 44px rgba(0, 0, 0, .12), 0 3px 9px rgba(0, 0, 0, .12);--vp-shadow-5: 0 18px 56px rgba(0, 0, 0, .16), 0 4px 12px rgba(0, 0, 0, .16)}:root{--vp-z-index-footer: 10;--vp-z-index-local-nav: 20;--vp-z-index-nav: 30;--vp-z-index-layout-top: 40;--vp-z-index-backdrop: 50;--vp-z-index-sidebar: 60}@media (min-width: 960px){:root{--vp-z-index-sidebar: 25}}:root{--vp-layout-max-width: 1440px}:root{--vp-header-anchor-symbol: "#"}:root{--vp-code-line-height: 1.7;--vp-code-font-size: .875em;--vp-code-color: var(--vp-c-brand-1);--vp-code-link-color: var(--vp-c-brand-1);--vp-code-link-hover-color: var(--vp-c-brand-2);--vp-code-bg: var(--vp-c-default-soft);--vp-code-block-color: var(--vp-c-text-2);--vp-code-block-bg: var(--vp-c-bg-alt);--vp-code-block-divider-color: var(--vp-c-gutter);--vp-code-lang-color: var(--vp-c-text-3);--vp-code-line-highlight-color: var(--vp-c-default-soft);--vp-code-line-number-color: var(--vp-c-text-3);--vp-code-line-diff-add-color: var(--vp-c-success-soft);--vp-code-line-diff-add-symbol-color: var(--vp-c-success-1);--vp-code-line-diff-remove-color: var(--vp-c-danger-soft);--vp-code-line-diff-remove-symbol-color: var(--vp-c-danger-1);--vp-code-line-warning-color: var(--vp-c-warning-soft);--vp-code-line-error-color: var(--vp-c-danger-soft);--vp-code-copy-code-border-color: var(--vp-c-divider);--vp-code-copy-code-bg: var(--vp-c-bg-soft);--vp-code-copy-code-hover-border-color: var(--vp-c-divider);--vp-code-copy-code-hover-bg: var(--vp-c-bg);--vp-code-copy-code-active-text: var(--vp-c-text-2);--vp-code-copy-copied-text-content: "Copied";--vp-code-tab-divider: var(--vp-code-block-divider-color);--vp-code-tab-text-color: var(--vp-c-text-2);--vp-code-tab-bg: var(--vp-code-block-bg);--vp-code-tab-hover-text-color: var(--vp-c-text-1);--vp-code-tab-active-text-color: var(--vp-c-text-1);--vp-code-tab-active-bar-color: var(--vp-c-brand-1)}:root{--vp-button-brand-border: transparent;--vp-button-brand-text: var(--vp-c-white);--vp-button-brand-bg: var(--vp-c-brand-3);--vp-button-brand-hover-border: transparent;--vp-button-brand-hover-text: var(--vp-c-white);--vp-button-brand-hover-bg: var(--vp-c-brand-2);--vp-button-brand-active-border: transparent;--vp-button-brand-active-text: var(--vp-c-white);--vp-button-brand-active-bg: var(--vp-c-brand-1);--vp-button-alt-border: transparent;--vp-button-alt-text: var(--vp-c-text-1);--vp-button-alt-bg: var(--vp-c-default-3);--vp-button-alt-hover-border: transparent;--vp-button-alt-hover-text: var(--vp-c-text-1);--vp-button-alt-hover-bg: var(--vp-c-default-2);--vp-button-alt-active-border: transparent;--vp-button-alt-active-text: var(--vp-c-text-1);--vp-button-alt-active-bg: var(--vp-c-default-1);--vp-button-sponsor-border: var(--vp-c-text-2);--vp-button-sponsor-text: var(--vp-c-text-2);--vp-button-sponsor-bg: transparent;--vp-button-sponsor-hover-border: var(--vp-c-sponsor);--vp-button-sponsor-hover-text: var(--vp-c-sponsor);--vp-button-sponsor-hover-bg: transparent;--vp-button-sponsor-active-border: var(--vp-c-sponsor);--vp-button-sponsor-active-text: var(--vp-c-sponsor);--vp-button-sponsor-active-bg: transparent}:root{--vp-custom-block-font-size: 14px;--vp-custom-block-code-font-size: 13px;--vp-custom-block-info-border: transparent;--vp-custom-block-info-text: var(--vp-c-text-1);--vp-custom-block-info-bg: var(--vp-c-default-soft);--vp-custom-block-info-code-bg: var(--vp-c-default-soft);--vp-custom-block-note-border: transparent;--vp-custom-block-note-text: var(--vp-c-text-1);--vp-custom-block-note-bg: var(--vp-c-default-soft);--vp-custom-block-note-code-bg: var(--vp-c-default-soft);--vp-custom-block-tip-border: transparent;--vp-custom-block-tip-text: var(--vp-c-text-1);--vp-custom-block-tip-bg: var(--vp-c-tip-soft);--vp-custom-block-tip-code-bg: var(--vp-c-tip-soft);--vp-custom-block-important-border: transparent;--vp-custom-block-important-text: var(--vp-c-text-1);--vp-custom-block-important-bg: var(--vp-c-important-soft);--vp-custom-block-important-code-bg: var(--vp-c-important-soft);--vp-custom-block-warning-border: transparent;--vp-custom-block-warning-text: var(--vp-c-text-1);--vp-custom-block-warning-bg: var(--vp-c-warning-soft);--vp-custom-block-warning-code-bg: var(--vp-c-warning-soft);--vp-custom-block-danger-border: transparent;--vp-custom-block-danger-text: var(--vp-c-text-1);--vp-custom-block-danger-bg: var(--vp-c-danger-soft);--vp-custom-block-danger-code-bg: var(--vp-c-danger-soft);--vp-custom-block-caution-border: transparent;--vp-custom-block-caution-text: var(--vp-c-text-1);--vp-custom-block-caution-bg: var(--vp-c-caution-soft);--vp-custom-block-caution-code-bg: var(--vp-c-caution-soft);--vp-custom-block-details-border: var(--vp-custom-block-info-border);--vp-custom-block-details-text: var(--vp-custom-block-info-text);--vp-custom-block-details-bg: var(--vp-custom-block-info-bg);--vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg)}:root{--vp-input-border-color: var(--vp-c-border);--vp-input-bg-color: var(--vp-c-bg-alt);--vp-input-switch-bg-color: var(--vp-c-default-soft)}:root{--vp-nav-height: 64px;--vp-nav-bg-color: var(--vp-c-bg);--vp-nav-screen-bg-color: var(--vp-c-bg);--vp-nav-logo-height: 24px}.hide-nav{--vp-nav-height: 0px}.hide-nav .VPSidebar{--vp-nav-height: 22px}:root{--vp-local-nav-bg-color: var(--vp-c-bg)}:root{--vp-sidebar-width: 272px;--vp-sidebar-bg-color: var(--vp-c-bg-alt)}:root{--vp-backdrop-bg-color: rgba(0, 0, 0, .6)}:root{--vp-home-hero-name-color: var(--vp-c-brand-1);--vp-home-hero-name-background: transparent;--vp-home-hero-image-background-image: none;--vp-home-hero-image-filter: none}:root{--vp-badge-info-border: transparent;--vp-badge-info-text: var(--vp-c-text-2);--vp-badge-info-bg: var(--vp-c-default-soft);--vp-badge-tip-border: transparent;--vp-badge-tip-text: var(--vp-c-tip-1);--vp-badge-tip-bg: var(--vp-c-tip-soft);--vp-badge-warning-border: transparent;--vp-badge-warning-text: var(--vp-c-warning-1);--vp-badge-warning-bg: var(--vp-c-warning-soft);--vp-badge-danger-border: transparent;--vp-badge-danger-text: var(--vp-c-danger-1);--vp-badge-danger-bg: var(--vp-c-danger-soft)}:root{--vp-carbon-ads-text-color: var(--vp-c-text-1);--vp-carbon-ads-poweredby-color: var(--vp-c-text-2);--vp-carbon-ads-bg-color: var(--vp-c-bg-soft);--vp-carbon-ads-hover-text-color: var(--vp-c-brand-1);--vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1)}:root{--vp-local-search-bg: var(--vp-c-bg);--vp-local-search-result-bg: var(--vp-c-bg);--vp-local-search-result-border: var(--vp-c-divider);--vp-local-search-result-selected-bg: var(--vp-c-bg);--vp-local-search-result-selected-border: var(--vp-c-brand-1);--vp-local-search-highlight-bg: var(--vp-c-brand-1);--vp-local-search-highlight-text: var(--vp-c-neutral-inverse)}@media (prefers-reduced-motion: reduce){*,:before,:after{animation-delay:-1ms!important;animation-duration:1ms!important;animation-iteration-count:1!important;background-attachment:initial!important;scroll-behavior:auto!important;transition-duration:0s!important;transition-delay:0s!important}}*,:before,:after{box-sizing:border-box}html{line-height:1.4;font-size:16px;-webkit-text-size-adjust:100%}html.dark{color-scheme:dark}body{margin:0;width:100%;min-width:320px;min-height:100vh;line-height:24px;font-family:var(--vp-font-family-base);font-size:16px;font-weight:400;color:var(--vp-c-text-1);background-color:var(--vp-c-bg);font-synthesis:style;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}main{display:block}h1,h2,h3,h4,h5,h6{margin:0;line-height:24px;font-size:16px;font-weight:400}p{margin:0}strong,b{font-weight:600}a,area,button,[role=button],input,label,select,summary,textarea{touch-action:manipulation}a{color:inherit;text-decoration:inherit}ol,ul{list-style:none;margin:0;padding:0}blockquote{margin:0}pre,code,kbd,samp{font-family:var(--vp-font-family-mono)}img,svg,video,canvas,audio,iframe,embed,object{display:block}figure{margin:0}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{border:0;padding:0;line-height:inherit;color:inherit}button{padding:0;font-family:inherit;background-color:transparent;background-image:none}button:enabled,[role=button]:enabled{cursor:pointer}button:focus,button:focus-visible{outline:1px dotted;outline:4px auto -webkit-focus-ring-color}button:focus:not(:focus-visible){outline:none!important}input:focus,textarea:focus,select:focus{outline:none}table{border-collapse:collapse}input{background-color:transparent}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:var(--vp-c-text-3)}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:var(--vp-c-text-3)}input::placeholder,textarea::placeholder{color:var(--vp-c-text-3)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}textarea{resize:vertical}select{-webkit-appearance:none}fieldset{margin:0;padding:0}h1,h2,h3,h4,h5,h6,li,p{overflow-wrap:break-word}vite-error-overlay{z-index:9999}mjx-container{overflow-x:auto}mjx-container>svg{display:inline-block;margin:auto}[class^=vpi-],[class*=" vpi-"],.vp-icon{width:1em;height:1em}[class^=vpi-].bg,[class*=" vpi-"].bg,.vp-icon.bg{background-size:100% 100%;background-color:transparent}[class^=vpi-]:not(.bg),[class*=" vpi-"]:not(.bg),.vp-icon:not(.bg){-webkit-mask:var(--icon) no-repeat;mask:var(--icon) no-repeat;-webkit-mask-size:100% 100%;mask-size:100% 100%;background-color:currentColor;color:inherit}.vpi-align-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M21 6H3M15 12H3M17 18H3'/%3E%3C/svg%3E")}.vpi-arrow-right,.vpi-arrow-down,.vpi-arrow-left,.vpi-arrow-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E")}.vpi-chevron-right,.vpi-chevron-down,.vpi-chevron-left,.vpi-chevron-up{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E")}.vpi-chevron-down,.vpi-arrow-down{transform:rotate(90deg)}.vpi-chevron-left,.vpi-arrow-left{transform:rotate(180deg)}.vpi-chevron-up,.vpi-arrow-up{transform:rotate(-90deg)}.vpi-square-pen{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.375 2.625a2.121 2.121 0 1 1 3 3L12 15l-4 1 1-4Z'/%3E%3C/svg%3E")}.vpi-plus{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E")}.vpi-sun{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E")}.vpi-moon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z'/%3E%3C/svg%3E")}.vpi-more-horizontal{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='1'/%3E%3Ccircle cx='19' cy='12' r='1'/%3E%3Ccircle cx='5' cy='12' r='1'/%3E%3C/svg%3E")}.vpi-languages{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m5 8 6 6M4 14l6-6 2-3M2 5h12M7 2h1M22 22l-5-10-5 10M14 18h6'/%3E%3C/svg%3E")}.vpi-heart{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z'/%3E%3C/svg%3E")}.vpi-search{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E")}.vpi-layout-list{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='7' height='7' x='3' y='3' rx='1'/%3E%3Crect width='7' height='7' x='3' y='14' rx='1'/%3E%3Cpath d='M14 4h7M14 9h7M14 15h7M14 20h7'/%3E%3C/svg%3E")}.vpi-delete{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M20 5H9l-7 7 7 7h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2ZM18 9l-6 6M12 9l6 6'/%3E%3C/svg%3E")}.vpi-corner-down-left{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m9 10-5 5 5 5'/%3E%3Cpath d='M20 4v7a4 4 0 0 1-4 4H4'/%3E%3C/svg%3E")}:root{--vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3C/svg%3E");--vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='rgba(128,128,128,1)' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect width='8' height='4' x='8' y='2' rx='1' ry='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='m9 14 2 2 4-4'/%3E%3C/svg%3E")}.vpi-social-discord{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z'/%3E%3C/svg%3E")}.vpi-social-facebook{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z'/%3E%3C/svg%3E")}.vpi-social-github{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}.vpi-social-instagram{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7.03.084c-1.277.06-2.149.264-2.91.563a5.874 5.874 0 0 0-2.124 1.388 5.878 5.878 0 0 0-1.38 2.127C.321 4.926.12 5.8.064 7.076.008 8.354-.005 8.764.001 12.023c.007 3.259.021 3.667.083 4.947.061 1.277.264 2.149.563 2.911.308.789.72 1.457 1.388 2.123a5.872 5.872 0 0 0 2.129 1.38c.763.295 1.636.496 2.913.552 1.278.056 1.689.069 4.947.063 3.257-.007 3.668-.021 4.947-.082 1.28-.06 2.147-.265 2.91-.563a5.881 5.881 0 0 0 2.123-1.388 5.881 5.881 0 0 0 1.38-2.129c.295-.763.496-1.636.551-2.912.056-1.28.07-1.69.063-4.948-.006-3.258-.02-3.667-.081-4.947-.06-1.28-.264-2.148-.564-2.911a5.892 5.892 0 0 0-1.387-2.123 5.857 5.857 0 0 0-2.128-1.38C19.074.322 18.202.12 16.924.066 15.647.009 15.236-.006 11.977 0 8.718.008 8.31.021 7.03.084m.14 21.693c-1.17-.05-1.805-.245-2.228-.408a3.736 3.736 0 0 1-1.382-.895 3.695 3.695 0 0 1-.9-1.378c-.165-.423-.363-1.058-.417-2.228-.06-1.264-.072-1.644-.08-4.848-.006-3.204.006-3.583.061-4.848.05-1.169.246-1.805.408-2.228.216-.561.477-.96.895-1.382a3.705 3.705 0 0 1 1.379-.9c.423-.165 1.057-.361 2.227-.417 1.265-.06 1.644-.072 4.848-.08 3.203-.006 3.583.006 4.85.062 1.168.05 1.804.244 2.227.408.56.216.96.475 1.382.895.421.42.681.817.9 1.378.165.422.362 1.056.417 2.227.06 1.265.074 1.645.08 4.848.005 3.203-.006 3.583-.061 4.848-.051 1.17-.245 1.805-.408 2.23-.216.56-.477.96-.896 1.38a3.705 3.705 0 0 1-1.378.9c-.422.165-1.058.362-2.226.418-1.266.06-1.645.072-4.85.079-3.204.007-3.582-.006-4.848-.06m9.783-16.192a1.44 1.44 0 1 0 1.437-1.442 1.44 1.44 0 0 0-1.437 1.442M5.839 12.012a6.161 6.161 0 1 0 12.323-.024 6.162 6.162 0 0 0-12.323.024M8 12.008A4 4 0 1 1 12.008 16 4 4 0 0 1 8 12.008'/%3E%3C/svg%3E")}.vpi-social-linkedin{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 0 1-2.063-2.065 2.064 2.064 0 1 1 2.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z'/%3E%3C/svg%3E")}.vpi-social-mastodon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.268 5.313c-.35-2.578-2.617-4.61-5.304-5.004C17.51.242 15.792 0 11.813 0h-.03c-3.98 0-4.835.242-5.288.309C3.882.692 1.496 2.518.917 5.127.64 6.412.61 7.837.661 9.143c.074 1.874.088 3.745.26 5.611.118 1.24.325 2.47.62 3.68.55 2.237 2.777 4.098 4.96 4.857 2.336.792 4.849.923 7.256.38.265-.061.527-.132.786-.213.585-.184 1.27-.39 1.774-.753a.057.057 0 0 0 .023-.043v-1.809a.052.052 0 0 0-.02-.041.053.053 0 0 0-.046-.01 20.282 20.282 0 0 1-4.709.545c-2.73 0-3.463-1.284-3.674-1.818a5.593 5.593 0 0 1-.319-1.433.053.053 0 0 1 .066-.054c1.517.363 3.072.546 4.632.546.376 0 .75 0 1.125-.01 1.57-.044 3.224-.124 4.768-.422.038-.008.077-.015.11-.024 2.435-.464 4.753-1.92 4.989-5.604.008-.145.03-1.52.03-1.67.002-.512.167-3.63-.024-5.545zm-3.748 9.195h-2.561V8.29c0-1.309-.55-1.976-1.67-1.976-1.23 0-1.846.79-1.846 2.35v3.403h-2.546V8.663c0-1.56-.617-2.35-1.848-2.35-1.112 0-1.668.668-1.67 1.977v6.218H4.822V8.102c0-1.31.337-2.35 1.011-3.12.696-.77 1.608-1.164 2.74-1.164 1.311 0 2.302.5 2.962 1.498l.638 1.06.638-1.06c.66-.999 1.65-1.498 2.96-1.498 1.13 0 2.043.395 2.74 1.164.675.77 1.012 1.81 1.012 3.12z'/%3E%3C/svg%3E")}.vpi-social-npm{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z'/%3E%3C/svg%3E")}.vpi-social-slack{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313zM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313z'/%3E%3C/svg%3E")}.vpi-social-twitter,.vpi-social-x{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z'/%3E%3C/svg%3E")}.vpi-social-youtube{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z'/%3E%3C/svg%3E")}.visually-hidden{position:absolute;width:1px;height:1px;white-space:nowrap;clip:rect(0 0 0 0);clip-path:inset(50%);overflow:hidden}.custom-block{border:1px solid transparent;border-radius:8px;padding:16px 16px 8px;line-height:24px;font-size:var(--vp-custom-block-font-size);color:var(--vp-c-text-2)}.custom-block.info{border-color:var(--vp-custom-block-info-border);color:var(--vp-custom-block-info-text);background-color:var(--vp-custom-block-info-bg)}.custom-block.info a,.custom-block.info code{color:var(--vp-c-brand-1)}.custom-block.info a:hover,.custom-block.info a:hover>code{color:var(--vp-c-brand-2)}.custom-block.info code{background-color:var(--vp-custom-block-info-code-bg)}.custom-block.note{border-color:var(--vp-custom-block-note-border);color:var(--vp-custom-block-note-text);background-color:var(--vp-custom-block-note-bg)}.custom-block.note a,.custom-block.note code{color:var(--vp-c-brand-1)}.custom-block.note a:hover,.custom-block.note a:hover>code{color:var(--vp-c-brand-2)}.custom-block.note code{background-color:var(--vp-custom-block-note-code-bg)}.custom-block.tip{border-color:var(--vp-custom-block-tip-border);color:var(--vp-custom-block-tip-text);background-color:var(--vp-custom-block-tip-bg)}.custom-block.tip a,.custom-block.tip code{color:var(--vp-c-tip-1)}.custom-block.tip a:hover,.custom-block.tip a:hover>code{color:var(--vp-c-tip-2)}.custom-block.tip code{background-color:var(--vp-custom-block-tip-code-bg)}.custom-block.important{border-color:var(--vp-custom-block-important-border);color:var(--vp-custom-block-important-text);background-color:var(--vp-custom-block-important-bg)}.custom-block.important a,.custom-block.important code{color:var(--vp-c-important-1)}.custom-block.important a:hover,.custom-block.important a:hover>code{color:var(--vp-c-important-2)}.custom-block.important code{background-color:var(--vp-custom-block-important-code-bg)}.custom-block.warning{border-color:var(--vp-custom-block-warning-border);color:var(--vp-custom-block-warning-text);background-color:var(--vp-custom-block-warning-bg)}.custom-block.warning a,.custom-block.warning code{color:var(--vp-c-warning-1)}.custom-block.warning a:hover,.custom-block.warning a:hover>code{color:var(--vp-c-warning-2)}.custom-block.warning code{background-color:var(--vp-custom-block-warning-code-bg)}.custom-block.danger{border-color:var(--vp-custom-block-danger-border);color:var(--vp-custom-block-danger-text);background-color:var(--vp-custom-block-danger-bg)}.custom-block.danger a,.custom-block.danger code{color:var(--vp-c-danger-1)}.custom-block.danger a:hover,.custom-block.danger a:hover>code{color:var(--vp-c-danger-2)}.custom-block.danger code{background-color:var(--vp-custom-block-danger-code-bg)}.custom-block.caution{border-color:var(--vp-custom-block-caution-border);color:var(--vp-custom-block-caution-text);background-color:var(--vp-custom-block-caution-bg)}.custom-block.caution a,.custom-block.caution code{color:var(--vp-c-caution-1)}.custom-block.caution a:hover,.custom-block.caution a:hover>code{color:var(--vp-c-caution-2)}.custom-block.caution code{background-color:var(--vp-custom-block-caution-code-bg)}.custom-block.details{border-color:var(--vp-custom-block-details-border);color:var(--vp-custom-block-details-text);background-color:var(--vp-custom-block-details-bg)}.custom-block.details a{color:var(--vp-c-brand-1)}.custom-block.details a:hover,.custom-block.details a:hover>code{color:var(--vp-c-brand-2)}.custom-block.details code{background-color:var(--vp-custom-block-details-code-bg)}.custom-block-title{font-weight:600}.custom-block p+p{margin:8px 0}.custom-block.details summary{margin:0 0 8px;font-weight:700;cursor:pointer;-webkit-user-select:none;user-select:none}.custom-block.details summary+p{margin:8px 0}.custom-block a{color:inherit;font-weight:600;text-decoration:underline;text-underline-offset:2px;transition:opacity .25s}.custom-block a:hover{opacity:.75}.custom-block code{font-size:var(--vp-custom-block-code-font-size)}.custom-block.custom-block th,.custom-block.custom-block blockquote>p{font-size:var(--vp-custom-block-font-size);color:inherit}.dark .vp-code span{color:var(--shiki-dark, inherit)}html:not(.dark) .vp-code span{color:var(--shiki-light, inherit)}.vp-code-group{margin-top:16px}.vp-code-group .tabs{position:relative;display:flex;margin-right:-24px;margin-left:-24px;padding:0 12px;background-color:var(--vp-code-tab-bg);overflow-x:auto;overflow-y:hidden;box-shadow:inset 0 -1px var(--vp-code-tab-divider)}@media (min-width: 640px){.vp-code-group .tabs{margin-right:0;margin-left:0;border-radius:8px 8px 0 0}}.vp-code-group .tabs input{position:fixed;opacity:0;pointer-events:none}.vp-code-group .tabs label{position:relative;display:inline-block;border-bottom:1px solid transparent;padding:0 12px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-code-tab-text-color);white-space:nowrap;cursor:pointer;transition:color .25s}.vp-code-group .tabs label:after{position:absolute;right:8px;bottom:-1px;left:8px;z-index:1;height:2px;border-radius:2px;content:"";background-color:transparent;transition:background-color .25s}.vp-code-group label:hover{color:var(--vp-code-tab-hover-text-color)}.vp-code-group input:checked+label{color:var(--vp-code-tab-active-text-color)}.vp-code-group input:checked+label:after{background-color:var(--vp-code-tab-active-bar-color)}.vp-code-group div[class*=language-],.vp-block{display:none;margin-top:0!important;border-top-left-radius:0!important;border-top-right-radius:0!important}.vp-code-group div[class*=language-].active,.vp-block.active{display:block}.vp-block{padding:20px 24px}.vp-doc h1,.vp-doc h2,.vp-doc h3,.vp-doc h4,.vp-doc h5,.vp-doc h6{position:relative;font-weight:600;outline:none}.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:28px}.vp-doc h2{margin:48px 0 16px;border-top:1px solid var(--vp-c-divider);padding-top:24px;letter-spacing:-.02em;line-height:32px;font-size:24px}.vp-doc h3{margin:32px 0 0;letter-spacing:-.01em;line-height:28px;font-size:20px}.vp-doc h4{margin:24px 0 0;letter-spacing:-.01em;line-height:24px;font-size:18px}.vp-doc .header-anchor{position:absolute;top:0;left:0;margin-left:-.87em;font-weight:500;-webkit-user-select:none;user-select:none;opacity:0;text-decoration:none;transition:color .25s,opacity .25s}.vp-doc .header-anchor:before{content:var(--vp-header-anchor-symbol)}.vp-doc h1:hover .header-anchor,.vp-doc h1 .header-anchor:focus,.vp-doc h2:hover .header-anchor,.vp-doc h2 .header-anchor:focus,.vp-doc h3:hover .header-anchor,.vp-doc h3 .header-anchor:focus,.vp-doc h4:hover .header-anchor,.vp-doc h4 .header-anchor:focus,.vp-doc h5:hover .header-anchor,.vp-doc h5 .header-anchor:focus,.vp-doc h6:hover .header-anchor,.vp-doc h6 .header-anchor:focus{opacity:1}@media (min-width: 768px){.vp-doc h1{letter-spacing:-.02em;line-height:40px;font-size:32px}}.vp-doc h2 .header-anchor{top:24px}.vp-doc p,.vp-doc summary{margin:16px 0}.vp-doc p{line-height:28px}.vp-doc blockquote{margin:16px 0;border-left:2px solid var(--vp-c-divider);padding-left:16px;transition:border-color .5s;color:var(--vp-c-text-2)}.vp-doc blockquote>p{margin:0;font-size:16px;transition:color .5s}.vp-doc a{font-weight:500;color:var(--vp-c-brand-1);text-decoration:underline;text-underline-offset:2px;transition:color .25s,opacity .25s}.vp-doc a:hover{color:var(--vp-c-brand-2)}.vp-doc strong{font-weight:600}.vp-doc ul,.vp-doc ol{padding-left:1.25rem;margin:16px 0}.vp-doc ul{list-style:disc}.vp-doc ol{list-style:decimal}.vp-doc li+li{margin-top:8px}.vp-doc li>ol,.vp-doc li>ul{margin:8px 0 0}.vp-doc table{display:block;border-collapse:collapse;margin:20px 0;overflow-x:auto}.vp-doc tr{background-color:var(--vp-c-bg);border-top:1px solid var(--vp-c-divider);transition:background-color .5s}.vp-doc tr:nth-child(2n){background-color:var(--vp-c-bg-soft)}.vp-doc th,.vp-doc td{border:1px solid var(--vp-c-divider);padding:8px 16px}.vp-doc th{text-align:left;font-size:14px;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-doc td{font-size:14px}.vp-doc hr{margin:16px 0;border:none;border-top:1px solid var(--vp-c-divider)}.vp-doc .custom-block{margin:16px 0}.vp-doc .custom-block p{margin:8px 0;line-height:24px}.vp-doc .custom-block p:first-child{margin:0}.vp-doc .custom-block div[class*=language-]{margin:8px 0;border-radius:8px}.vp-doc .custom-block div[class*=language-] code{font-weight:400;background-color:transparent}.vp-doc .custom-block .vp-code-group .tabs{margin:0;border-radius:8px 8px 0 0}.vp-doc :not(pre,h1,h2,h3,h4,h5,h6)>code{font-size:var(--vp-code-font-size);color:var(--vp-code-color)}.vp-doc :not(pre)>code{border-radius:4px;padding:3px 6px;background-color:var(--vp-code-bg);transition:color .25s,background-color .5s}.vp-doc a>code{color:var(--vp-code-link-color)}.vp-doc a:hover>code{color:var(--vp-code-link-hover-color)}.vp-doc h1>code,.vp-doc h2>code,.vp-doc h3>code,.vp-doc h4>code{font-size:.9em}.vp-doc div[class*=language-],.vp-block{position:relative;margin:16px -24px;background-color:var(--vp-code-block-bg);overflow-x:auto;transition:background-color .5s}@media (min-width: 640px){.vp-doc div[class*=language-],.vp-block{border-radius:8px;margin:16px 0}}@media (max-width: 639px){.vp-doc li div[class*=language-]{border-radius:8px 0 0 8px}}.vp-doc div[class*=language-]+div[class*=language-],.vp-doc div[class$=-api]+div[class*=language-],.vp-doc div[class*=language-]+div[class$=-api]>div[class*=language-]{margin-top:-8px}.vp-doc [class*=language-] pre,.vp-doc [class*=language-] code{direction:ltr;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}.vp-doc [class*=language-] pre{position:relative;z-index:1;margin:0;padding:20px 0;background:transparent;overflow-x:auto}.vp-doc [class*=language-] code{display:block;padding:0 24px;width:fit-content;min-width:100%;line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-block-color);transition:color .5s}.vp-doc [class*=language-] code .highlighted{background-color:var(--vp-code-line-highlight-color);transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .highlighted.error{background-color:var(--vp-code-line-error-color)}.vp-doc [class*=language-] code .highlighted.warning{background-color:var(--vp-code-line-warning-color)}.vp-doc [class*=language-] code .diff{transition:background-color .5s;margin:0 -24px;padding:0 24px;width:calc(100% + 48px);display:inline-block}.vp-doc [class*=language-] code .diff:before{position:absolute;left:10px}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){filter:blur(.095rem);opacity:.4;transition:filter .35s,opacity .35s}.vp-doc [class*=language-] .has-focused-lines .line:not(.has-focus){opacity:.7;transition:filter .35s,opacity .35s}.vp-doc [class*=language-]:hover .has-focused-lines .line:not(.has-focus){filter:blur(0);opacity:1}.vp-doc [class*=language-] code .diff.remove{background-color:var(--vp-code-line-diff-remove-color);opacity:.7}.vp-doc [class*=language-] code .diff.remove:before{content:"-";color:var(--vp-code-line-diff-remove-symbol-color)}.vp-doc [class*=language-] code .diff.add{background-color:var(--vp-code-line-diff-add-color)}.vp-doc [class*=language-] code .diff.add:before{content:"+";color:var(--vp-code-line-diff-add-symbol-color)}.vp-doc div[class*=language-].line-numbers-mode{padding-left:32px}.vp-doc .line-numbers-wrapper{position:absolute;top:0;bottom:0;left:0;z-index:3;border-right:1px solid var(--vp-code-block-divider-color);padding-top:20px;width:32px;text-align:center;font-family:var(--vp-font-family-mono);line-height:var(--vp-code-line-height);font-size:var(--vp-code-font-size);color:var(--vp-code-line-number-color);transition:border-color .5s,color .5s}.vp-doc [class*=language-]>button.copy{direction:ltr;position:absolute;top:12px;right:12px;z-index:3;border:1px solid var(--vp-code-copy-code-border-color);border-radius:4px;width:40px;height:40px;background-color:var(--vp-code-copy-code-bg);opacity:0;cursor:pointer;background-image:var(--vp-icon-copy);background-position:50%;background-size:20px;background-repeat:no-repeat;transition:border-color .25s,background-color .25s,opacity .25s}.vp-doc [class*=language-]:hover>button.copy,.vp-doc [class*=language-]>button.copy:focus{opacity:1}.vp-doc [class*=language-]>button.copy:hover,.vp-doc [class*=language-]>button.copy.copied{border-color:var(--vp-code-copy-code-hover-border-color);background-color:var(--vp-code-copy-code-hover-bg)}.vp-doc [class*=language-]>button.copy.copied,.vp-doc [class*=language-]>button.copy:hover.copied{border-radius:0 4px 4px 0;background-color:var(--vp-code-copy-code-hover-bg);background-image:var(--vp-icon-copied)}.vp-doc [class*=language-]>button.copy.copied:before,.vp-doc [class*=language-]>button.copy:hover.copied:before{position:relative;top:-1px;transform:translate(calc(-100% - 1px));display:flex;justify-content:center;align-items:center;border:1px solid var(--vp-code-copy-code-hover-border-color);border-right:0;border-radius:4px 0 0 4px;padding:0 10px;width:fit-content;height:40px;text-align:center;font-size:12px;font-weight:500;color:var(--vp-code-copy-code-active-text);background-color:var(--vp-code-copy-code-hover-bg);white-space:nowrap;content:var(--vp-code-copy-copied-text-content)}.vp-doc [class*=language-]>span.lang{position:absolute;top:2px;right:8px;z-index:2;font-size:12px;font-weight:500;color:var(--vp-code-lang-color);transition:color .4s,opacity .4s}.vp-doc [class*=language-]:hover>button.copy+span.lang,.vp-doc [class*=language-]>button.copy:focus+span.lang{opacity:0}.vp-doc .VPTeamMembers{margin-top:24px}.vp-doc .VPTeamMembers.small.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}.vp-doc .VPTeamMembers.small.count-2 .container,.vp-doc .VPTeamMembers.small.count-3 .container{max-width:100%!important}.vp-doc .VPTeamMembers.medium.count-1 .container{margin:0!important;max-width:calc((100% - 24px)/2)!important}:is(.vp-external-link-icon,.vp-doc a[href*="://"],.vp-doc a[target=_blank]):not(.no-icon):after{display:inline-block;margin-top:-1px;margin-left:4px;width:11px;height:11px;background:currentColor;color:var(--vp-c-text-3);flex-shrink:0;--icon: url("data:image/svg+xml, %3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' %3E%3Cpath d='M0 0h24v24H0V0z' fill='none' /%3E%3Cpath d='M9 5v2h6.59L4 18.59 5.41 20 17 8.41V15h2V5H9z' /%3E%3C/svg%3E");-webkit-mask-image:var(--icon);mask-image:var(--icon)}.vp-external-link-icon:after{content:""}.external-link-icon-enabled :is(.vp-doc a[href*="://"],.vp-doc a[target=_blank]):after{content:"";color:currentColor}.vp-sponsor{border-radius:16px;overflow:hidden}.vp-sponsor.aside{border-radius:12px}.vp-sponsor-section+.vp-sponsor-section{margin-top:4px}.vp-sponsor-tier{margin:0 0 4px!important;text-align:center;letter-spacing:1px!important;line-height:24px;width:100%;font-weight:600;color:var(--vp-c-text-2);background-color:var(--vp-c-bg-soft)}.vp-sponsor.normal .vp-sponsor-tier{padding:13px 0 11px;font-size:14px}.vp-sponsor.aside .vp-sponsor-tier{padding:9px 0 7px;font-size:12px}.vp-sponsor-grid+.vp-sponsor-tier{margin-top:4px}.vp-sponsor-grid{display:flex;flex-wrap:wrap;gap:4px}.vp-sponsor-grid.xmini .vp-sponsor-grid-link{height:64px}.vp-sponsor-grid.xmini .vp-sponsor-grid-image{max-width:64px;max-height:22px}.vp-sponsor-grid.mini .vp-sponsor-grid-link{height:72px}.vp-sponsor-grid.mini .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.small .vp-sponsor-grid-link{height:96px}.vp-sponsor-grid.small .vp-sponsor-grid-image{max-width:96px;max-height:24px}.vp-sponsor-grid.medium .vp-sponsor-grid-link{height:112px}.vp-sponsor-grid.medium .vp-sponsor-grid-image{max-width:120px;max-height:36px}.vp-sponsor-grid.big .vp-sponsor-grid-link{height:184px}.vp-sponsor-grid.big .vp-sponsor-grid-image{max-width:192px;max-height:56px}.vp-sponsor-grid[data-vp-grid="2"] .vp-sponsor-grid-item{width:calc((100% - 4px)/2)}.vp-sponsor-grid[data-vp-grid="3"] .vp-sponsor-grid-item{width:calc((100% - 4px * 2) / 3)}.vp-sponsor-grid[data-vp-grid="4"] .vp-sponsor-grid-item{width:calc((100% - 12px)/4)}.vp-sponsor-grid[data-vp-grid="5"] .vp-sponsor-grid-item{width:calc((100% - 16px)/5)}.vp-sponsor-grid[data-vp-grid="6"] .vp-sponsor-grid-item{width:calc((100% - 4px * 5) / 6)}.vp-sponsor-grid-item{flex-shrink:0;width:100%;background-color:var(--vp-c-bg-soft);transition:background-color .25s}.vp-sponsor-grid-item:hover{background-color:var(--vp-c-default-soft)}.vp-sponsor-grid-item:hover .vp-sponsor-grid-image{filter:grayscale(0) invert(0)}.vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.dark .vp-sponsor-grid-item:hover{background-color:var(--vp-c-white)}.dark .vp-sponsor-grid-item.empty:hover{background-color:var(--vp-c-bg-soft)}.vp-sponsor-grid-link{display:flex}.vp-sponsor-grid-box{display:flex;justify-content:center;align-items:center;width:100%}.vp-sponsor-grid-image{max-width:100%;filter:grayscale(1);transition:filter .25s}.dark .vp-sponsor-grid-image{filter:grayscale(1) invert(1)}.VPBadge{display:inline-block;margin-left:2px;border:1px solid transparent;border-radius:12px;padding:0 10px;line-height:22px;font-size:12px;font-weight:500;transform:translateY(-2px)}.VPBadge.small{padding:0 6px;line-height:18px;font-size:10px;transform:translateY(-8px)}.VPDocFooter .VPBadge{display:none}.vp-doc h1>.VPBadge{margin-top:4px;vertical-align:top}.vp-doc h2>.VPBadge{margin-top:3px;padding:0 8px;vertical-align:top}.vp-doc h3>.VPBadge{vertical-align:middle}.vp-doc h4>.VPBadge,.vp-doc h5>.VPBadge,.vp-doc h6>.VPBadge{vertical-align:middle;line-height:18px}.VPBadge.info{border-color:var(--vp-badge-info-border);color:var(--vp-badge-info-text);background-color:var(--vp-badge-info-bg)}.VPBadge.tip{border-color:var(--vp-badge-tip-border);color:var(--vp-badge-tip-text);background-color:var(--vp-badge-tip-bg)}.VPBadge.warning{border-color:var(--vp-badge-warning-border);color:var(--vp-badge-warning-text);background-color:var(--vp-badge-warning-bg)}.VPBadge.danger{border-color:var(--vp-badge-danger-border);color:var(--vp-badge-danger-text);background-color:var(--vp-badge-danger-bg)}.VPBackdrop[data-v-20b1d393]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:var(--vp-z-index-backdrop);background:var(--vp-backdrop-bg-color);transition:opacity .5s}.VPBackdrop.fade-enter-from[data-v-20b1d393],.VPBackdrop.fade-leave-to[data-v-20b1d393]{opacity:0}.VPBackdrop.fade-leave-active[data-v-20b1d393]{transition-duration:.25s}@media (min-width: 1280px){.VPBackdrop[data-v-20b1d393]{display:none}}.NotFound[data-v-21980364]{padding:64px 24px 96px;text-align:center}@media (min-width: 768px){.NotFound[data-v-21980364]{padding:96px 32px 168px}}.code[data-v-21980364]{line-height:64px;font-size:64px;font-weight:600}.title[data-v-21980364]{padding-top:12px;letter-spacing:2px;line-height:20px;font-size:20px;font-weight:700}.divider[data-v-21980364]{margin:24px auto 18px;width:64px;height:1px;background-color:var(--vp-c-divider)}.quote[data-v-21980364]{margin:0 auto;max-width:256px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.action[data-v-21980364]{padding-top:20px}.link[data-v-21980364]{display:inline-block;border:1px solid var(--vp-c-brand-1);border-radius:16px;padding:3px 16px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:border-color .25s,color .25s}.link[data-v-21980364]:hover{border-color:var(--vp-c-brand-2);color:var(--vp-c-brand-2)}.root[data-v-51c2c770]{position:relative;z-index:1}.nested[data-v-51c2c770]{padding-right:16px;padding-left:16px}.outline-link[data-v-51c2c770]{display:block;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .5s}.outline-link[data-v-51c2c770]:hover,.outline-link.active[data-v-51c2c770]{color:var(--vp-c-text-1);transition:color .25s}.outline-link.nested[data-v-51c2c770]{padding-left:13px}.VPDocAsideOutline[data-v-e7b12e6e]{display:none}.VPDocAsideOutline.has-outline[data-v-e7b12e6e]{display:block}.content[data-v-e7b12e6e]{position:relative;border-left:1px solid var(--vp-c-divider);padding-left:16px;font-size:13px;font-weight:500}.outline-marker[data-v-e7b12e6e]{position:absolute;top:32px;left:-1px;z-index:0;opacity:0;width:2px;border-radius:2px;height:18px;background-color:var(--vp-c-brand-1);transition:top .25s cubic-bezier(0,1,.5,1),background-color .5s,opacity .25s}.outline-title[data-v-e7b12e6e]{line-height:32px;font-size:14px;font-weight:600}.VPDocAside[data-v-0ff3c77f]{display:flex;flex-direction:column;flex-grow:1}.spacer[data-v-0ff3c77f]{flex-grow:1}.VPDocAside[data-v-0ff3c77f] .spacer+.VPDocAsideSponsors,.VPDocAside[data-v-0ff3c77f] .spacer+.VPDocAsideCarbonAds{margin-top:24px}.VPDocAside[data-v-0ff3c77f] .VPDocAsideSponsors+.VPDocAsideCarbonAds{margin-top:16px}.VPLastUpdated[data-v-5cebc0fc]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 640px){.VPLastUpdated[data-v-5cebc0fc]{line-height:32px;font-size:14px;font-weight:500}}.VPDocFooter[data-v-a4b38bd6]{margin-top:64px}.edit-info[data-v-a4b38bd6]{padding-bottom:18px}@media (min-width: 640px){.edit-info[data-v-a4b38bd6]{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px}}.edit-link-button[data-v-a4b38bd6]{display:flex;align-items:center;border:0;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.edit-link-button[data-v-a4b38bd6]:hover{color:var(--vp-c-brand-2)}.edit-link-icon[data-v-a4b38bd6]{margin-right:8px}.prev-next[data-v-a4b38bd6]{border-top:1px solid var(--vp-c-divider);padding-top:24px;display:grid;grid-row-gap:8px}@media (min-width: 640px){.prev-next[data-v-a4b38bd6]{grid-template-columns:repeat(2,1fr);grid-column-gap:16px}}.pager-link[data-v-a4b38bd6]{display:block;border:1px solid var(--vp-c-divider);border-radius:8px;padding:11px 16px 13px;width:100%;height:100%;transition:border-color .25s}.pager-link[data-v-a4b38bd6]:hover{border-color:var(--vp-c-brand-1)}.pager-link.next[data-v-a4b38bd6]{margin-left:auto;text-align:right}.desc[data-v-a4b38bd6]{display:block;line-height:20px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.title[data-v-a4b38bd6]{display:block;line-height:20px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1);transition:color .25s}.VPDoc[data-v-40342069]{padding:32px 24px 96px;width:100%}@media (min-width: 768px){.VPDoc[data-v-40342069]{padding:48px 32px 128px}}@media (min-width: 960px){.VPDoc[data-v-40342069]{padding:48px 32px 0}.VPDoc:not(.has-sidebar) .container[data-v-40342069]{display:flex;justify-content:center;max-width:992px}.VPDoc:not(.has-sidebar) .content[data-v-40342069]{max-width:752px}}@media (min-width: 1280px){.VPDoc .container[data-v-40342069]{display:flex;justify-content:center}.VPDoc .aside[data-v-40342069]{display:block}}@media (min-width: 1440px){.VPDoc:not(.has-sidebar) .content[data-v-40342069]{max-width:784px}.VPDoc:not(.has-sidebar) .container[data-v-40342069]{max-width:1104px}}.container[data-v-40342069]{margin:0 auto;width:100%}.aside[data-v-40342069]{position:relative;display:none;order:2;flex-grow:1;padding-left:32px;width:100%;max-width:256px}.left-aside[data-v-40342069]{order:1;padding-left:unset;padding-right:32px}.aside-container[data-v-40342069]{position:fixed;top:0;padding-top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + var(--vp-doc-top-height, 0px) + 48px);width:224px;height:100vh;overflow-x:hidden;overflow-y:auto;scrollbar-width:none}.aside-container[data-v-40342069]::-webkit-scrollbar{display:none}.aside-curtain[data-v-40342069]{position:fixed;bottom:0;z-index:10;width:224px;height:32px;background:linear-gradient(transparent,var(--vp-c-bg) 70%)}.aside-content[data-v-40342069]{display:flex;flex-direction:column;min-height:calc(100vh - (var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px));padding-bottom:32px}.content[data-v-40342069]{position:relative;margin:0 auto;width:100%}@media (min-width: 960px){.content[data-v-40342069]{padding:0 32px 128px}}@media (min-width: 1280px){.content[data-v-40342069]{order:1;margin:0;min-width:640px}}.content-container[data-v-40342069]{margin:0 auto}.VPDoc.has-aside .content-container[data-v-40342069]{max-width:688px}.VPButton[data-v-885c6978]{display:inline-block;border:1px solid transparent;text-align:center;font-weight:600;white-space:nowrap;transition:color .25s,border-color .25s,background-color .25s}.VPButton[data-v-885c6978]:active{transition:color .1s,border-color .1s,background-color .1s}.VPButton.medium[data-v-885c6978]{border-radius:20px;padding:0 20px;line-height:38px;font-size:14px}.VPButton.big[data-v-885c6978]{border-radius:24px;padding:0 24px;line-height:46px;font-size:16px}.VPButton.brand[data-v-885c6978]{border-color:var(--vp-button-brand-border);color:var(--vp-button-brand-text);background-color:var(--vp-button-brand-bg)}.VPButton.brand[data-v-885c6978]:hover{border-color:var(--vp-button-brand-hover-border);color:var(--vp-button-brand-hover-text);background-color:var(--vp-button-brand-hover-bg)}.VPButton.brand[data-v-885c6978]:active{border-color:var(--vp-button-brand-active-border);color:var(--vp-button-brand-active-text);background-color:var(--vp-button-brand-active-bg)}.VPButton.alt[data-v-885c6978]{border-color:var(--vp-button-alt-border);color:var(--vp-button-alt-text);background-color:var(--vp-button-alt-bg)}.VPButton.alt[data-v-885c6978]:hover{border-color:var(--vp-button-alt-hover-border);color:var(--vp-button-alt-hover-text);background-color:var(--vp-button-alt-hover-bg)}.VPButton.alt[data-v-885c6978]:active{border-color:var(--vp-button-alt-active-border);color:var(--vp-button-alt-active-text);background-color:var(--vp-button-alt-active-bg)}.VPButton.sponsor[data-v-885c6978]{border-color:var(--vp-button-sponsor-border);color:var(--vp-button-sponsor-text);background-color:var(--vp-button-sponsor-bg)}.VPButton.sponsor[data-v-885c6978]:hover{border-color:var(--vp-button-sponsor-hover-border);color:var(--vp-button-sponsor-hover-text);background-color:var(--vp-button-sponsor-hover-bg)}.VPButton.sponsor[data-v-885c6978]:active{border-color:var(--vp-button-sponsor-active-border);color:var(--vp-button-sponsor-active-text);background-color:var(--vp-button-sponsor-active-bg)}html:not(.dark) .VPImage.dark[data-v-f925500d]{display:none}.dark .VPImage.light[data-v-f925500d]{display:none}.VPHero[data-v-325add7b]{margin-top:calc((var(--vp-nav-height) + var(--vp-layout-top-height, 0px)) * -1);padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 48px) 24px 48px}@media (min-width: 640px){.VPHero[data-v-325add7b]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 48px 64px}}@media (min-width: 960px){.VPHero[data-v-325add7b]{padding:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px) + 80px) 64px 64px}}.container[data-v-325add7b]{display:flex;flex-direction:column;margin:0 auto;max-width:1152px}@media (min-width: 960px){.container[data-v-325add7b]{flex-direction:row}}.main[data-v-325add7b]{position:relative;z-index:10;order:2;flex-grow:1;flex-shrink:0}.VPHero.has-image .container[data-v-325add7b]{text-align:center}@media (min-width: 960px){.VPHero.has-image .container[data-v-325add7b]{text-align:left}}@media (min-width: 960px){.main[data-v-325add7b]{order:1;width:calc((100% / 3) * 2)}.VPHero.has-image .main[data-v-325add7b]{max-width:592px}}.name[data-v-325add7b],.text[data-v-325add7b]{max-width:392px;letter-spacing:-.4px;line-height:40px;font-size:32px;font-weight:700;white-space:pre-wrap}.VPHero.has-image .name[data-v-325add7b],.VPHero.has-image .text[data-v-325add7b]{margin:0 auto}.name[data-v-325add7b]{color:var(--vp-home-hero-name-color)}.clip[data-v-325add7b]{background:var(--vp-home-hero-name-background);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:var(--vp-home-hero-name-color)}@media (min-width: 640px){.name[data-v-325add7b],.text[data-v-325add7b]{max-width:576px;line-height:56px;font-size:48px}}@media (min-width: 960px){.name[data-v-325add7b],.text[data-v-325add7b]{line-height:64px;font-size:56px}.VPHero.has-image .name[data-v-325add7b],.VPHero.has-image .text[data-v-325add7b]{margin:0}}.tagline[data-v-325add7b]{padding-top:8px;max-width:392px;line-height:28px;font-size:18px;font-weight:500;white-space:pre-wrap;color:var(--vp-c-text-2)}.VPHero.has-image .tagline[data-v-325add7b]{margin:0 auto}@media (min-width: 640px){.tagline[data-v-325add7b]{padding-top:12px;max-width:576px;line-height:32px;font-size:20px}}@media (min-width: 960px){.tagline[data-v-325add7b]{line-height:36px;font-size:24px}.VPHero.has-image .tagline[data-v-325add7b]{margin:0}}.actions[data-v-325add7b]{display:flex;flex-wrap:wrap;margin:-6px;padding-top:24px}.VPHero.has-image .actions[data-v-325add7b]{justify-content:center}@media (min-width: 640px){.actions[data-v-325add7b]{padding-top:32px}}@media (min-width: 960px){.VPHero.has-image .actions[data-v-325add7b]{justify-content:flex-start}}.action[data-v-325add7b]{flex-shrink:0;padding:6px}.image[data-v-325add7b]{order:1;margin:-76px -24px -48px}@media (min-width: 640px){.image[data-v-325add7b]{margin:-108px -24px -48px}}@media (min-width: 960px){.image[data-v-325add7b]{flex-grow:1;order:2;margin:0;min-height:100%}}.image-container[data-v-325add7b]{position:relative;margin:0 auto;width:320px;height:320px}@media (min-width: 640px){.image-container[data-v-325add7b]{width:392px;height:392px}}@media (min-width: 960px){.image-container[data-v-325add7b]{display:flex;justify-content:center;align-items:center;width:100%;height:100%;transform:translate(-32px,-32px)}}.image-bg[data-v-325add7b]{position:absolute;top:50%;left:50%;border-radius:50%;width:192px;height:192px;background-image:var(--vp-home-hero-image-background-image);filter:var(--vp-home-hero-image-filter);transform:translate(-50%,-50%)}@media (min-width: 640px){.image-bg[data-v-325add7b]{width:256px;height:256px}}@media (min-width: 960px){.image-bg[data-v-325add7b]{width:320px;height:320px}}[data-v-325add7b] .image-src{position:absolute;top:50%;left:50%;max-width:192px;max-height:192px;transform:translate(-50%,-50%)}@media (min-width: 640px){[data-v-325add7b] .image-src{max-width:256px;max-height:256px}}@media (min-width: 960px){[data-v-325add7b] .image-src{max-width:320px;max-height:320px}}.VPFeature[data-v-248ed6b6]{display:block;border:1px solid var(--vp-c-bg-soft);border-radius:12px;height:100%;background-color:var(--vp-c-bg-soft);transition:border-color .25s,background-color .25s}.VPFeature.link[data-v-248ed6b6]:hover{border-color:var(--vp-c-brand-1)}.box[data-v-248ed6b6]{display:flex;flex-direction:column;padding:24px;height:100%}.box[data-v-248ed6b6]>.VPImage{margin-bottom:20px}.icon[data-v-248ed6b6]{display:flex;justify-content:center;align-items:center;margin-bottom:20px;border-radius:6px;background-color:var(--vp-c-default-soft);width:48px;height:48px;font-size:24px;transition:background-color .25s}.title[data-v-248ed6b6]{line-height:24px;font-size:16px;font-weight:600}.details[data-v-248ed6b6]{flex-grow:1;padding-top:8px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.link-text[data-v-248ed6b6]{padding-top:8px}.link-text-value[data-v-248ed6b6]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.link-text-icon[data-v-248ed6b6]{margin-left:6px}.VPFeatures[data-v-dbb08ed4]{position:relative;padding:0 24px}@media (min-width: 640px){.VPFeatures[data-v-dbb08ed4]{padding:0 48px}}@media (min-width: 960px){.VPFeatures[data-v-dbb08ed4]{padding:0 64px}}.container[data-v-dbb08ed4]{margin:0 auto;max-width:1152px}.items[data-v-dbb08ed4]{display:flex;flex-wrap:wrap;margin:-8px}.item[data-v-dbb08ed4]{padding:8px;width:100%}@media (min-width: 640px){.item.grid-2[data-v-dbb08ed4],.item.grid-4[data-v-dbb08ed4],.item.grid-6[data-v-dbb08ed4]{width:50%}}@media (min-width: 768px){.item.grid-2[data-v-dbb08ed4],.item.grid-4[data-v-dbb08ed4]{width:50%}.item.grid-3[data-v-dbb08ed4],.item.grid-6[data-v-dbb08ed4]{width:calc(100% / 3)}}@media (min-width: 960px){.item.grid-4[data-v-dbb08ed4]{width:25%}}.container[data-v-bb690f02]{margin:auto;width:100%;max-width:1280px;padding:0 24px}@media (min-width: 640px){.container[data-v-bb690f02]{padding:0 48px}}@media (min-width: 960px){.container[data-v-bb690f02]{width:100%;padding:0 64px}}.vp-doc[data-v-bb690f02] .VPHomeSponsors,.vp-doc[data-v-bb690f02] .VPTeamPage{margin-left:var(--vp-offset, calc(50% - 50vw) );margin-right:var(--vp-offset, calc(50% - 50vw) )}.vp-doc[data-v-bb690f02] .VPHomeSponsors h2{border-top:none;letter-spacing:normal}.vp-doc[data-v-bb690f02] .VPHomeSponsors a,.vp-doc[data-v-bb690f02] .VPTeamPage a{text-decoration:none}.VPHome[data-v-972a96f9]{margin-bottom:96px}@media (min-width: 768px){.VPHome[data-v-972a96f9]{margin-bottom:128px}}.VPContent[data-v-ec7dbf3e]{flex-grow:1;flex-shrink:0;margin:var(--vp-layout-top-height, 0px) auto 0;width:100%}.VPContent.is-home[data-v-ec7dbf3e]{width:100%;max-width:100%}.VPContent.has-sidebar[data-v-ec7dbf3e]{margin:0}@media (min-width: 960px){.VPContent[data-v-ec7dbf3e]{padding-top:var(--vp-nav-height)}.VPContent.has-sidebar[data-v-ec7dbf3e]{margin:var(--vp-layout-top-height, 0px) 0 0;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPContent.has-sidebar[data-v-ec7dbf3e]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.VPFooter[data-v-e3ca6860]{position:relative;z-index:var(--vp-z-index-footer);border-top:1px solid var(--vp-c-gutter);padding:32px 24px;background-color:var(--vp-c-bg)}.VPFooter.has-sidebar[data-v-e3ca6860]{display:none}.VPFooter[data-v-e3ca6860] a{text-decoration-line:underline;text-underline-offset:2px;transition:color .25s}.VPFooter[data-v-e3ca6860] a:hover{color:var(--vp-c-text-1)}@media (min-width: 768px){.VPFooter[data-v-e3ca6860]{padding:32px}}.container[data-v-e3ca6860]{margin:0 auto;max-width:var(--vp-layout-max-width);text-align:center}.message[data-v-e3ca6860],.copyright[data-v-e3ca6860]{line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-2)}.VPLocalNavOutlineDropdown[data-v-b418bf42]{padding:12px 20px 11px}@media (min-width: 960px){.VPLocalNavOutlineDropdown[data-v-b418bf42]{padding:12px 36px 11px}}.VPLocalNavOutlineDropdown button[data-v-b418bf42]{display:block;font-size:12px;font-weight:500;line-height:24px;color:var(--vp-c-text-2);transition:color .5s;position:relative}.VPLocalNavOutlineDropdown button[data-v-b418bf42]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPLocalNavOutlineDropdown button.open[data-v-b418bf42]{color:var(--vp-c-text-1)}.icon[data-v-b418bf42]{display:inline-block;vertical-align:middle;margin-left:2px;font-size:14px;transform:rotate(0);transition:transform .25s}@media (min-width: 960px){.VPLocalNavOutlineDropdown button[data-v-b418bf42]{font-size:14px}.icon[data-v-b418bf42]{font-size:16px}}.open>.icon[data-v-b418bf42]{transform:rotate(90deg)}.items[data-v-b418bf42]{position:absolute;top:40px;right:16px;left:16px;display:grid;gap:1px;border:1px solid var(--vp-c-border);border-radius:8px;background-color:var(--vp-c-gutter);max-height:calc(var(--vp-vh, 100vh) - 86px);overflow:hidden auto;box-shadow:var(--vp-shadow-3)}@media (min-width: 960px){.items[data-v-b418bf42]{right:auto;left:calc(var(--vp-sidebar-width) + 32px);width:320px}}.header[data-v-b418bf42]{background-color:var(--vp-c-bg-soft)}.top-link[data-v-b418bf42]{display:block;padding:0 16px;line-height:48px;font-size:14px;font-weight:500;color:var(--vp-c-brand-1)}.outline[data-v-b418bf42]{padding:8px 0;background-color:var(--vp-c-bg-soft)}.flyout-enter-active[data-v-b418bf42]{transition:all .2s ease-out}.flyout-leave-active[data-v-b418bf42]{transition:all .15s ease-in}.flyout-enter-from[data-v-b418bf42],.flyout-leave-to[data-v-b418bf42]{opacity:0;transform:translateY(-16px)}.VPLocalNav[data-v-8af612ea]{position:sticky;top:0;left:0;z-index:var(--vp-z-index-local-nav);border-bottom:1px solid var(--vp-c-gutter);padding-top:var(--vp-layout-top-height, 0px);width:100%;background-color:var(--vp-local-nav-bg-color)}.VPLocalNav.fixed[data-v-8af612ea]{position:fixed}@media (min-width: 960px){.VPLocalNav[data-v-8af612ea]{top:var(--vp-nav-height)}.VPLocalNav.has-sidebar[data-v-8af612ea]{padding-left:var(--vp-sidebar-width)}.VPLocalNav.empty[data-v-8af612ea]{display:none}}@media (min-width: 1280px){.VPLocalNav[data-v-8af612ea]{display:none}}@media (min-width: 1440px){.VPLocalNav.has-sidebar[data-v-8af612ea]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.container[data-v-8af612ea]{display:flex;justify-content:space-between;align-items:center}.menu[data-v-8af612ea]{display:flex;align-items:center;padding:12px 24px 11px;line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.menu[data-v-8af612ea]:hover{color:var(--vp-c-text-1);transition:color .25s}@media (min-width: 768px){.menu[data-v-8af612ea]{padding:0 32px}}@media (min-width: 960px){.menu[data-v-8af612ea]{display:none}}.menu-icon[data-v-8af612ea]{margin-right:8px;font-size:14px}.VPOutlineDropdown[data-v-8af612ea]{padding:12px 24px 11px}@media (min-width: 768px){.VPOutlineDropdown[data-v-8af612ea]{padding:12px 32px 11px}}.VPSwitch[data-v-d82e607b]{position:relative;border-radius:11px;display:block;width:40px;height:22px;flex-shrink:0;border:1px solid var(--vp-input-border-color);background-color:var(--vp-input-switch-bg-color);transition:border-color .25s!important}.VPSwitch[data-v-d82e607b]:hover{border-color:var(--vp-c-brand-1)}.check[data-v-d82e607b]{position:absolute;top:1px;left:1px;width:18px;height:18px;border-radius:50%;background-color:var(--vp-c-neutral-inverse);box-shadow:var(--vp-shadow-1);transition:transform .25s!important}.icon[data-v-d82e607b]{position:relative;display:block;width:18px;height:18px;border-radius:50%;overflow:hidden}.icon[data-v-d82e607b] [class^=vpi-]{position:absolute;top:3px;left:3px;width:12px;height:12px;color:var(--vp-c-text-2)}.dark .icon[data-v-d82e607b] [class^=vpi-]{color:var(--vp-c-text-1);transition:opacity .25s!important}.sun[data-v-3a50aa5c]{opacity:1}.moon[data-v-3a50aa5c],.dark .sun[data-v-3a50aa5c]{opacity:0}.dark .moon[data-v-3a50aa5c]{opacity:1}.dark .VPSwitchAppearance[data-v-3a50aa5c] .check{transform:translate(18px)}.VPNavBarAppearance[data-v-2a6692f8]{display:none}@media (min-width: 1280px){.VPNavBarAppearance[data-v-2a6692f8]{display:flex;align-items:center}}.VPMenuGroup+.VPMenuLink[data-v-79776a7a]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.link[data-v-79776a7a]{display:block;border-radius:6px;padding:0 12px;line-height:32px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);white-space:nowrap;transition:background-color .25s,color .25s}.link[data-v-79776a7a]:hover{color:var(--vp-c-brand-1);background-color:var(--vp-c-default-soft)}.link.active[data-v-79776a7a]{color:var(--vp-c-brand-1)}.VPMenuGroup[data-v-fbf15ead]{margin:12px -12px 0;border-top:1px solid var(--vp-c-divider);padding:12px 12px 0}.VPMenuGroup[data-v-fbf15ead]:first-child{margin-top:0;border-top:0;padding-top:0}.VPMenuGroup+.VPMenuGroup[data-v-fbf15ead]{margin-top:12px;border-top:1px solid var(--vp-c-divider)}.title[data-v-fbf15ead]{padding:0 12px;line-height:32px;font-size:14px;font-weight:600;color:var(--vp-c-text-2);white-space:nowrap;transition:color .25s}.VPMenu[data-v-9990563e]{border-radius:12px;padding:12px;min-width:128px;border:1px solid var(--vp-c-divider);background-color:var(--vp-c-bg-elv);box-shadow:var(--vp-shadow-3);transition:background-color .5s;max-height:calc(100vh - var(--vp-nav-height));overflow-y:auto}.VPMenu[data-v-9990563e] .group{margin:0 -12px;padding:0 12px 12px}.VPMenu[data-v-9990563e] .group+.group{border-top:1px solid var(--vp-c-divider);padding:11px 12px 12px}.VPMenu[data-v-9990563e] .group:last-child{padding-bottom:0}.VPMenu[data-v-9990563e] .group+.item{border-top:1px solid var(--vp-c-divider);padding:11px 16px 0}.VPMenu[data-v-9990563e] .item{padding:0 16px;white-space:nowrap}.VPMenu[data-v-9990563e] .label{flex-grow:1;line-height:28px;font-size:12px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.VPMenu[data-v-9990563e] .action{padding-left:24px}.VPFlyout[data-v-ec8c49bc]{position:relative}.VPFlyout[data-v-ec8c49bc]:hover{color:var(--vp-c-brand-1);transition:color .25s}.VPFlyout:hover .text[data-v-ec8c49bc]{color:var(--vp-c-text-2)}.VPFlyout:hover .icon[data-v-ec8c49bc]{fill:var(--vp-c-text-2)}.VPFlyout.active .text[data-v-ec8c49bc]{color:var(--vp-c-brand-1)}.VPFlyout.active:hover .text[data-v-ec8c49bc]{color:var(--vp-c-brand-2)}.VPFlyout:hover .menu[data-v-ec8c49bc],.button[aria-expanded=true]+.menu[data-v-ec8c49bc]{opacity:1;visibility:visible;transform:translateY(0)}.button[aria-expanded=false]+.menu[data-v-ec8c49bc]{opacity:0;visibility:hidden;transform:translateY(0)}.button[data-v-ec8c49bc]{display:flex;align-items:center;padding:0 12px;height:var(--vp-nav-height);color:var(--vp-c-text-1);transition:color .5s}.text[data-v-ec8c49bc]{display:flex;align-items:center;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.option-icon[data-v-ec8c49bc]{margin-right:0;font-size:16px}.text-icon[data-v-ec8c49bc]{margin-left:4px;font-size:14px}.icon[data-v-ec8c49bc]{font-size:20px;transition:fill .25s}.menu[data-v-ec8c49bc]{position:absolute;top:calc(var(--vp-nav-height) / 2 + 20px);right:0;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s,transform .25s}.VPSocialLink[data-v-b0526bd7]{display:flex;justify-content:center;align-items:center;width:36px;height:36px;color:var(--vp-c-text-2);transition:color .5s}.VPSocialLink[data-v-b0526bd7]:hover{color:var(--vp-c-text-1);transition:color .25s}.VPSocialLink[data-v-b0526bd7]>svg,.VPSocialLink[data-v-b0526bd7]>[class^=vpi-social-]{width:20px;height:20px;fill:currentColor}.VPSocialLinks[data-v-fa18fe49]{display:flex;justify-content:center}.VPNavBarExtra[data-v-2fc967b6]{display:none;margin-right:-12px}@media (min-width: 768px){.VPNavBarExtra[data-v-2fc967b6]{display:block}}@media (min-width: 1280px){.VPNavBarExtra[data-v-2fc967b6]{display:none}}.trans-title[data-v-2fc967b6]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.item.appearance[data-v-2fc967b6],.item.social-links[data-v-2fc967b6]{display:flex;align-items:center;padding:0 12px}.item.appearance[data-v-2fc967b6]{min-width:176px}.appearance-action[data-v-2fc967b6]{margin-right:-2px}.social-links-list[data-v-2fc967b6]{margin:-4px -8px}.VPNavBarHamburger[data-v-be64de2d]{display:flex;justify-content:center;align-items:center;width:48px;height:var(--vp-nav-height)}@media (min-width: 768px){.VPNavBarHamburger[data-v-be64de2d]{display:none}}.container[data-v-be64de2d]{position:relative;width:16px;height:14px;overflow:hidden}.VPNavBarHamburger:hover .top[data-v-be64de2d]{top:0;left:0;transform:translate(4px)}.VPNavBarHamburger:hover .middle[data-v-be64de2d]{top:6px;left:0;transform:translate(0)}.VPNavBarHamburger:hover .bottom[data-v-be64de2d]{top:12px;left:0;transform:translate(8px)}.VPNavBarHamburger.active .top[data-v-be64de2d]{top:6px;transform:translate(0) rotate(225deg)}.VPNavBarHamburger.active .middle[data-v-be64de2d]{top:6px;transform:translate(16px)}.VPNavBarHamburger.active .bottom[data-v-be64de2d]{top:6px;transform:translate(0) rotate(135deg)}.VPNavBarHamburger.active:hover .top[data-v-be64de2d],.VPNavBarHamburger.active:hover .middle[data-v-be64de2d],.VPNavBarHamburger.active:hover .bottom[data-v-be64de2d]{background-color:var(--vp-c-text-2);transition:top .25s,background-color .25s,transform .25s}.top[data-v-be64de2d],.middle[data-v-be64de2d],.bottom[data-v-be64de2d]{position:absolute;width:16px;height:2px;background-color:var(--vp-c-text-1);transition:top .25s,background-color .5s,transform .25s}.top[data-v-be64de2d]{top:0;left:0;transform:translate(0)}.middle[data-v-be64de2d]{top:6px;left:0;transform:translate(8px)}.bottom[data-v-be64de2d]{top:12px;left:0;transform:translate(4px)}.VPNavBarMenuLink[data-v-ad4a8b64]{display:flex;align-items:center;padding:0 12px;line-height:var(--vp-nav-height);font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.VPNavBarMenuLink.active[data-v-ad4a8b64],.VPNavBarMenuLink[data-v-ad4a8b64]:hover{color:var(--vp-c-brand-1)}.VPNavBarMenu[data-v-0fb289c1]{display:none}@media (min-width: 768px){.VPNavBarMenu[data-v-0fb289c1]{display:flex}}/*! @docsearch/css 3.6.1 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,.4);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 1px 0 rgba(30,35,90,.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,.3);--docsearch-key-pressed-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 1px 1px 0 rgba(3,4,9,.30196078431372547);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,.5),0 -4px 8px 0 rgba(0,0,0,.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}.DocSearch-Button-Key--pressed{transform:translate3d(0,1px,0);box-shadow:var(--docsearch-key-pressed-shadow)}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}.DocSearch-VisuallyHiddenForAccessibility{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}[class*=DocSearch]{--docsearch-primary-color: var(--vp-c-brand-1);--docsearch-highlight-color: var(--docsearch-primary-color);--docsearch-text-color: var(--vp-c-text-1);--docsearch-muted-color: var(--vp-c-text-2);--docsearch-searchbox-shadow: none;--docsearch-searchbox-background: transparent;--docsearch-searchbox-focus-background: transparent;--docsearch-key-gradient: transparent;--docsearch-key-shadow: none;--docsearch-modal-background: var(--vp-c-bg-soft);--docsearch-footer-background: var(--vp-c-bg)}.dark [class*=DocSearch]{--docsearch-modal-shadow: none;--docsearch-footer-shadow: none;--docsearch-logo-color: var(--vp-c-text-2);--docsearch-hit-background: var(--vp-c-default-soft);--docsearch-hit-color: var(--vp-c-text-2);--docsearch-hit-shadow: none}.DocSearch-Button{display:flex;justify-content:center;align-items:center;margin:0;padding:0;width:48px;height:55px;background:transparent;transition:border-color .25s}.DocSearch-Button:hover{background:transparent}.DocSearch-Button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}.DocSearch-Button-Key--pressed{transform:none;box-shadow:none}.DocSearch-Button:focus:not(:focus-visible){outline:none!important}@media (min-width: 768px){.DocSearch-Button{justify-content:flex-start;border:1px solid transparent;border-radius:8px;padding:0 10px 0 12px;width:100%;height:40px;background-color:var(--vp-c-bg-alt)}.DocSearch-Button:hover{border-color:var(--vp-c-brand-1);background:var(--vp-c-bg-alt)}}.DocSearch-Button .DocSearch-Button-Container{display:flex;align-items:center}.DocSearch-Button .DocSearch-Search-Icon{position:relative;width:16px;height:16px;color:var(--vp-c-text-1);fill:currentColor;transition:color .5s}.DocSearch-Button:hover .DocSearch-Search-Icon{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Search-Icon{top:1px;margin-right:8px;width:14px;height:14px;color:var(--vp-c-text-2)}}.DocSearch-Button .DocSearch-Button-Placeholder{display:none;margin-top:2px;padding:0 16px 0 0;font-size:13px;font-weight:500;color:var(--vp-c-text-2);transition:color .5s}.DocSearch-Button:hover .DocSearch-Button-Placeholder{color:var(--vp-c-text-1)}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Placeholder{display:inline-block}}.DocSearch-Button .DocSearch-Button-Keys{direction:ltr;display:none;min-width:auto}@media (min-width: 768px){.DocSearch-Button .DocSearch-Button-Keys{display:flex;align-items:center}}.DocSearch-Button .DocSearch-Button-Key{display:block;margin:2px 0 0;border:1px solid var(--vp-c-divider);border-right:none;border-radius:4px 0 0 4px;padding-left:6px;min-width:0;width:auto;height:22px;line-height:22px;font-family:var(--vp-font-family-base);font-size:12px;font-weight:500;transition:color .5s,border-color .5s}.DocSearch-Button .DocSearch-Button-Key+.DocSearch-Button-Key{border-right:1px solid var(--vp-c-divider);border-left:none;border-radius:0 4px 4px 0;padding-left:2px;padding-right:6px}.DocSearch-Button .DocSearch-Button-Key:first-child{font-size:0!important}.DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"Ctrl";font-size:12px;letter-spacing:normal;color:var(--docsearch-muted-color)}.mac .DocSearch-Button .DocSearch-Button-Key:first-child:after{content:"⌘"}.DocSearch-Button .DocSearch-Button-Key:first-child>*{display:none}.DocSearch-Search-Icon{--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' stroke-width='1.6' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' d='m14.386 14.386 4.088 4.088-4.088-4.088A7.533 7.533 0 1 1 3.733 3.733a7.533 7.533 0 0 1 10.653 10.653z'/%3E%3C/svg%3E")}.VPNavBarSearch{display:flex;align-items:center}@media (min-width: 768px){.VPNavBarSearch{flex-grow:1;padding-left:24px}}@media (min-width: 960px){.VPNavBarSearch{padding-left:32px}}.dark .DocSearch-Footer{border-top:1px solid var(--vp-c-divider)}.DocSearch-Form{border:1px solid var(--vp-c-brand-1);background-color:var(--vp-c-white)}.dark .DocSearch-Form{background-color:var(--vp-c-default-soft)}.DocSearch-Screen-Icon>svg{margin:auto}.VPNavBarSocialLinks[data-v-f3b91b3a]{display:none}@media (min-width: 1280px){.VPNavBarSocialLinks[data-v-f3b91b3a]{display:flex;align-items:center}}.title[data-v-10b95b50]{display:flex;align-items:center;border-bottom:1px solid transparent;width:100%;height:var(--vp-nav-height);font-size:16px;font-weight:600;color:var(--vp-c-text-1);transition:opacity .25s}@media (min-width: 960px){.title[data-v-10b95b50]{flex-shrink:0}.VPNavBarTitle.has-sidebar .title[data-v-10b95b50]{border-bottom-color:var(--vp-c-divider)}}[data-v-10b95b50] .logo{margin-right:8px;height:var(--vp-nav-logo-height)}.VPNavBarTranslations[data-v-cd7b67e8]{display:none}@media (min-width: 1280px){.VPNavBarTranslations[data-v-cd7b67e8]{display:flex;align-items:center}}.title[data-v-cd7b67e8]{padding:0 24px 0 12px;line-height:32px;font-size:14px;font-weight:700;color:var(--vp-c-text-1)}.VPNavBar[data-v-1303e283]{position:relative;height:var(--vp-nav-height);pointer-events:none;white-space:nowrap;transition:background-color .25s}.VPNavBar.screen-open[data-v-1303e283]{transition:none;background-color:var(--vp-nav-bg-color);border-bottom:1px solid var(--vp-c-divider)}.VPNavBar[data-v-1303e283]:not(.home){background-color:var(--vp-nav-bg-color)}@media (min-width: 960px){.VPNavBar[data-v-1303e283]:not(.home){background-color:transparent}.VPNavBar[data-v-1303e283]:not(.has-sidebar):not(.home.top){background-color:var(--vp-nav-bg-color)}}.wrapper[data-v-1303e283]{padding:0 8px 0 24px}@media (min-width: 768px){.wrapper[data-v-1303e283]{padding:0 32px}}@media (min-width: 960px){.VPNavBar.has-sidebar .wrapper[data-v-1303e283]{padding:0}}.container[data-v-1303e283]{display:flex;justify-content:space-between;margin:0 auto;max-width:calc(var(--vp-layout-max-width) - 64px);height:var(--vp-nav-height);pointer-events:none}.container>.title[data-v-1303e283],.container>.content[data-v-1303e283]{pointer-events:none}.container[data-v-1303e283] *{pointer-events:auto}@media (min-width: 960px){.VPNavBar.has-sidebar .container[data-v-1303e283]{max-width:100%}}.title[data-v-1303e283]{flex-shrink:0;height:calc(var(--vp-nav-height) - 1px);transition:background-color .5s}@media (min-width: 960px){.VPNavBar.has-sidebar .title[data-v-1303e283]{position:absolute;top:0;left:0;z-index:2;padding:0 32px;width:var(--vp-sidebar-width);height:var(--vp-nav-height);background-color:transparent}}@media (min-width: 1440px){.VPNavBar.has-sidebar .title[data-v-1303e283]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}.content[data-v-1303e283]{flex-grow:1}@media (min-width: 960px){.VPNavBar.has-sidebar .content[data-v-1303e283]{position:relative;z-index:1;padding-right:32px;padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .content[data-v-1303e283]{padding-right:calc((100vw - var(--vp-layout-max-width)) / 2 + 32px);padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.content-body[data-v-1303e283]{display:flex;justify-content:flex-end;align-items:center;height:var(--vp-nav-height);transition:background-color .5s}@media (min-width: 960px){.VPNavBar:not(.home.top) .content-body[data-v-1303e283]{position:relative;background-color:var(--vp-nav-bg-color)}.VPNavBar:not(.has-sidebar):not(.home.top) .content-body[data-v-1303e283]{background-color:transparent}}@media (max-width: 767px){.content-body[data-v-1303e283]{column-gap:.5rem}}.menu+.translations[data-v-1303e283]:before,.menu+.appearance[data-v-1303e283]:before,.menu+.social-links[data-v-1303e283]:before,.translations+.appearance[data-v-1303e283]:before,.appearance+.social-links[data-v-1303e283]:before{margin-right:8px;margin-left:8px;width:1px;height:24px;background-color:var(--vp-c-divider);content:""}.menu+.appearance[data-v-1303e283]:before,.translations+.appearance[data-v-1303e283]:before{margin-right:16px}.appearance+.social-links[data-v-1303e283]:before{margin-left:16px}.social-links[data-v-1303e283]{margin-right:-8px}.divider[data-v-1303e283]{width:100%;height:1px}@media (min-width: 960px){.VPNavBar.has-sidebar .divider[data-v-1303e283]{padding-left:var(--vp-sidebar-width)}}@media (min-width: 1440px){.VPNavBar.has-sidebar .divider[data-v-1303e283]{padding-left:calc((100vw - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width))}}.divider-line[data-v-1303e283]{width:100%;height:1px;transition:background-color .5s}.VPNavBar:not(.home) .divider-line[data-v-1303e283]{background-color:var(--vp-c-gutter)}@media (min-width: 960px){.VPNavBar:not(.home.top) .divider-line[data-v-1303e283]{background-color:var(--vp-c-gutter)}.VPNavBar:not(.has-sidebar):not(.home.top) .divider[data-v-1303e283]{background-color:var(--vp-c-gutter)}}.VPNavScreenAppearance[data-v-79da70de]{display:flex;justify-content:space-between;align-items:center;border-radius:8px;padding:12px 14px 12px 16px;background-color:var(--vp-c-bg-soft)}.text[data-v-79da70de]{line-height:24px;font-size:12px;font-weight:500;color:var(--vp-c-text-2)}.VPNavScreenMenuLink[data-v-9a3ef902]{display:block;border-bottom:1px solid var(--vp-c-divider);padding:12px 0 11px;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:border-color .25s,color .25s}.VPNavScreenMenuLink[data-v-9a3ef902]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupLink[data-v-03f7344f]{display:block;margin-left:12px;line-height:32px;font-size:14px;font-weight:400;color:var(--vp-c-text-1);transition:color .25s}.VPNavScreenMenuGroupLink[data-v-03f7344f]:hover{color:var(--vp-c-brand-1)}.VPNavScreenMenuGroupSection[data-v-3b79ab2a]{display:block}.title[data-v-3b79ab2a]{line-height:32px;font-size:13px;font-weight:700;color:var(--vp-c-text-2);transition:color .25s}.VPNavScreenMenuGroup[data-v-496537ac]{border-bottom:1px solid var(--vp-c-divider);height:48px;overflow:hidden;transition:border-color .5s}.VPNavScreenMenuGroup .items[data-v-496537ac]{visibility:hidden}.VPNavScreenMenuGroup.open .items[data-v-496537ac]{visibility:visible}.VPNavScreenMenuGroup.open[data-v-496537ac]{padding-bottom:10px;height:auto}.VPNavScreenMenuGroup.open .button[data-v-496537ac]{padding-bottom:6px;color:var(--vp-c-brand-1)}.VPNavScreenMenuGroup.open .button-icon[data-v-496537ac]{transform:rotate(45deg)}.button[data-v-496537ac]{display:flex;justify-content:space-between;align-items:center;padding:12px 4px 11px 0;width:100%;line-height:24px;font-size:14px;font-weight:500;color:var(--vp-c-text-1);transition:color .25s}.button[data-v-496537ac]:hover{color:var(--vp-c-brand-1)}.button-icon[data-v-496537ac]{transition:transform .25s}.group[data-v-496537ac]:first-child{padding-top:0}.group+.group[data-v-496537ac],.group+.item[data-v-496537ac]{padding-top:4px}.VPNavScreenTranslations[data-v-c618ff37]{height:24px;overflow:hidden}.VPNavScreenTranslations.open[data-v-c618ff37]{height:auto}.title[data-v-c618ff37]{display:flex;align-items:center;font-size:14px;font-weight:500;color:var(--vp-c-text-1)}.icon[data-v-c618ff37]{font-size:16px}.icon.lang[data-v-c618ff37]{margin-right:8px}.icon.chevron[data-v-c618ff37]{margin-left:4px}.list[data-v-c618ff37]{padding:4px 0 0 24px}.link[data-v-c618ff37]{line-height:32px;font-size:13px;color:var(--vp-c-text-1)}.VPNavScreen[data-v-c3a48aed]{position:fixed;top:calc(var(--vp-nav-height) + var(--vp-layout-top-height, 0px));right:0;bottom:0;left:0;padding:0 32px;width:100%;background-color:var(--vp-nav-screen-bg-color);overflow-y:auto;transition:background-color .25s;pointer-events:auto}.VPNavScreen.fade-enter-active[data-v-c3a48aed],.VPNavScreen.fade-leave-active[data-v-c3a48aed]{transition:opacity .25s}.VPNavScreen.fade-enter-active .container[data-v-c3a48aed],.VPNavScreen.fade-leave-active .container[data-v-c3a48aed]{transition:transform .25s ease}.VPNavScreen.fade-enter-from[data-v-c3a48aed],.VPNavScreen.fade-leave-to[data-v-c3a48aed]{opacity:0}.VPNavScreen.fade-enter-from .container[data-v-c3a48aed],.VPNavScreen.fade-leave-to .container[data-v-c3a48aed]{transform:translateY(-8px)}@media (min-width: 768px){.VPNavScreen[data-v-c3a48aed]{display:none}}.container[data-v-c3a48aed]{margin:0 auto;padding:24px 0 96px;max-width:288px}.menu+.translations[data-v-c3a48aed],.menu+.appearance[data-v-c3a48aed],.translations+.appearance[data-v-c3a48aed]{margin-top:24px}.menu+.social-links[data-v-c3a48aed]{margin-top:16px}.appearance+.social-links[data-v-c3a48aed]{margin-top:16px}.VPNav[data-v-2a4e514e]{position:relative;top:var(--vp-layout-top-height, 0px);left:0;z-index:var(--vp-z-index-nav);width:100%;pointer-events:none;transition:background-color .5s}@media (min-width: 960px){.VPNav[data-v-2a4e514e]{position:fixed}}.VPSidebarItem.level-0[data-v-9035698b]{padding-bottom:24px}.VPSidebarItem.collapsed.level-0[data-v-9035698b]{padding-bottom:10px}.item[data-v-9035698b]{position:relative;display:flex;width:100%}.VPSidebarItem.collapsible>.item[data-v-9035698b]{cursor:pointer}.indicator[data-v-9035698b]{position:absolute;top:6px;bottom:6px;left:-17px;width:2px;border-radius:2px;transition:background-color .25s}.VPSidebarItem.level-2.is-active>.item>.indicator[data-v-9035698b],.VPSidebarItem.level-3.is-active>.item>.indicator[data-v-9035698b],.VPSidebarItem.level-4.is-active>.item>.indicator[data-v-9035698b],.VPSidebarItem.level-5.is-active>.item>.indicator[data-v-9035698b]{background-color:var(--vp-c-brand-1)}.link[data-v-9035698b]{display:flex;align-items:center;flex-grow:1}.text[data-v-9035698b]{flex-grow:1;padding:4px 0;line-height:24px;font-size:14px;transition:color .25s}.VPSidebarItem.level-0 .text[data-v-9035698b]{font-weight:700;color:var(--vp-c-text-1)}.VPSidebarItem.level-1 .text[data-v-9035698b],.VPSidebarItem.level-2 .text[data-v-9035698b],.VPSidebarItem.level-3 .text[data-v-9035698b],.VPSidebarItem.level-4 .text[data-v-9035698b],.VPSidebarItem.level-5 .text[data-v-9035698b]{font-weight:500;color:var(--vp-c-text-2)}.VPSidebarItem.level-0.is-link>.item>.link:hover .text[data-v-9035698b],.VPSidebarItem.level-1.is-link>.item>.link:hover .text[data-v-9035698b],.VPSidebarItem.level-2.is-link>.item>.link:hover .text[data-v-9035698b],.VPSidebarItem.level-3.is-link>.item>.link:hover .text[data-v-9035698b],.VPSidebarItem.level-4.is-link>.item>.link:hover .text[data-v-9035698b],.VPSidebarItem.level-5.is-link>.item>.link:hover .text[data-v-9035698b]{color:var(--vp-c-brand-1)}.VPSidebarItem.level-0.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-1.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-2.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-3.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-4.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-5.has-active>.item>.text[data-v-9035698b],.VPSidebarItem.level-0.has-active>.item>.link>.text[data-v-9035698b],.VPSidebarItem.level-1.has-active>.item>.link>.text[data-v-9035698b],.VPSidebarItem.level-2.has-active>.item>.link>.text[data-v-9035698b],.VPSidebarItem.level-3.has-active>.item>.link>.text[data-v-9035698b],.VPSidebarItem.level-4.has-active>.item>.link>.text[data-v-9035698b],.VPSidebarItem.level-5.has-active>.item>.link>.text[data-v-9035698b]{color:var(--vp-c-text-1)}.VPSidebarItem.level-0.is-active>.item .link>.text[data-v-9035698b],.VPSidebarItem.level-1.is-active>.item .link>.text[data-v-9035698b],.VPSidebarItem.level-2.is-active>.item .link>.text[data-v-9035698b],.VPSidebarItem.level-3.is-active>.item .link>.text[data-v-9035698b],.VPSidebarItem.level-4.is-active>.item .link>.text[data-v-9035698b],.VPSidebarItem.level-5.is-active>.item .link>.text[data-v-9035698b]{color:var(--vp-c-brand-1)}.caret[data-v-9035698b]{display:flex;justify-content:center;align-items:center;margin-right:-7px;width:32px;height:32px;color:var(--vp-c-text-3);cursor:pointer;transition:color .25s;flex-shrink:0}.item:hover .caret[data-v-9035698b]{color:var(--vp-c-text-2)}.item:hover .caret[data-v-9035698b]:hover{color:var(--vp-c-text-1)}.caret-icon[data-v-9035698b]{font-size:18px;transform:rotate(90deg);transition:transform .25s}.VPSidebarItem.collapsed .caret-icon[data-v-9035698b]{transform:rotate(0)}.VPSidebarItem.level-1 .items[data-v-9035698b],.VPSidebarItem.level-2 .items[data-v-9035698b],.VPSidebarItem.level-3 .items[data-v-9035698b],.VPSidebarItem.level-4 .items[data-v-9035698b],.VPSidebarItem.level-5 .items[data-v-9035698b]{border-left:1px solid var(--vp-c-divider);padding-left:16px}.VPSidebarItem.collapsed .items[data-v-9035698b]{display:none}.no-transition[data-v-c3eaeb1a] .caret-icon{transition:none}.group+.group[data-v-c3eaeb1a]{border-top:1px solid var(--vp-c-divider);padding-top:10px}@media (min-width: 960px){.group[data-v-c3eaeb1a]{padding-top:10px;width:calc(var(--vp-sidebar-width) - 64px)}}.VPSidebar[data-v-edd7de80]{position:fixed;top:var(--vp-layout-top-height, 0px);bottom:0;left:0;z-index:var(--vp-z-index-sidebar);padding:32px 32px 96px;width:calc(100vw - 64px);max-width:320px;background-color:var(--vp-sidebar-bg-color);opacity:0;box-shadow:var(--vp-c-shadow-3);overflow-x:hidden;overflow-y:auto;transform:translate(-100%);transition:opacity .5s,transform .25s ease;overscroll-behavior:contain}.VPSidebar.open[data-v-edd7de80]{opacity:1;visibility:visible;transform:translate(0);transition:opacity .25s,transform .5s cubic-bezier(.19,1,.22,1)}.dark .VPSidebar[data-v-edd7de80]{box-shadow:var(--vp-shadow-1)}@media (min-width: 960px){.VPSidebar[data-v-edd7de80]{padding-top:var(--vp-nav-height);width:var(--vp-sidebar-width);max-width:100%;background-color:var(--vp-sidebar-bg-color);opacity:1;visibility:visible;box-shadow:none;transform:translate(0)}}@media (min-width: 1440px){.VPSidebar[data-v-edd7de80]{padding-left:max(32px,calc((100% - (var(--vp-layout-max-width) - 64px)) / 2));width:calc((100% - (var(--vp-layout-max-width) - 64px)) / 2 + var(--vp-sidebar-width) - 32px)}}@media (min-width: 960px){.curtain[data-v-edd7de80]{position:sticky;top:-64px;left:0;z-index:1;margin-top:calc(var(--vp-nav-height) * -1);margin-right:-32px;margin-left:-32px;height:var(--vp-nav-height);background-color:var(--vp-sidebar-bg-color)}}.nav[data-v-edd7de80]{outline:0}.VPSkipLink[data-v-3e86afbf]{top:8px;left:8px;padding:8px 16px;z-index:999;border-radius:8px;font-size:12px;font-weight:700;text-decoration:none;color:var(--vp-c-brand-1);box-shadow:var(--vp-shadow-3);background-color:var(--vp-c-bg)}.VPSkipLink[data-v-3e86afbf]:focus{height:auto;width:auto;clip:auto;clip-path:none}@media (min-width: 1280px){.VPSkipLink[data-v-3e86afbf]{top:14px;left:16px}}.Layout[data-v-22f859ac]{display:flex;flex-direction:column;min-height:100vh}.VPHomeSponsors[data-v-65f3b3fb]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPHomeSponsors[data-v-65f3b3fb]{margin:96px 0}@media (min-width: 768px){.VPHomeSponsors[data-v-65f3b3fb]{margin:128px 0}}.VPHomeSponsors[data-v-65f3b3fb]{padding:0 24px}@media (min-width: 768px){.VPHomeSponsors[data-v-65f3b3fb]{padding:0 48px}}@media (min-width: 960px){.VPHomeSponsors[data-v-65f3b3fb]{padding:0 64px}}.container[data-v-65f3b3fb]{margin:0 auto;max-width:1152px}.love[data-v-65f3b3fb]{margin:0 auto;width:fit-content;font-size:28px;color:var(--vp-c-text-3)}.icon[data-v-65f3b3fb]{display:inline-block}.message[data-v-65f3b3fb]{margin:0 auto;padding-top:10px;max-width:320px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.sponsors[data-v-65f3b3fb]{padding-top:32px}.action[data-v-65f3b3fb]{padding-top:40px;text-align:center}.VPTeamPage[data-v-7ee49781]{margin:96px 0}@media (min-width: 768px){.VPTeamPage[data-v-7ee49781]{margin:128px 0}}.VPHome .VPTeamPageTitle[data-v-7ee49781-s]{border-top:1px solid var(--vp-c-gutter);padding-top:88px!important}.VPTeamPageSection+.VPTeamPageSection[data-v-7ee49781-s],.VPTeamMembers+.VPTeamPageSection[data-v-7ee49781-s]{margin-top:64px}.VPTeamMembers+.VPTeamMembers[data-v-7ee49781-s]{margin-top:24px}@media (min-width: 768px){.VPTeamPageTitle+.VPTeamPageSection[data-v-7ee49781-s]{margin-top:16px}.VPTeamPageSection+.VPTeamPageSection[data-v-7ee49781-s],.VPTeamMembers+.VPTeamPageSection[data-v-7ee49781-s]{margin-top:96px}}.VPTeamMembers[data-v-7ee49781-s]{padding:0 24px}@media (min-width: 768px){.VPTeamMembers[data-v-7ee49781-s]{padding:0 48px}}@media (min-width: 960px){.VPTeamMembers[data-v-7ee49781-s]{padding:0 64px}}.VPTeamPageTitle[data-v-7199c4a1]{padding:48px 32px;text-align:center}@media (min-width: 768px){.VPTeamPageTitle[data-v-7199c4a1]{padding:64px 48px 48px}}@media (min-width: 960px){.VPTeamPageTitle[data-v-7199c4a1]{padding:80px 64px 48px}}.title[data-v-7199c4a1]{letter-spacing:0;line-height:44px;font-size:36px;font-weight:500}@media (min-width: 768px){.title[data-v-7199c4a1]{letter-spacing:-.5px;line-height:56px;font-size:48px}}.lead[data-v-7199c4a1]{margin:0 auto;max-width:512px;padding-top:12px;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}@media (min-width: 768px){.lead[data-v-7199c4a1]{max-width:592px;letter-spacing:.15px;line-height:28px;font-size:20px}}.VPTeamPageSection[data-v-e7d273f9]{padding:0 32px}@media (min-width: 768px){.VPTeamPageSection[data-v-e7d273f9]{padding:0 48px}}@media (min-width: 960px){.VPTeamPageSection[data-v-e7d273f9]{padding:0 64px}}.title[data-v-e7d273f9]{position:relative;margin:0 auto;max-width:1152px;text-align:center;color:var(--vp-c-text-2)}.title-line[data-v-e7d273f9]{position:absolute;top:16px;left:0;width:100%;height:1px;background-color:var(--vp-c-divider)}.title-text[data-v-e7d273f9]{position:relative;display:inline-block;padding:0 24px;letter-spacing:0;line-height:32px;font-size:20px;font-weight:500;background-color:var(--vp-c-bg)}.lead[data-v-e7d273f9]{margin:0 auto;max-width:480px;padding-top:12px;text-align:center;line-height:24px;font-size:16px;font-weight:500;color:var(--vp-c-text-2)}.members[data-v-e7d273f9]{padding-top:40px}.VPTeamMembersItem[data-v-37dee882]{display:flex;flex-direction:column;gap:2px;border-radius:12px;width:100%;height:100%;overflow:hidden}.VPTeamMembersItem.small .profile[data-v-37dee882]{padding:32px}.VPTeamMembersItem.small .data[data-v-37dee882]{padding-top:20px}.VPTeamMembersItem.small .avatar[data-v-37dee882]{width:64px;height:64px}.VPTeamMembersItem.small .name[data-v-37dee882]{line-height:24px;font-size:16px}.VPTeamMembersItem.small .affiliation[data-v-37dee882]{padding-top:4px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .desc[data-v-37dee882]{padding-top:12px;line-height:20px;font-size:14px}.VPTeamMembersItem.small .links[data-v-37dee882]{margin:0 -16px -20px;padding:10px 0 0}.VPTeamMembersItem.medium .profile[data-v-37dee882]{padding:48px 32px}.VPTeamMembersItem.medium .data[data-v-37dee882]{padding-top:24px;text-align:center}.VPTeamMembersItem.medium .avatar[data-v-37dee882]{width:96px;height:96px}.VPTeamMembersItem.medium .name[data-v-37dee882]{letter-spacing:.15px;line-height:28px;font-size:20px}.VPTeamMembersItem.medium .affiliation[data-v-37dee882]{padding-top:4px;font-size:16px}.VPTeamMembersItem.medium .desc[data-v-37dee882]{padding-top:16px;max-width:288px;font-size:16px}.VPTeamMembersItem.medium .links[data-v-37dee882]{margin:0 -16px -12px;padding:16px 12px 0}.profile[data-v-37dee882]{flex-grow:1;background-color:var(--vp-c-bg-soft)}.data[data-v-37dee882]{text-align:center}.avatar[data-v-37dee882]{position:relative;flex-shrink:0;margin:0 auto;border-radius:50%;box-shadow:var(--vp-shadow-3)}.avatar-img[data-v-37dee882]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:50%;object-fit:cover}.name[data-v-37dee882]{margin:0;font-weight:600}.affiliation[data-v-37dee882]{margin:0;font-weight:500;color:var(--vp-c-text-2)}.org.link[data-v-37dee882]{color:var(--vp-c-text-2);transition:color .25s}.org.link[data-v-37dee882]:hover{color:var(--vp-c-brand-1)}.desc[data-v-37dee882]{margin:0 auto}.desc[data-v-37dee882] a{font-weight:500;color:var(--vp-c-brand-1);text-decoration-style:dotted;transition:color .25s}.links[data-v-37dee882]{display:flex;justify-content:center;height:56px}.sp-link[data-v-37dee882]{display:flex;justify-content:center;align-items:center;text-align:center;padding:16px;font-size:14px;font-weight:500;color:var(--vp-c-sponsor);background-color:var(--vp-c-bg-soft);transition:color .25s,background-color .25s}.sp .sp-link.link[data-v-37dee882]:hover,.sp .sp-link.link[data-v-37dee882]:focus{outline:none;color:var(--vp-c-white);background-color:var(--vp-c-sponsor)}.sp-icon[data-v-37dee882]{margin-right:8px;font-size:16px}.VPTeamMembers.small .container[data-v-43ad829f]{grid-template-columns:repeat(auto-fit,minmax(224px,1fr))}.VPTeamMembers.small.count-1 .container[data-v-43ad829f]{max-width:276px}.VPTeamMembers.small.count-2 .container[data-v-43ad829f]{max-width:576px}.VPTeamMembers.small.count-3 .container[data-v-43ad829f]{max-width:876px}.VPTeamMembers.medium .container[data-v-43ad829f]{grid-template-columns:repeat(auto-fit,minmax(256px,1fr))}@media (min-width: 375px){.VPTeamMembers.medium .container[data-v-43ad829f]{grid-template-columns:repeat(auto-fit,minmax(288px,1fr))}}.VPTeamMembers.medium.count-1 .container[data-v-43ad829f]{max-width:368px}.VPTeamMembers.medium.count-2 .container[data-v-43ad829f]{max-width:760px}.container[data-v-43ad829f]{display:grid;gap:24px;margin:0 auto;max-width:1152px} diff --git a/assets/zht_api_index.md.BoNToa7V.js b/assets/zht_api_index.md.BoNToa7V.js new file mode 100644 index 0000000..6d259c4 --- /dev/null +++ b/assets/zht_api_index.md.BoNToa7V.js @@ -0,0 +1 @@ +import{_ as a,c,o as n,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),o={name:"zht/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/zht_api_index.md.BoNToa7V.lean.js b/assets/zht_api_index.md.BoNToa7V.lean.js new file mode 100644 index 0000000..6d259c4 --- /dev/null +++ b/assets/zht_api_index.md.BoNToa7V.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as n,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","collapsed":true},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),o={name:"zht/api/index.md"},s=e("h1",{id:"mbcp",tabindex:"-1"},[t("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),t(": 本模块塞了一些预设的粒子生成器")],-1),i=[s,r];function d(p,l,_,m,h,f){return n(),c("div",null,i)}const u=a(o,[["render",d]]);export{b as __pageData,u as default}; diff --git a/assets/zht_api_index.md.Dq4XPUKZ.js b/assets/zht_api_index.md.Dq4XPUKZ.js deleted file mode 100644 index b84af4b..0000000 --- a/assets/zht_api_index.md.Dq4XPUKZ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),n={name:"zht/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/zht_api_index.md.Dq4XPUKZ.lean.js b/assets/zht_api_index.md.Dq4XPUKZ.lean.js deleted file mode 100644 index b84af4b..0000000 --- a/assets/zht_api_index.md.Dq4XPUKZ.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp"},"headers":[],"relativePath":"zht/api/index.md","filePath":"zht/api/index.md"}'),n={name:"zht/api/index.md"};function i(r,c,o,p,s,d){return a(),t("div")}const f=e(n,[["render",i]]);export{_ as __pageData,f as default}; diff --git a/assets/zht_api_mp_math_angle.md.B4T6L25M.js b/assets/zht_api_mp_math_angle.md.B7iqArJr.js similarity index 87% rename from assets/zht_api_mp_math_angle.md.B4T6L25M.js rename to assets/zht_api_mp_math_angle.md.B7iqArJr.js index 0fc8940..ad5a45c 100644 --- a/assets/zht_api_mp_math_angle.md.B4T6L25M.js +++ b/assets/zht_api_mp_math_angle.md.B7iqArJr.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"zht/api/mp_math/angle.md","filePath":"zht/api/mp_math/angle.md"}'),t={name:"zht/api/mp_math/angle.md"},e=n(`

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

變數説明:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源碼
python
def __init__(self, value: float, is_radian: bool=False):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"zht/api/mp_math/angle.md","filePath":"zht/api/mp_math/angle.md"}'),t={name:"zht/api/mp_math/angle.md"},e=n(`

mbcp.mp_math.angle

説明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

變數説明:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源碼
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -8,92 +8,92 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

返回: 余角

源碼
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

返回: 余角

源碼
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

返回: 补角

源碼
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

返回: 补角

源碼
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

返回: 弧度

源碼
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

返回: 弧度

源碼
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

返回: 最小正角度

源碼
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

返回: 最小正角度

源碼
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

返回: 最大负角度

源碼
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

返回: 最大负角度

源碼
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

返回: 正弦值

源碼
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

返回: 正弦值

源碼
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

返回: 余弦值

源碼
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

返回: 余弦值

源碼
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

返回: 正切值

源碼
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

返回: 正切值

源碼
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

返回: 余切值

源碼
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

返回: 余切值

源碼
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

返回: 正割值

源碼
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

返回: 正割值

源碼
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

返回: 余割值

源碼
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

返回: 余割值

源碼
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源碼
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源碼
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源碼
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源碼
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源碼
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源碼
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源碼
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源碼
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源碼
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源碼
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

源碼
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

源碼
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

源碼
python
def __truediv__(self, other):
+    ...

method self / other

源碼
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
`,78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; + return AnyAngle(self.radian / other, is_radian=True)
`,80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/zht_api_mp_math_angle.md.B4T6L25M.lean.js b/assets/zht_api_mp_math_angle.md.B7iqArJr.lean.js similarity index 57% rename from assets/zht_api_mp_math_angle.md.B4T6L25M.lean.js rename to assets/zht_api_mp_math_angle.md.B7iqArJr.lean.js index d02fff3..e8fcf1b 100644 --- a/assets/zht_api_mp_math_angle.md.B4T6L25M.lean.js +++ b/assets/zht_api_mp_math_angle.md.B7iqArJr.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"zht/api/mp_math/angle.md","filePath":"zht/api/mp_math/angle.md"}'),t={name:"zht/api/mp_math/angle.md"},e=n("",78),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.angle","description":"","frontmatter":{"title":"mbcp.mp_math.angle"},"headers":[],"relativePath":"zht/api/mp_math/angle.md","filePath":"zht/api/mp_math/angle.md"}'),t={name:"zht/api/mp_math/angle.md"},e=n("",80),l=[e];function h(p,k,r,d,o,g){return a(),i("div",null,l)}const c=s(t,[["render",h]]);export{F as __pageData,c as default}; diff --git a/assets/zht_api_mp_math_const.md.3LY5TQ7t.js b/assets/zht_api_mp_math_const.md.3LY5TQ7t.js new file mode 100644 index 0000000..8273c03 --- /dev/null +++ b/assets/zht_api_mp_math_const.md.3LY5TQ7t.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},c=o('

mbcp.mp_math.const

説明: 本模块定义了一些常用的常量

var PI = math.pi

  • 説明: 常量 π

var E = math.e

  • 説明: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • 説明: 黄金分割比

var GAMMA = 0.5772156649015329

  • 説明: 欧拉常数

var EPSILON = 0.0001

  • 説明: 精度误差

var APPROX = 0.001

  • 説明: 约等于判定误差
',14),i=[c];function n(l,h,s,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/zht_api_mp_math_const.md.3LY5TQ7t.lean.js b/assets/zht_api_mp_math_const.md.3LY5TQ7t.lean.js new file mode 100644 index 0000000..ad10b71 --- /dev/null +++ b/assets/zht_api_mp_math_const.md.3LY5TQ7t.lean.js @@ -0,0 +1 @@ +import{_ as a,c as t,o as e,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},c=o("",14),i=[c];function n(l,h,s,d,m,p){return e(),t("div",null,i)}const v=a(r,[["render",n]]);export{u as __pageData,v as default}; diff --git a/assets/zht_api_mp_math_const.md.B8uQOIr_.js b/assets/zht_api_mp_math_const.md.B8uQOIr_.js deleted file mode 100644 index 26995b2..0000000 --- a/assets/zht_api_mp_math_const.md.B8uQOIr_.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},s=o('

var EPSILON = 0.0001

  • 説明: ε

var APPROX = 0.001

  • 説明: 约等于误差
',4),n=[s];function c(_,i,l,m,p,h){return e(),a("div",null,n)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js b/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js deleted file mode 100644 index bd69dc7..0000000 --- a/assets/zht_api_mp_math_const.md.B8uQOIr_.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as a,o as e,a2 as o}from"./chunks/framework.BV61Qrc0.js";const u=JSON.parse('{"title":"mbcp.mp_math.const","description":"","frontmatter":{"title":"mbcp.mp_math.const"},"headers":[],"relativePath":"zht/api/mp_math/const.md","filePath":"zht/api/mp_math/const.md"}'),r={name:"zht/api/mp_math/const.md"},s=o("",4),n=[s];function c(_,i,l,m,p,h){return e(),a("div",null,n)}const P=t(r,[["render",c]]);export{u as __pageData,P as default}; diff --git a/assets/zht_api_mp_math_equation.md.CtFwMbbV.lean.js b/assets/zht_api_mp_math_equation.md.CtFwMbbV.lean.js deleted file mode 100644 index 93235b8..0000000 --- a/assets/zht_api_mp_math_equation.md.CtFwMbbV.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),l={name:"zht/api/mp_math/equation.md"},t=n("",27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; diff --git a/assets/ja_api_mp_math_equation.md.DvgEtgmw.js b/assets/zht_api_mp_math_equation.md.DMSjWdou.js similarity index 69% rename from assets/ja_api_mp_math_equation.md.DvgEtgmw.js rename to assets/zht_api_mp_math_equation.md.DMSjWdou.js index 1c794a2..ea88eee 100644 --- a/assets/ja_api_mp_math_equation.md.DvgEtgmw.js +++ b/assets/zht_api_mp_math_equation.md.DMSjWdou.js @@ -1,4 +1,26 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"ja/api/mp_math/equation.md","filePath":"ja/api/mp_math/equation.md"}'),l={name:"ja/api/mp_math/equation.md"},t=n(`

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

引数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

戻り値: 偏导函数

例外:

  • ValueError 无效变量类型
ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),t={name:"zht/api/mp_math/equation.md"},l=n(`

mbcp.mp_math.equation

説明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

變數説明:

  • *t:
  • 参数:

返回: 目标点

源碼
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

變數説明:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

抛出:

  • ValueError 无效变量类型
源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -40,7 +62,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

引数:

  • func: 函数
  • *args: 参数

戻り値: 柯里化后的函数

ソースコード
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

變數説明:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源碼
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -55,26 +77,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

引数:

  • *t:
  • 参数:
ソースコード
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
`,27),h=[t];function p(k,e,r,E,d,g){return a(),i("div",null,h)}const u=s(l,[["render",p]]);export{F as __pageData,u as default}; + return curried_func
`,30),p=[l];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_equation.md.DMSjWdou.lean.js b/assets/zht_api_mp_math_equation.md.DMSjWdou.lean.js new file mode 100644 index 0000000..9b4a068 --- /dev/null +++ b/assets/zht_api_mp_math_equation.md.DMSjWdou.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math.equation","description":"","frontmatter":{"title":"mbcp.mp_math.equation"},"headers":[],"relativePath":"zht/api/mp_math/equation.md","filePath":"zht/api/mp_math/equation.md"}'),t={name:"zht/api/mp_math/equation.md"},l=n("",30),p=[l];function h(k,e,r,E,d,g){return a(),i("div",null,p)}const F=s(t,[["render",h]]);export{u as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_function.md.DOX7pGXC.js b/assets/zht_api_mp_math_function.md.DOX7pGXC.js new file mode 100644 index 0000000..19a863d --- /dev/null +++ b/assets/zht_api_mp_math_function.md.DOX7pGXC.js @@ -0,0 +1,17 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"zht/api/mp_math/function.md","filePath":"zht/api/mp_math/function.md"}'),n={name:"zht/api/mp_math/function.md"},l=a('

mbcp.mp_math.function

説明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

説明: 计算三元函数在某点的梯度向量。

',4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a('',1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a('',1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a('',1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a(`

變數説明:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

返回: 梯度

源碼
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\\\nabla f(x_0, y_0, z_0) = \\\\left(\\\\frac{\\\\partial f}{\\\\partial x}, \\\\frac{\\\\partial f}{\\\\partial y}, \\\\frac{\\\\partial f}{\\\\partial z}\\\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)
`,4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/zht_api_mp_math_function.md.DOX7pGXC.lean.js b/assets/zht_api_mp_math_function.md.DOX7pGXC.lean.js new file mode 100644 index 0000000..9903b1a --- /dev/null +++ b/assets/zht_api_mp_math_function.md.DOX7pGXC.lean.js @@ -0,0 +1 @@ +import{_ as i,c as s,j as t,a as T,a2 as a,o as Q}from"./chunks/framework.C94oF1kp.js";const v=JSON.parse('{"title":"mbcp.mp_math.function","description":"","frontmatter":{"title":"mbcp.mp_math.function"},"headers":[],"relativePath":"zht/api/mp_math/function.md","filePath":"zht/api/mp_math/function.md"}'),n={name:"zht/api/mp_math/function.md"},l=a("",4),e={class:"tip custom-block github-alert"},h=t("p",{class:"custom-block-title"},"TIP",-1),r={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"8.471ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 3744.3 1000","aria-hidden":"true"},p=a("",1),o=[p],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("mi",null,"x"),t("mo",null,","),t("mi",null,"y"),t("mo",null,","),t("mi",null,"z"),t("mo",{stretchy:"false"},")")])],-1),k={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},g={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.566ex"},xmlns:"http://www.w3.org/2000/svg",width:"10.19ex",height:"2.262ex",role:"img",focusable:"false",viewBox:"0 -750 4504 1000","aria-hidden":"true"},c=a("",1),y=[c],u=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")")])],-1),f={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},E={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-1.469ex"},xmlns:"http://www.w3.org/2000/svg",width:"29.427ex",height:"4.07ex",role:"img",focusable:"false",viewBox:"0 -1149.5 13006.8 1799","aria-hidden":"true"},F=a("",1),_=[F],w=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("mi",{mathvariant:"normal"},"∇"),t("mi",null,"f"),t("mo",{stretchy:"false"},"("),t("msub",null,[t("mi",null,"x"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"y"),t("mn",null,"0")]),t("mo",null,","),t("msub",null,[t("mi",null,"z"),t("mn",null,"0")]),t("mo",{stretchy:"false"},")"),t("mo",null,"="),t("mrow",{"data-mjx-texclass":"INNER"},[t("mo",{"data-mjx-texclass":"OPEN"},"("),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"x")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"y")])]),t("mo",null,","),t("mfrac",null,[t("mrow",null,[t("mi",null,"∂"),t("mi",null,"f")]),t("mrow",null,[t("mi",null,"∂"),t("mi",null,"z")])]),t("mo",{"data-mjx-texclass":"CLOSE"},")")])])],-1),x=a("",4);function C(L,H,M,Z,b,D){return Q(),s("div",null,[l,t("div",e,[h,t("p",null,[T("已知一个函数"),t("mjx-container",r,[(Q(),s("svg",d,o)),m]),T(",则其在点"),t("mjx-container",k,[(Q(),s("svg",g,y)),u]),T("处的梯度向量为: "),t("mjx-container",f,[(Q(),s("svg",E,_)),w])])]),x])}const V=i(n,[["render",C]]);export{v as __pageData,V as default}; diff --git a/assets/zht_api_mp_math_index.md.Cp3ggfPO.js b/assets/zht_api_mp_math_index.md.Cp3ggfPO.js new file mode 100644 index 0000000..c19d933 --- /dev/null +++ b/assets/zht_api_mp_math_index.md.Cp3ggfPO.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"zht/api/mp_math/index.md","filePath":"zht/api/mp_math/index.md"}'),c={name:"zht/api/mp_math/index.md"},i=o('

mbcp.mp_math

説明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/zht_api_mp_math_index.md.Cp3ggfPO.lean.js b/assets/zht_api_mp_math_index.md.Cp3ggfPO.lean.js new file mode 100644 index 0000000..a7b515d --- /dev/null +++ b/assets/zht_api_mp_math_index.md.Cp3ggfPO.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math","collapsed":true},"headers":[],"relativePath":"zht/api/mp_math/index.md","filePath":"zht/api/mp_math/index.md"}'),c={name:"zht/api/mp_math/index.md"},i=o("",3),m=[i];function d(_,l,n,p,r,s){return a(),t("div",null,m)}const b=e(c,[["render",d]]);export{u as __pageData,b as default}; diff --git a/assets/zht_api_mp_math_index.md.D09y2ubg.js b/assets/zht_api_mp_math_index.md.D09y2ubg.js deleted file mode 100644 index 7a1293e..0000000 --- a/assets/zht_api_mp_math_index.md.D09y2ubg.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"zht/api/mp_math/index.md","filePath":"zht/api/mp_math/index.md"}'),m={name:"zht/api/mp_math/index.md"};function p(n,i,r,c,o,s){return a(),e("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/zht_api_mp_math_index.md.D09y2ubg.lean.js b/assets/zht_api_mp_math_index.md.D09y2ubg.lean.js deleted file mode 100644 index 7a1293e..0000000 --- a/assets/zht_api_mp_math_index.md.D09y2ubg.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as t,c as e,o as a}from"./chunks/framework.BV61Qrc0.js";const d=JSON.parse('{"title":"mbcp.mp_math","description":"","frontmatter":{"title":"mbcp.mp_math"},"headers":[],"relativePath":"zht/api/mp_math/index.md","filePath":"zht/api/mp_math/index.md"}'),m={name:"zht/api/mp_math/index.md"};function p(n,i,r,c,o,s){return a(),e("div")}const h=t(m,[["render",p]]);export{d as __pageData,h as default}; diff --git a/assets/zht_api_mp_math_line.md.DYC1X0oD.js b/assets/zht_api_mp_math_line.md.D3xPFA2p.js similarity index 93% rename from assets/zht_api_mp_math_line.md.DYC1X0oD.js rename to assets/zht_api_mp_math_line.md.D3xPFA2p.js index fb70858..7b7a396 100644 --- a/assets/zht_api_mp_math_line.md.DYC1X0oD.js +++ b/assets/zht_api_mp_math_line.md.D3xPFA2p.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"zht/api/mp_math/line.md","filePath":"zht/api/mp_math/line.md"}'),t={name:"zht/api/mp_math/line.md"},l=n(`

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

變數説明:

  • point: 直线上的一点
  • direction: 直线的方向向量
源碼
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"zht/api/mp_math/line.md","filePath":"zht/api/mp_math/line.md"}'),t={name:"zht/api/mp_math/line.md"},l=n(`

mbcp.mp_math.line

説明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

變數説明:

  • point: 直线上的一点
  • direction: 直线的方向向量
源碼
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -6,7 +6,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -15,7 +15,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

變數説明:

  • other: 另一条直线

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

變數説明:

  • other: 另一条直线

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -25,7 +25,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

變數説明:

  • other: 平行直线或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

變數説明:

  • other: 平行直线或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -48,7 +48,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

變數説明:

  • other: 另一条直线

返回: 交点

抛出:

  • ValueError 直线平行
  • ValueError 直线不共面
源碼
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

變數説明:

  • other: 另一条直线

返回: 交点

抛出:

  • ValueError 直线平行
  • ValueError 直线不共面
源碼
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

變數説明:

  • point: 指定点

返回: 垂线

源碼
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

變數説明:

  • point: 指定点

返回: 垂线

源碼
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -71,7 +71,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

變數説明:

  • t: 参数t

返回: 点

源碼
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

變數説明:

  • t: 参数t

返回: 点

源碼
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -79,13 +79,13 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源碼
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源碼
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -94,7 +94,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

變數説明:

  • other: 另一条直线

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

變數説明:

  • other: 另一条直线

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -102,7 +102,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

變數説明:

  • other: 另一条直线

返回: 是否共线

源碼
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

變數説明:

  • other: 另一条直线

返回: 是否共线

源碼
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -110,7 +110,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

變數説明:

  • point: 点

返回: 是否在直线上

源碼
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

變數説明:

  • point: 点

返回: 是否在直线上

源碼
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -118,7 +118,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

變數説明:

  • other: 另一条直线

返回: 是否共面

源碼
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

變數説明:

  • other: 另一条直线

返回: 是否共面

源碼
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -127,7 +127,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源碼
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源碼
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -140,7 +140,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

變數説明:

  • p1: 点1
  • p2: 点2

返回: 直线

源碼
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

變數説明:

  • p1: 点1
  • p2: 点2

返回: 直线

源碼
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -151,7 +151,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

變數説明:

  • other: 另一条直线

返回: 交点

源碼
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

變數説明:

  • other: 另一条直线

返回: 交点

源碼
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -164,7 +164,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

變數説明:

  • other:
源碼
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

變數説明:

  • other:
源碼
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -175,4 +175,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
`,107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_line.md.DYC1X0oD.lean.js b/assets/zht_api_mp_math_line.md.D3xPFA2p.lean.js similarity index 57% rename from assets/zht_api_mp_math_line.md.DYC1X0oD.lean.js rename to assets/zht_api_mp_math_line.md.D3xPFA2p.lean.js index 3bb8bdc..3eb33da 100644 --- a/assets/zht_api_mp_math_line.md.DYC1X0oD.lean.js +++ b/assets/zht_api_mp_math_line.md.D3xPFA2p.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"zht/api/mp_math/line.md","filePath":"zht/api/mp_math/line.md"}'),t={name:"zht/api/mp_math/line.md"},l=n("",105),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.line","description":"","frontmatter":{"title":"mbcp.mp_math.line"},"headers":[],"relativePath":"zht/api/mp_math/line.md","filePath":"zht/api/mp_math/line.md"}'),t={name:"zht/api/mp_math/line.md"},l=n("",107),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js deleted file mode 100644 index 0bee4c3..0000000 --- a/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l('

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

',34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js b/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js deleted file mode 100644 index d10717e..0000000 --- a/assets/zht_api_mp_math_mp_math_typing.md.DLx0IibM.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.BV61Qrc0.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l("",34),i=[o];function t(s,c,u,g,v,d){return e(),r("div",null,i)}const m=a(n,[["render",t]]);export{p as __pageData,m as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.js b/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.js new file mode 100644 index 0000000..0c66e9b --- /dev/null +++ b/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l('

mbcp.mp_math.mp_math_typing

説明: 本模块用于内部类型提示

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

',36),i=[o];function t(c,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",t]]);export{p as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.lean.js b/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.lean.js new file mode 100644 index 0000000..50190ed --- /dev/null +++ b/assets/zht_api_mp_math_mp_math_typing.md.DTY2F-6g.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing"},"headers":[],"relativePath":"zht/api/mp_math/mp_math_typing.md","filePath":"zht/api/mp_math/mp_math_typing.md"}'),n={name:"zht/api/mp_math/mp_math_typing.md"},o=l("",36),i=[o];function t(c,s,u,d,g,v){return e(),r("div",null,i)}const y=a(n,[["render",t]]);export{p as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_plane.md.B6GWRRF6.js b/assets/zht_api_mp_math_plane.md.DAAO1c38.js similarity index 93% rename from assets/zht_api_mp_math_plane.md.B6GWRRF6.js rename to assets/zht_api_mp_math_plane.md.DAAO1c38.js index 592fc51..5b08a4e 100644 --- a/assets/zht_api_mp_math_plane.md.B6GWRRF6.js +++ b/assets/zht_api_mp_math_plane.md.DAAO1c38.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"zht/api/mp_math/plane.md","filePath":"zht/api/mp_math/plane.md"}'),l={name:"zht/api/mp_math/plane.md"},h=n(`

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

變數説明:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源碼
python
def __init__(self, a: float, b: float, c: float, d: float):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"zht/api/mp_math/plane.md","filePath":"zht/api/mp_math/plane.md"}'),l={name:"zht/api/mp_math/plane.md"},h=n(`

mbcp.mp_math.plane

説明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

變數説明:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源碼
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -10,7 +10,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

變數説明:

  • other: 另一个平面

返回: 是否近似相等

源碼
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

變數説明:

  • other: 另一个平面

返回: 是否近似相等

源碼
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -28,7 +28,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

變數説明:

  • other: 另一个平面

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

變數説明:

  • other: 另一个平面

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -43,7 +43,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

變數説明:

  • other: 另一个平面或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

變數説明:

  • other: 另一个平面或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -58,7 +58,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

變數説明:

  • other: 另一个平面

返回: 两平面的交线

源碼
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

變數説明:

  • other: 另一个平面

返回: 两平面的交线

源碼
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -83,7 +83,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

變數説明:

  • other: 不与平面平行或在平面上的直线

返回: 交点

抛出:

  • ValueError 平面与直线平行或重合
源碼
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

變數説明:

  • other: 不与平面平行或在平面上的直线

返回: 交点

抛出:

  • ValueError 平面与直线平行或重合
源碼
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -97,7 +97,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

變數説明:

  • point: 指定点

返回: 所求平面

源碼
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

變數説明:

  • point: 指定点

返回: 所求平面

源碼
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -105,7 +105,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

變數説明:

  • other: 另一个平面

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

變數説明:

  • other: 另一个平面

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -113,14 +113,14 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

返回: 法向量

源碼
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

返回: 法向量

源碼
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

變數説明:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源碼
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

變數説明:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源碼
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -132,7 +132,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

變數説明:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源碼
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

變數説明:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源碼
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

變數説明:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源碼
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

變數説明:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源碼
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -160,7 +160,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

變數説明:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源碼
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

變數説明:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源碼
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -170,11 +170,11 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源碼
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源碼
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源碼
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源碼
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

變數説明:

  • other:

返回: 不平行平面的交线,平面平行返回None

源碼
python
def __and__(self, other):
+    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

變數説明:

  • other:

返回: 不平行平面的交线,平面平行返回None

源碼
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -191,6 +191,6 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源碼
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源碼
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
`,103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源碼
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源碼
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)
`,105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_plane.md.B6GWRRF6.lean.js b/assets/zht_api_mp_math_plane.md.DAAO1c38.lean.js similarity index 57% rename from assets/zht_api_mp_math_plane.md.B6GWRRF6.lean.js rename to assets/zht_api_mp_math_plane.md.DAAO1c38.lean.js index 9765112..b658e1c 100644 --- a/assets/zht_api_mp_math_plane.md.B6GWRRF6.lean.js +++ b/assets/zht_api_mp_math_plane.md.DAAO1c38.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"zht/api/mp_math/plane.md","filePath":"zht/api/mp_math/plane.md"}'),l={name:"zht/api/mp_math/plane.md"},h=n("",103),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.plane","description":"","frontmatter":{"title":"mbcp.mp_math.plane"},"headers":[],"relativePath":"zht/api/mp_math/plane.md","filePath":"zht/api/mp_math/plane.md"}'),l={name:"zht/api/mp_math/plane.md"},h=n("",105),t=[h];function p(k,e,r,d,E,o){return a(),i("div",null,t)}const y=s(l,[["render",p]]);export{F as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_point.md.Bm1IEwlI.lean.js b/assets/zht_api_mp_math_point.md.Bm1IEwlI.lean.js deleted file mode 100644 index 606cff7..0000000 --- a/assets/zht_api_mp_math_point.md.Bm1IEwlI.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"zht/api/mp_math/point.md","filePath":"zht/api/mp_math/point.md"}'),n={name:"zht/api/mp_math/point.md"},l=t("",34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_point.md.Bm1IEwlI.js b/assets/zht_api_mp_math_point.md.CK50W0JG.js similarity index 84% rename from assets/zht_api_mp_math_point.md.Bm1IEwlI.js rename to assets/zht_api_mp_math_point.md.CK50W0JG.js index 52ae783..36ee763 100644 --- a/assets/zht_api_mp_math_point.md.Bm1IEwlI.js +++ b/assets/zht_api_mp_math_point.md.CK50W0JG.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"zht/api/mp_math/point.md","filePath":"zht/api/mp_math/point.md"}'),n={name:"zht/api/mp_math/point.md"},l=t(`

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

變數説明:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源碼
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"zht/api/mp_math/point.md","filePath":"zht/api/mp_math/point.md"}'),n={name:"zht/api/mp_math/point.md"},h=t(`

mbcp.mp_math.point

説明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

變數説明:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源碼
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -18,11 +18,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源碼
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: P + V -> P P + P -> P

變數説明:

  • other:
源碼
python
def __add__(self, other):
+    ...

method self + other

説明: P + V -> P P + P -> P

變數説明:

  • other:
源碼
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -30,14 +30,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

變數説明:

  • other:
源碼
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

變數説明:

  • other:
源碼
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

變數説明:

  • other:
源碼
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

變數説明:

  • other:
源碼
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -48,4 +48,4 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,34),h=[l];function e(p,k,o,r,d,E){return a(),i("div",null,h)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
`,36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_point.md.CK50W0JG.lean.js b/assets/zht_api_mp_math_point.md.CK50W0JG.lean.js new file mode 100644 index 0000000..a3b770a --- /dev/null +++ b/assets/zht_api_mp_math_point.md.CK50W0JG.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.point","description":"","frontmatter":{"title":"mbcp.mp_math.point"},"headers":[],"relativePath":"zht/api/mp_math/point.md","filePath":"zht/api/mp_math/point.md"}'),n={name:"zht/api/mp_math/point.md"},h=t("",36),l=[h];function e(p,k,o,r,d,E){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_segment.md.Bop8t2IE.js b/assets/zht_api_mp_math_segment.md.BK0QQket.js similarity index 70% rename from assets/zht_api_mp_math_segment.md.Bop8t2IE.js rename to assets/zht_api_mp_math_segment.md.BK0QQket.js index 69a3d5c..e5587a9 100644 --- a/assets/zht_api_mp_math_segment.md.Bop8t2IE.js +++ b/assets/zht_api_mp_math_segment.md.BK0QQket.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"zht/api/mp_math/segment.md","filePath":"zht/api/mp_math/segment.md"}'),t={name:"zht/api/mp_math/segment.md"},h=n(`

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

源碼
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"zht/api/mp_math/segment.md","filePath":"zht/api/mp_math/segment.md"}'),t={name:"zht/api/mp_math/segment.md"},h=n(`

mbcp.mp_math.segment

説明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

源碼
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -11,4 +11,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
`,6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_segment.md.BK0QQket.lean.js b/assets/zht_api_mp_math_segment.md.BK0QQket.lean.js new file mode 100644 index 0000000..10f6519 --- /dev/null +++ b/assets/zht_api_mp_math_segment.md.BK0QQket.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const F=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"zht/api/mp_math/segment.md","filePath":"zht/api/mp_math/segment.md"}'),t={name:"zht/api/mp_math/segment.md"},h=n("",6),p=[h];function l(e,k,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{F as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_segment.md.Bop8t2IE.lean.js b/assets/zht_api_mp_math_segment.md.Bop8t2IE.lean.js deleted file mode 100644 index 8f983aa..0000000 --- a/assets/zht_api_mp_math_segment.md.Bop8t2IE.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.mp_math.segment","description":"","frontmatter":{"title":"mbcp.mp_math.segment"},"headers":[],"relativePath":"zht/api/mp_math/segment.md","filePath":"zht/api/mp_math/segment.md"}'),t={name:"zht/api/mp_math/segment.md"},h=n("",4),p=[h];function l(k,e,r,d,E,g){return a(),i("div",null,p)}const y=s(t,[["render",l]]);export{o as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_utils.md.CERv8c-M.js b/assets/zht_api_mp_math_utils.md.BQrrPf8T.js similarity index 66% rename from assets/zht_api_mp_math_utils.md.CERv8c-M.js rename to assets/zht_api_mp_math_utils.md.BQrrPf8T.js index 2f7a9f6..1627c9c 100644 --- a/assets/zht_api_mp_math_utils.md.CERv8c-M.js +++ b/assets/zht_api_mp_math_utils.md.BQrrPf8T.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"zht/api/mp_math/utils.md","filePath":"zht/api/mp_math/utils.md"}'),t={name:"zht/api/mp_math/utils.md"},l=n(`

func clamp() -> float

説明: 区间限定函数

變數説明:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源碼
python
def clamp(x: float, min_: float, max_: float) -> float:
+import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"zht/api/mp_math/utils.md","filePath":"zht/api/mp_math/utils.md"}'),t={name:"zht/api/mp_math/utils.md"},l=n(`

mbcp.mp_math.utils

説明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

説明: 区间限定函数

變數説明:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源碼
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -9,7 +9,20 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

變數説明:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

源碼
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

源碼
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

源碼
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源碼
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

變數説明:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -19,7 +32,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

説明: 获取数的符号。

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

説明: 获取数的符号。

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -32,7 +45,7 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -48,17 +61,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

源碼
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

源碼
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

源碼
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源碼
python
def __ne__(self, other):
-    return not self.__eq__(other)
`,33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; + return ''
`,35),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_utils.md.CERv8c-M.lean.js b/assets/zht_api_mp_math_utils.md.BQrrPf8T.lean.js similarity index 57% rename from assets/zht_api_mp_math_utils.md.CERv8c-M.lean.js rename to assets/zht_api_mp_math_utils.md.BQrrPf8T.lean.js index 2a6f2c3..b89db5c 100644 --- a/assets/zht_api_mp_math_utils.md.CERv8c-M.lean.js +++ b/assets/zht_api_mp_math_utils.md.BQrrPf8T.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"zht/api/mp_math/utils.md","filePath":"zht/api/mp_math/utils.md"}'),t={name:"zht/api/mp_math/utils.md"},l=n("",33),h=[l];function p(k,e,r,d,o,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const E=JSON.parse('{"title":"mbcp.mp_math.utils","description":"","frontmatter":{"title":"mbcp.mp_math.utils"},"headers":[],"relativePath":"zht/api/mp_math/utils.md","filePath":"zht/api/mp_math/utils.md"}'),t={name:"zht/api/mp_math/utils.md"},l=n("",35),h=[l];function p(e,k,r,o,d,g){return a(),i("div",null,h)}const y=s(t,[["render",p]]);export{E as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_vector.md.BTWxlpB1.js b/assets/zht_api_mp_math_vector.md.CtYckwOL.js similarity index 90% rename from assets/zht_api_mp_math_vector.md.BTWxlpB1.js rename to assets/zht_api_mp_math_vector.md.CtYckwOL.js index 6306e26..574aa63 100644 --- a/assets/zht_api_mp_math_vector.md.BTWxlpB1.js +++ b/assets/zht_api_mp_math_vector.md.CtYckwOL.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/api/mp_math/vector.md"},h=t(`

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

變數説明:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源碼
python
def __init__(self, x: float, y: float, z: float):
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/api/mp_math/vector.md"},h=t(`

mbcp.mp_math.vector

説明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

變數説明:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源碼
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -8,7 +8,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -18,7 +18,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

變數説明:

  • other: 另一个向量

返回: 夹角

源碼
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

變數説明:

  • other: 另一个向量

返回: 夹角

源碼
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -26,7 +26,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

變數説明:

  • other:

返回: 行列式的结果

源碼
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

變數説明:

  • other:

返回: 行列式的结果

源碼
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -46,7 +46,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

變數説明:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

變數説明:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -55,7 +55,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

變數説明:

  • other: 另一个向量

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

變數説明:

  • other: 另一个向量

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -63,7 +63,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

源碼
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

源碼
python
def normalize(self):
     """
         将向量归一化。
 
@@ -72,32 +72,32 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

源碼
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

源碼
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

返回: 模

源碼
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

返回: 模

源碼
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

返回: 单位向量

源碼
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

返回: 单位向量

源碼
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

源碼
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

源碼
python
@overload
+    return self / self.length

method __abs__(self)

源碼
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

源碼
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: V + P -> P

V + V -> V

變數説明:

  • other:
源碼
python
def __add__(self, other):
+    ...

method self + other

説明: V + P -> P

V + V -> V

變數説明:

  • other:
源碼
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -112,7 +112,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

變數説明:

  • other:

返回: 是否相等

源碼
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

變數説明:

  • other:

返回: 是否相等

源碼
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -120,7 +120,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

源碼
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

源碼
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -128,11 +128,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源碼
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源碼
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

源碼
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

説明: V - P -> P

V - V -> V

變數説明:

  • other:
源碼
python
def __sub__(self, other):
+    ...

method self - other

説明: V - P -> P

V - V -> V

變數説明:

  • other:
源碼
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -146,7 +146,7 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

變數説明:

  • other:
源碼
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

變數説明:

  • other:
源碼
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -157,11 +157,11 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源碼
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源碼
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

源碼
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

源碼
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

變數説明:

  • other:
源碼
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

變數説明:

  • other:
源碼
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -174,14 +174,14 @@ import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源碼
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

變數説明:

  • other:
源碼
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源碼
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

變數説明:

  • other:
源碼
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源碼
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源碼
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 類型: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 類型: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 類型: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 類型: Vector3

  • 説明: z轴单位向量

`,125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源碼
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源碼
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 類型: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 類型: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 類型: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 類型: Vector3

  • 説明: z轴单位向量

`,127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_mp_math_vector.md.BTWxlpB1.lean.js b/assets/zht_api_mp_math_vector.md.CtYckwOL.lean.js similarity index 57% rename from assets/zht_api_mp_math_vector.md.BTWxlpB1.lean.js rename to assets/zht_api_mp_math_vector.md.CtYckwOL.lean.js index 28e1cd9..9790731 100644 --- a/assets/zht_api_mp_math_vector.md.BTWxlpB1.lean.js +++ b/assets/zht_api_mp_math_vector.md.CtYckwOL.lean.js @@ -1 +1 @@ -import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/api/mp_math/vector.md"},h=t("",125),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.mp_math.vector","description":"","frontmatter":{"title":"mbcp.mp_math.vector"},"headers":[],"relativePath":"zht/api/mp_math/vector.md","filePath":"zht/api/mp_math/vector.md"}'),n={name:"zht/api/mp_math/vector.md"},h=t("",127),l=[h];function e(p,k,r,o,d,g){return a(),i("div",null,l)}const F=s(n,[["render",e]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_particle_index.md.CljeoVXn.js b/assets/zht_api_particle_index.md.CljeoVXn.js new file mode 100644 index 0000000..6bce6c3 --- /dev/null +++ b/assets/zht_api_particle_index.md.CljeoVXn.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"zht/api/particle/index.md","filePath":"zht/api/particle/index.md"}'),i={name:"zht/api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),t(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=a(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/zht_api_particle_index.md.CljeoVXn.lean.js b/assets/zht_api_particle_index.md.CljeoVXn.lean.js new file mode 100644 index 0000000..6bce6c3 --- /dev/null +++ b/assets/zht_api_particle_index.md.CljeoVXn.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","collapsed":true},"headers":[],"relativePath":"zht/api/particle/index.md","filePath":"zht/api/particle/index.md"}'),i={name:"zht/api/particle/index.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),t(": 本模块定义了粒子生成相关的工具")],-1),n=[p,l];function o(s,d,_,m,h,f){return r(),c("div",null,n)}const u=a(i,[["render",o]]);export{b as __pageData,u as default}; diff --git a/assets/zht_api_particle_index.md.kAm9VAEw.js b/assets/zht_api_particle_index.md.kAm9VAEw.js deleted file mode 100644 index 371e4b1..0000000 --- a/assets/zht_api_particle_index.md.kAm9VAEw.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"zht/api/particle/index.md","filePath":"zht/api/particle/index.md"}'),i={name:"zht/api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/zht_api_particle_index.md.kAm9VAEw.lean.js b/assets/zht_api_particle_index.md.kAm9VAEw.lean.js deleted file mode 100644 index 371e4b1..0000000 --- a/assets/zht_api_particle_index.md.kAm9VAEw.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as a}from"./chunks/framework.BV61Qrc0.js";const m=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle"},"headers":[],"relativePath":"zht/api/particle/index.md","filePath":"zht/api/particle/index.md"}'),i={name:"zht/api/particle/index.md"};function r(c,p,n,o,s,d){return a(),t("div")}const _=e(i,[["render",r]]);export{m as __pageData,_ as default}; diff --git a/assets/zht_api_presets_index.md.BmouaEaT.js b/assets/zht_api_presets_index.md.BmouaEaT.js deleted file mode 100644 index 46ea01d..0000000 --- a/assets/zht_api_presets_index.md.BmouaEaT.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"zht/api/presets/index.md","filePath":"zht/api/presets/index.md"}'),a={name:"zht/api/presets/index.md"};function r(p,n,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/zht_api_presets_index.md.BmouaEaT.lean.js b/assets/zht_api_presets_index.md.BmouaEaT.lean.js deleted file mode 100644 index 46ea01d..0000000 --- a/assets/zht_api_presets_index.md.BmouaEaT.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e,c as t,o as s}from"./chunks/framework.BV61Qrc0.js";const _=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets"},"headers":[],"relativePath":"zht/api/presets/index.md","filePath":"zht/api/presets/index.md"}'),a={name:"zht/api/presets/index.md"};function r(p,n,i,c,o,d){return s(),t("div")}const f=e(a,[["render",r]]);export{_ as __pageData,f as default}; diff --git a/assets/zht_api_presets_index.md.DEbOKiST.js b/assets/zht_api_presets_index.md.DEbOKiST.js new file mode 100644 index 0000000..7e0f5f8 --- /dev/null +++ b/assets/zht_api_presets_index.md.DEbOKiST.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"zht/api/presets/index.md","filePath":"zht/api/presets/index.md"}'),r={name:"zht/api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,h,_,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/zht_api_presets_index.md.DEbOKiST.lean.js b/assets/zht_api_presets_index.md.DEbOKiST.lean.js new file mode 100644 index 0000000..7e0f5f8 --- /dev/null +++ b/assets/zht_api_presets_index.md.DEbOKiST.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","collapsed":true},"headers":[],"relativePath":"zht/api/presets/index.md","filePath":"zht/api/presets/index.md"}'),r={name:"zht/api/presets/index.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(d,m,h,_,u,f){return o(),a("div",null,l)}const x=s(r,[["render",c]]);export{b as __pageData,x as default}; diff --git a/assets/en_api_presets_model_index.md.Cs8vON2C.js b/assets/zht_api_presets_model_index.md.3pGdZAT9.js similarity index 80% rename from assets/en_api_presets_model_index.md.Cs8vON2C.js rename to assets/zht_api_presets_model_index.md.3pGdZAT9.js index 9fd5731..b145c65 100644 --- a/assets/en_api_presets_model_index.md.Cs8vON2C.js +++ b/assets/zht_api_presets_model_index.md.3pGdZAT9.js @@ -1,4 +1,4 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"en/api/presets/model/index.md","filePath":"en/api/presets/model/index.md"}'),t={name:"en/api/presets/model/index.md"},h=n(`

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

Return: List[Point3]: 球体上的点集。

Source code
python
@staticmethod
+import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"zht/api/presets/model/index.md","filePath":"zht/api/presets/model/index.md"}'),n={name:"zht/api/presets/model/index.md"},h=t(`

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

變數説明:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源碼
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -15,4 +15,4 @@ import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const y
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{y as __pageData,F as default}; + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(n,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/zht_api_presets_model_index.md.3pGdZAT9.lean.js b/assets/zht_api_presets_model_index.md.3pGdZAT9.lean.js new file mode 100644 index 0000000..bb959e6 --- /dev/null +++ b/assets/zht_api_presets_model_index.md.3pGdZAT9.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as t}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","collapsed":true},"headers":[],"relativePath":"zht/api/presets/model/index.md","filePath":"zht/api/presets/model/index.md"}'),n={name:"zht/api/presets/model/index.md"},h=t("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(n,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/zht_api_presets_model_index.md.SQ5PPdaL.lean.js b/assets/zht_api_presets_model_index.md.SQ5PPdaL.lean.js deleted file mode 100644 index 6adfabc..0000000 --- a/assets/zht_api_presets_model_index.md.SQ5PPdaL.lean.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.BV61Qrc0.js";const o=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model"},"headers":[],"relativePath":"zht/api/presets/model/index.md","filePath":"zht/api/presets/model/index.md"}'),t={name:"zht/api/presets/model/index.md"},h=n("",8),l=[h];function k(p,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",k]]);export{o as __pageData,F as default}; diff --git a/assets/zht_guide_index.md.CsuFVFxu.js b/assets/zht_guide_index.md.CsuFVFxu.js new file mode 100644 index 0000000..f36f947 --- /dev/null +++ b/assets/zht_guide_index.md.CsuFVFxu.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"zht/guide/index.md","filePath":"zht/guide/index.md"}'),n={name:"zht/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o('',1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/zht_guide_index.md.CsuFVFxu.lean.js b/assets/zht_guide_index.md.CsuFVFxu.lean.js new file mode 100644 index 0000000..2f76e4d --- /dev/null +++ b/assets/zht_guide_index.md.CsuFVFxu.lean.js @@ -0,0 +1 @@ +import{_ as T,c as e,j as t,a as s,o as a,a2 as o}from"./chunks/framework.C94oF1kp.js";const H=JSON.parse('{"title":"开始不了一点","description":"","frontmatter":{},"headers":[],"relativePath":"zht/guide/index.md","filePath":"zht/guide/index.md"}'),n={name:"zht/guide/index.md"},Q=t("h1",{id:"开始不了一点",tabindex:"-1"},[s("开始不了一点 "),t("a",{class:"header-anchor",href:"#开始不了一点","aria-label":'Permalink to "开始不了一点"'},"​")],-1),l={class:"MathJax",jax:"SVG",style:{direction:"ltr",position:"relative"}},d={style:{overflow:"visible","min-height":"1px","min-width":"1px","vertical-align":"-0.771ex"},xmlns:"http://www.w3.org/2000/svg",width:"7.561ex",height:"3.042ex",role:"img",focusable:"false",viewBox:"0 -1003.5 3342.1 1344.3","aria-hidden":"true"},r=o("",1),i=[r],m=t("mjx-assistive-mml",{unselectable:"on",display:"inline",style:{top:"0px",left:"0px",clip:"rect(1px, 1px, 1px, 1px)","-webkit-touch-callout":"none","-webkit-user-select":"none","-khtml-user-select":"none","-moz-user-select":"none","-ms-user-select":"none","user-select":"none",position:"absolute",padding:"1px 0px 0px 0px",border:"0px",display:"block",width:"auto",overflow:"hidden"}},[t("math",{xmlns:"http://www.w3.org/1998/Math/MathML"},[t("msubsup",null,[t("mo",{"data-mjx-texclass":"OP"},"∫"),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"1")]),t("mrow",{"data-mjx-texclass":"ORD"},[t("mn",null,"2")])]),t("mi",null,"x"),t("mn",null,"111")])],-1);function c(h,p,x,_,g,u){return a(),e("div",null,[Q,t("p",null,[t("mjx-container",l,[(a(),e("svg",d,i)),m])])])}const w=T(n,[["render",c]]);export{H as __pageData,w as default}; diff --git a/assets/zht_index.md.V9U3SwDR.js b/assets/zht_index.md.V9U3SwDR.js new file mode 100644 index 0000000..2b0bb84 --- /dev/null +++ b/assets/zht_index.md.V9U3SwDR.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用於幾何運算和粒子製作的軟體庫","actions":[{"theme":"brand","text":"跟隨引導","link":"./guide/"},{"theme":"alt","text":"API文檔","link":"./api/"}]},"features":[{"title":"高度易用","details":"通過簡單的接口,實現了大部分幾何運算及粒子製作的需求"},{"title":"高度集成","details":"對numpyscipysympy進行了封裝和集成,使腳本編寫像使用Geogebra一樣easy"},{"title":"內置預設","details":"提供了大量的預設,包括常見的幾何圖形、粒子效果等,便於快速生產"}]},"headers":[],"relativePath":"zht/index.md","filePath":"zht/index.md"}'),o={name:"zht/index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const h=e(o,[["render",i]]);export{m as __pageData,h as default}; diff --git a/assets/zht_index.md.V9U3SwDR.lean.js b/assets/zht_index.md.V9U3SwDR.lean.js new file mode 100644 index 0000000..2b0bb84 --- /dev/null +++ b/assets/zht_index.md.V9U3SwDR.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"MBCP docs","text":"More basic change particle","tagline":"用於幾何運算和粒子製作的軟體庫","actions":[{"theme":"brand","text":"跟隨引導","link":"./guide/"},{"theme":"alt","text":"API文檔","link":"./api/"}]},"features":[{"title":"高度易用","details":"通過簡單的接口,實現了大部分幾何運算及粒子製作的需求"},{"title":"高度集成","details":"對numpyscipysympy進行了封裝和集成,使腳本編寫像使用Geogebra一樣easy"},{"title":"內置預設","details":"提供了大量的預設,包括常見的幾何圖形、粒子效果等,便於快速生產"}]},"headers":[],"relativePath":"zht/index.md","filePath":"zht/index.md"}'),o={name:"zht/index.md"};function i(c,n,d,s,r,l){return a(),t("div")}const h=e(o,[["render",i]]);export{m as __pageData,h as default}; diff --git a/demo/index.html b/demo/index.html new file mode 100644 index 0000000..1823588 --- /dev/null +++ b/demo/index.html @@ -0,0 +1,24 @@ + + + + + + demo | MBCP docs + + + + + + + + + + + + + +
Skip to content

demo

文档由 VitePress 构建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/en/api/index.html b/en/api/index.html index d6c3f56..38d943e 100644 --- a/en/api/index.html +++ b/en/api/index.html @@ -6,19 +6,19 @@ mbcp | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp

Description: 本模块塞了一些预设的粒子生成器

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/angle.html b/en/api/mp_math/angle.html index d71eca0..df10f19 100644 --- a/en/api/mp_math/angle.html +++ b/en/api/mp_math/angle.html @@ -6,18 +6,18 @@ mbcp.mp_math.angle | MBCP docs - + - + - - - + + + -
Skip to content

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

Description: 任意角度。

Arguments:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
Source code
python
def __init__(self, value: float, is_radian: bool=False):
+    
Skip to content

mbcp.mp_math.angle

Description: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

Description: 任意角度。

Arguments:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
Source code
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -27,96 +27,96 @@
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

Description: 余角:两角的和为90°。

Return: 余角

Source code
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

Description: 余角:两角的和为90°。

Return: 余角

Source code
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

Description: 补角:两角的和为180°。

Return: 补角

Source code
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

Description: 补角:两角的和为180°。

Return: 补角

Source code
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

Description: 角度。

Return: 弧度

Source code
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

Description: 角度。

Return: 弧度

Source code
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

Description: 最小正角。

Return: 最小正角度

Source code
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

Description: 最小正角。

Return: 最小正角度

Source code
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

Description: 最大负角。

Return: 最大负角度

Source code
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

Description: 最大负角。

Return: 最大负角度

Source code
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

Description: 正弦值。

Return: 正弦值

Source code
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

Description: 正弦值。

Return: 正弦值

Source code
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

Description: 余弦值。

Return: 余弦值

Source code
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

Description: 余弦值。

Return: 余弦值

Source code
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

Description: 正切值。

Return: 正切值

Source code
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

Description: 正切值。

Return: 正切值

Source code
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

Description: 余切值。

Return: 余切值

Source code
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

Description: 余切值。

Return: 余切值

Source code
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

Description: 正割值。

Return: 正割值

Source code
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

Description: 正割值。

Return: 正割值

Source code
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

Description: 余割值。

Return: 余割值

Source code
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

Description: 余割值。

Return: 余割值

Source code
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

Source code
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

Source code
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

Source code
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

Source code
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

Source code
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

Source code
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

Source code
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

Source code
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

Source code
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

Source code
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

Source code
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

Source code
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

Source code
python
def __truediv__(self, other):
+    ...

method self / other

Source code
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
- + return AnyAngle(self.radian / other, is_radian=True)

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/const.html b/en/api/mp_math/const.html index 8764923..621789e 100644 --- a/en/api/mp_math/const.html +++ b/en/api/mp_math/const.html @@ -6,19 +6,19 @@ mbcp.mp_math.const | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math.const

Description: 本模块定义了一些常用的常量

var PI = math.pi

  • Description: 常量 π

var E = math.e

  • Description: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • Description: 黄金分割比

var GAMMA = 0.5772156649015329

  • Description: 欧拉常数

var EPSILON = 0.0001

  • Description: 精度误差

var APPROX = 0.001

  • Description: 约等于判定误差

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/equation.html b/en/api/mp_math/equation.html index 42e5cc5..114ccf2 100644 --- a/en/api/mp_math/equation.html +++ b/en/api/mp_math/equation.html @@ -6,18 +6,40 @@ mbcp.mp_math.equation | MBCP docs - + - + - - - + + + -
Skip to content

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

Description: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

Arguments:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

Return: 偏导函数

Raises:

  • ValueError 无效变量类型
Source code
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+    
Skip to content

mbcp.mp_math.equation

Description: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

Description: 计算曲线上的点。

Arguments:

  • *t:
  • 参数:

Return: 目标点

Source code
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

Description: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

Arguments:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

Return: 偏导函数

Raises:

  • ValueError 无效变量类型
Source code
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -59,7 +81,7 @@
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

Description: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

Arguments:

  • func: 函数
  • *args: 参数

Return: 柯里化后的函数

Source code
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

Description: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

Arguments:

  • func: 函数
  • *args: 参数

Return: 柯里化后的函数

Source code
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -74,30 +96,8 @@
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

Description: 曲线方程。

Arguments:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
Source code
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

Description: 计算曲线上的点。

Arguments:

  • *t:
  • 参数:
Source code
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + return curried_func

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/function.html b/en/api/mp_math/function.html new file mode 100644 index 0000000..20380ce --- /dev/null +++ b/en/api/mp_math/function.html @@ -0,0 +1,40 @@ + + + + + + mbcp.mp_math.function | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.mp_math.function

Description: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

Description: 计算三元函数在某点的梯度向量。

TIP

已知一个函数f(x,y,z),则其在点(x0,y0,z0)处的梯度向量为: f(x0,y0,z0)=(fx,fy,fz)

Arguments:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

Return: 梯度

Source code
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\nabla f(x_0, y_0, z_0) = \\left(\\frac{\\partial f}{\\partial x}, \\frac{\\partial f}{\\partial y}, \\frac{\\partial f}{\\partial z}\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/api/mp_math/index.html b/en/api/mp_math/index.html index d2bc901..184e40f 100644 --- a/en/api/mp_math/index.html +++ b/en/api/mp_math/index.html @@ -6,19 +6,19 @@ mbcp.mp_math | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math

Description: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/line.html b/en/api/mp_math/line.html index 8abe146..f9b3155 100644 --- a/en/api/mp_math/line.html +++ b/en/api/mp_math/line.html @@ -6,18 +6,18 @@ mbcp.mp_math.line | MBCP docs - + - + - - - + + + -
Skip to content

class Line3

method __init__(self, point: Point3, direction: Vector3)

Description: 三维空间中的直线。由一个点和一个方向向量确定。

Arguments:

  • point: 直线上的一点
  • direction: 直线的方向向量
Source code
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+    
Skip to content

mbcp.mp_math.line

Description: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

Description: 三维空间中的直线。由一个点和一个方向向量确定。

Arguments:

  • point: 直线上的一点
  • direction: 直线的方向向量
Source code
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -25,7 +25,7 @@
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

Description: 判断两条直线是否近似相等。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

Description: 判断两条直线是否近似相等。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -34,7 +34,7 @@
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

Description: 计算直线和直线之间的夹角。

Arguments:

  • other: 另一条直线

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

Description: 计算直线和直线之间的夹角。

Arguments:

  • other: 另一条直线

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -44,7 +44,7 @@
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

Description: 计算直线和直线或点之间的距离。

Arguments:

  • other: 平行直线或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

Description: 计算直线和直线或点之间的距离。

Arguments:

  • other: 平行直线或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -67,7 +67,7 @@
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

Description: 计算两条直线的交点。

Arguments:

  • other: 另一条直线

Return: 交点

Raises:

  • ValueError 直线平行
  • ValueError 直线不共面
Source code
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

Description: 计算两条直线的交点。

Arguments:

  • other: 另一条直线

Return: 交点

Raises:

  • ValueError 直线平行
  • ValueError 直线不共面
Source code
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -82,7 +82,7 @@
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

Description: 计算直线经过指定点p的垂线。

Arguments:

  • point: 指定点

Return: 垂线

Source code
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

Description: 计算直线经过指定点p的垂线。

Arguments:

  • point: 指定点

Return: 垂线

Source code
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -90,7 +90,7 @@
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

Description: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

Arguments:

  • t: 参数t

Return: 点

Source code
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

Description: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

Arguments:

  • t: 参数t

Return: 点

Source code
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -98,13 +98,13 @@
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

Description: 获取直线的参数方程。

Return: x(t), y(t), z(t)

Source code
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

Description: 获取直线的参数方程。

Return: x(t), y(t), z(t)

Source code
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

Description: 判断两条直线是否近似平行。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

Description: 判断两条直线是否近似平行。

Arguments:

  • other: 另一条直线
  • epsilon: 误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -113,7 +113,7 @@
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

Description: 判断两条直线是否平行。

Arguments:

  • other: 另一条直线

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

Description: 判断两条直线是否平行。

Arguments:

  • other: 另一条直线

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -121,7 +121,7 @@
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

Description: 判断两条直线是否共线。

Arguments:

  • other: 另一条直线

Return: 是否共线

Source code
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

Description: 判断两条直线是否共线。

Arguments:

  • other: 另一条直线

Return: 是否共线

Source code
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -129,7 +129,7 @@
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

Description: 判断点是否在直线上。

Arguments:

  • point: 点

Return: 是否在直线上

Source code
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

Description: 判断点是否在直线上。

Arguments:

  • point: 点

Return: 是否在直线上

Source code
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -137,7 +137,7 @@
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

Description: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

Arguments:

  • other: 另一条直线

Return: 是否共面

Source code
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

Description: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

Arguments:

  • other: 另一条直线

Return: 是否共面

Source code
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -146,7 +146,7 @@
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

Description: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

Source code
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

Description: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

Source code
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -159,7 +159,7 @@
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

Description: 工厂函数 由两点构造直线。

Arguments:

  • p1: 点1
  • p2: 点2

Return: 直线

Source code
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

Description: 工厂函数 由两点构造直线。

Arguments:

  • p1: 点1
  • p2: 点2

Return: 直线

Source code
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -170,7 +170,7 @@
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

Description: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

Arguments:

  • other: 另一条直线

Return: 交点

Source code
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

Description: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

Arguments:

  • other: 另一条直线

Return: 交点

Source code
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -183,7 +183,7 @@
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

Description: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

Arguments:

  • other:
Source code
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

Description: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

Arguments:

  • other:
Source code
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -194,8 +194,8 @@
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
- + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/mp_math_typing.html b/en/api/mp_math/mp_math_typing.html index 60a31bb..2fc2bd6 100644 --- a/en/api/mp_math/mp_math_typing.html +++ b/en/api/mp_math/mp_math_typing.html @@ -6,19 +6,19 @@ mbcp.mp_math.mp_math_typing | MBCP docs - + - + - - - + + + -
Skip to content

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • Description: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • Description: 数组变量

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

- +
Skip to content

mbcp.mp_math.mp_math_typing

Description: 本模块用于内部类型提示

var RealNumber = int | float

  • Type: TypeAlias

  • Description: 实数

var Number = RealNumber | complex

  • Type: TypeAlias

  • Description: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • Description: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • Description: 数组变量

var Var = SingleVar | ArrayVar

  • Type: TypeAlias

  • Description: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • Type: TypeAlias

  • Description: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • Type: TypeAlias

  • Description: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • Type: TypeAlias

  • Description: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • Type: TypeAlias

  • Description: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • Type: TypeAlias

  • Description: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • Type: TypeAlias

  • Description: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • Type: TypeAlias

  • Description: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • Type: TypeAlias

  • Description: 多元函数

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/plane.html b/en/api/mp_math/plane.html index 09539fe..7070657 100644 --- a/en/api/mp_math/plane.html +++ b/en/api/mp_math/plane.html @@ -6,18 +6,18 @@ mbcp.mp_math.plane | MBCP docs - + - + - - - + + + -
Skip to content

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

Description: 平面方程:ax + by + cz + d = 0

Arguments:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
Source code
python
def __init__(self, a: float, b: float, c: float, d: float):
+    
Skip to content

mbcp.mp_math.plane

Description: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

Description: 平面方程:ax + by + cz + d = 0

Arguments:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
Source code
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -29,7 +29,7 @@
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

Description: 判断两个平面是否近似相等。

Arguments:

  • other: 另一个平面

Return: 是否近似相等

Source code
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

Description: 判断两个平面是否近似相等。

Arguments:

  • other: 另一个平面

Return: 是否近似相等

Source code
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -47,7 +47,7 @@
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

Description: 计算平面与平面之间的夹角。

Arguments:

  • other: 另一个平面

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

Description: 计算平面与平面之间的夹角。

Arguments:

  • other: 另一个平面

Return: 夹角弧度

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -62,7 +62,7 @@
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

Description: 计算平面与平面或点之间的距离。

Arguments:

  • other: 另一个平面或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

Description: 计算平面与平面或点之间的距离。

Arguments:

  • other: 另一个平面或点

Return: 距离

Raises:

  • TypeError 不支持的类型
Source code
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -77,7 +77,7 @@
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

Description: 计算两平面的交线。

Arguments:

  • other: 另一个平面

Return: 两平面的交线

Source code
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

Description: 计算两平面的交线。

Arguments:

  • other: 另一个平面

Return: 两平面的交线

Source code
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -102,7 +102,7 @@
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

Description: 计算平面与直线的交点。

Arguments:

  • other: 不与平面平行或在平面上的直线

Return: 交点

Raises:

  • ValueError 平面与直线平行或重合
Source code
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

Description: 计算平面与直线的交点。

Arguments:

  • other: 不与平面平行或在平面上的直线

Return: 交点

Raises:

  • ValueError 平面与直线平行或重合
Source code
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -116,7 +116,7 @@
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

Description: 计算平行于该平面且过指定点的平面。

Arguments:

  • point: 指定点

Return: 所求平面

Source code
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

Description: 计算平行于该平面且过指定点的平面。

Arguments:

  • point: 指定点

Return: 所求平面

Source code
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -124,7 +124,7 @@
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

Description: 判断两个平面是否平行。

Arguments:

  • other: 另一个平面

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

Description: 判断两个平面是否平行。

Arguments:

  • other: 另一个平面

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -132,14 +132,14 @@
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

Description: 平面的法向量。

Return: 法向量

Source code
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

Description: 平面的法向量。

Return: 法向量

Source code
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

Description: 工厂函数 由点和法向量构造平面(点法式构造)。

Arguments:

  • point: 平面上的一点
  • normal: 法向量

Return: 平面

Source code
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

Description: 工厂函数 由点和法向量构造平面(点法式构造)。

Arguments:

  • point: 平面上的一点
  • normal: 法向量

Return: 平面

Source code
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -151,7 +151,7 @@
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

Description: 工厂函数 由三点构造平面。

Arguments:

  • p1: 点1
  • p2: 点2
  • p3: 点3

Return: 平面

Source code
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

Description: 工厂函数 由三点构造平面。

Arguments:

  • p1: 点1
  • p2: 点2
  • p3: 点3

Return: 平面

Source code
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -165,7 +165,7 @@
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

Description: 工厂函数 由两直线构造平面。

Arguments:

  • l1: 直线1
  • l2: 直线2

Return: 平面

Source code
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

Description: 工厂函数 由两直线构造平面。

Arguments:

  • l1: 直线1
  • l2: 直线2

Return: 平面

Source code
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -179,7 +179,7 @@
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

Description: 工厂函数 由点和直线构造平面。

Arguments:

  • point: 面上一点
  • line: 面上直线,不包含点

Return: 平面

Source code
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

Description: 工厂函数 由点和直线构造平面。

Arguments:

  • point: 面上一点
  • line: 面上直线,不包含点

Return: 平面

Source code
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -189,11 +189,11 @@
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

Source code
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

Source code
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

Source code
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

Source code
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

Description: 取两平面的交集(人话:交线)

Arguments:

  • other:

Return: 不平行平面的交线,平面平行返回None

Source code
python
def __and__(self, other):
+    ...

method __and__(self, other)

Description: 取两平面的交集(人话:交线)

Arguments:

  • other:

Return: 不平行平面的交线,平面平行返回None

Source code
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -210,10 +210,10 @@
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

Source code
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
- + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

Source code
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/point.html b/en/api/mp_math/point.html index de3aa24..6c8fd83 100644 --- a/en/api/mp_math/point.html +++ b/en/api/mp_math/point.html @@ -6,18 +6,18 @@ mbcp.mp_math.point | MBCP docs - + - + - - - + + + -
Skip to content

class Point3

method __init__(self, x: float, y: float, z: float)

Description: 笛卡尔坐标系中的点。

Arguments:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
Source code
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.point

Description: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

Description: 笛卡尔坐标系中的点。

Arguments:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
Source code
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

Description: 判断两个点是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

Description: 判断两个点是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -37,11 +37,11 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

Source code
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

Description: P + V -> P P + P -> P

Arguments:

  • other:
Source code
python
def __add__(self, other):
+    ...

method self + other

Description: P + V -> P P + P -> P

Arguments:

  • other:
Source code
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -49,14 +49,14 @@
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

Description: 判断两个点是否相等。

Arguments:

  • other:
Source code
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

Description: 判断两个点是否相等。

Arguments:

  • other:
Source code
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

Description: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

Arguments:

  • other:
Source code
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

Description: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

Arguments:

  • other:
Source code
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -67,8 +67,8 @@
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
- + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/segment.html b/en/api/mp_math/segment.html index b1c4c0c..072b853 100644 --- a/en/api/mp_math/segment.html +++ b/en/api/mp_math/segment.html @@ -6,18 +6,18 @@ mbcp.mp_math.segment | MBCP docs - + - + - - - + + + -
Skip to content

class Segment3

method __init__(self, p1: Point3, p2: Point3)

Description: 三维空间中的线段。 :param p1: :param p2:

Source code
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+    
Skip to content

mbcp.mp_math.segment

Description: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

Description: 三维空间中的线段。 :param p1: :param p2:

Source code
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -30,8 +30,8 @@
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
- + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/utils.html b/en/api/mp_math/utils.html index 6a4ea0b..0a9d1e7 100644 --- a/en/api/mp_math/utils.html +++ b/en/api/mp_math/utils.html @@ -6,18 +6,18 @@ mbcp.mp_math.utils | MBCP docs - + - + - - - + + + -
Skip to content

func clamp() -> float

Description: 区间限定函数

Arguments:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

Return: 限制后的值

Source code
python
def clamp(x: float, min_: float, max_: float) -> float:
+    
Skip to content

mbcp.mp_math.utils

Description: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

Description: 区间限定函数

Arguments:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

Return: 限制后的值

Source code
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -28,7 +28,20 @@
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

Description: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

Arguments:

  • x: 数1
  • y: 数2
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

Source code
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

Source code
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

Source code
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

Source code
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

Description: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

Arguments:

  • x: 数1
  • y: 数2
  • epsilon: 误差

Return: 是否近似相等

Source code
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -38,7 +51,7 @@
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

Description: 获取数的符号。

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

Description: 获取数的符号。

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -51,7 +64,7 @@
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

Description: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

Description: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

Arguments:

  • x: 数
  • only_neg: 是否只返回负数的符号

Return: 符号 + - ""

Source code
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -67,21 +80,8 @@
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

Source code
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

Source code
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

Source code
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

Source code
python
def __ne__(self, other):
-    return not self.__eq__(other)
- + return ''

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/mp_math/vector.html b/en/api/mp_math/vector.html index 16b7613..ce05b43 100644 --- a/en/api/mp_math/vector.html +++ b/en/api/mp_math/vector.html @@ -6,18 +6,18 @@ mbcp.mp_math.vector | MBCP docs - + - + - - - + + + -
Skip to content

class Vector3

method __init__(self, x: float, y: float, z: float)

Description: 3维向量

Arguments:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
Source code
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.vector

Description: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

Description: 3维向量

Arguments:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
Source code
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似相等。

Arguments:

  • other:
  • epsilon:

Return: 是否近似相等

Source code
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -37,7 +37,7 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

Description: 计算两个向量之间的夹角。

Arguments:

  • other: 另一个向量

Return: 夹角

Source code
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

Description: 计算两个向量之间的夹角。

Arguments:

  • other: 另一个向量

Return: 夹角

Source code
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -45,7 +45,7 @@
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

Description: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

Arguments:

  • other:

Return: 行列式的结果

Source code
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

Description: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

Arguments:

  • other:

Return: 行列式的结果

Source code
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -65,7 +65,7 @@
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似平行。

Arguments:

  • other: 另一个向量
  • epsilon: 允许的误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

Description: 判断两个向量是否近似平行。

Arguments:

  • other: 另一个向量
  • epsilon: 允许的误差

Return: 是否近似平行

Source code
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -74,7 +74,7 @@
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

Description: 判断两个向量是否平行。

Arguments:

  • other: 另一个向量

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

Description: 判断两个向量是否平行。

Arguments:

  • other: 另一个向量

Return: 是否平行

Source code
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -82,7 +82,7 @@
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

Description: 将向量归一化。

自体归一化,不返回值。

Source code
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

Description: 将向量归一化。

自体归一化,不返回值。

Source code
python
def normalize(self):
     """
         将向量归一化。
 
@@ -91,32 +91,32 @@
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

Source code
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

Source code
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

Description: 向量的模。

Return: 模

Source code
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

Description: 向量的模。

Return: 模

Source code
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

Description: 获取该向量的单位向量。

Return: 单位向量

Source code
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

Description: 获取该向量的单位向量。

Return: 单位向量

Source code
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

Source code
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

Source code
python
@overload
+    return self / self.length

method __abs__(self)

Source code
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

Source code
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

Source code
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

Description: V + P -> P

V + V -> V

Arguments:

  • other:
Source code
python
def __add__(self, other):
+    ...

method self + other

Description: V + P -> P

V + V -> V

Arguments:

  • other:
Source code
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -131,7 +131,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

Description: 判断两个向量是否相等。

Arguments:

  • other:

Return: 是否相等

Source code
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

Description: 判断两个向量是否相等。

Arguments:

  • other:

Return: 是否相等

Source code
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -139,7 +139,7 @@
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

Description: P + V -> P

别去点那边实现了。 :param other: :return:

Source code
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

Description: P + V -> P

别去点那边实现了。 :param other: :return:

Source code
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -147,11 +147,11 @@
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

Source code
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

Source code
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

Source code
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

Source code
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

Description: V - P -> P

V - V -> V

Arguments:

  • other:
Source code
python
def __sub__(self, other):
+    ...

method self - other

Description: V - P -> P

V - V -> V

Arguments:

  • other:
Source code
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -165,7 +165,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

Description: P - V -> P

Arguments:

  • other:
Source code
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

Description: P - V -> P

Arguments:

  • other:
Source code
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -176,11 +176,11 @@
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

Source code
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

Source code
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

Source code
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

Source code
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

Description: 数组运算 非点乘。点乘使用@,叉乘使用cross。

Arguments:

  • other:
Source code
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

Description: 数组运算 非点乘。点乘使用@,叉乘使用cross。

Arguments:

  • other:
Source code
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -193,18 +193,18 @@
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

Source code
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

Description: 点乘。

Arguments:

  • other:
Source code
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

Source code
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

Description: 点乘。

Arguments:

  • other:
Source code
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

Source code
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

Source code
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • Type: Vector3

  • Description: 零向量

var x_axis = Vector3(1, 0, 0)

  • Type: Vector3

  • Description: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • Type: Vector3

  • Description: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • Type: Vector3

  • Description: z轴单位向量

- + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

Source code
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

Source code
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • Type: Vector3

  • Description: 零向量

var x_axis = Vector3(1, 0, 0)

  • Type: Vector3

  • Description: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • Type: Vector3

  • Description: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • Type: Vector3

  • Description: z轴单位向量

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/particle/index.html b/en/api/particle/index.html index aa5d51a..0380eeb 100644 --- a/en/api/particle/index.html +++ b/en/api/particle/index.html @@ -6,19 +6,19 @@ mbcp.particle | MBCP docs - + - + - - - + + + - - + + \ No newline at end of file diff --git a/en/api/presets/index.html b/en/api/presets/index.html index 269f70b..ae97123 100644 --- a/en/api/presets/index.html +++ b/en/api/presets/index.html @@ -6,19 +6,19 @@ mbcp.presets | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.presets

Description: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : init.py @Software: PyCharm

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/api/presets/model/index.html b/en/api/presets/model/index.html index f55b421..060b852 100644 --- a/en/api/presets/model/index.html +++ b/en/api/presets/model/index.html @@ -6,18 +6,18 @@ mbcp.presets.model | MBCP docs - + - + - - - + + + -
Skip to content

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

Return: List[Point3]: 球体上的点集。

Source code
python
@staticmethod
+    
Skip to content

mbcp.presets.model

Description: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

Return: List[Point3]: 球体上的点集。

Source code
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
- + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

Documentation built with VitePress | API references generated by litedoc

+ \ No newline at end of file diff --git a/en/guide/index.html b/en/guide/index.html new file mode 100644 index 0000000..ae36c37 --- /dev/null +++ b/en/guide/index.html @@ -0,0 +1,24 @@ + + + + + + 开始不了一点 | MBCP docs + + + + + + + + + + + + + +
Skip to content

开始不了一点

12x111

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/index.html b/en/index.html new file mode 100644 index 0000000..d41f292 --- /dev/null +++ b/en/index.html @@ -0,0 +1,24 @@ + + + + + + MBCP docs + + + + + + + + + + + + + +
Skip to content

MBCP docs

More basic change particle

A Library for Python to create particle effects and geometric figures

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/guide/index.html b/guide/index.html index dc41f68..d6df874 100644 --- a/guide/index.html +++ b/guide/index.html @@ -6,19 +6,19 @@ 开始不了一点 | MBCP docs - + - + - - - + + + -
Skip to content

开始不了一点

- +
Skip to content

开始不了一点

12x111

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 3891dcd..6f41064 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"api-ex.md":"DOsKaL8H","api_index.md":"BvazTqTB","api_mp_math_angle.md":"eAy7w1HN","api_mp_math_const.md":"D9zs7__H","api_mp_math_equation.md":"Bx8s1yFf","api_mp_math_index.md":"4P0hk6gb","api_mp_math_line.md":"DsJQDchM","api_mp_math_mp_math_typing.md":"COrE_fd3","api_mp_math_plane.md":"CmoVvPiw","api_mp_math_point.md":"ClJD85mP","api_mp_math_segment.md":"7jBtS4F1","api_mp_math_utils.md":"BMwtm7TJ","api_mp_math_vector.md":"CROCIDXX","api_particle_index.md":"BRCSxC3e","api_presets_index.md":"Dl6Ss91J","api_presets_model_index.md":"DUZx13AW","en_api_index.md":"Bgu-LD1B","en_api_mp_math_angle.md":"BuhpKHnt","en_api_mp_math_const.md":"D_Flpj8t","en_api_mp_math_equation.md":"BuG3Sd0K","en_api_mp_math_index.md":"DrjDUYBY","en_api_mp_math_line.md":"BEvxdWYQ","en_api_mp_math_mp_math_typing.md":"CyXXFdS4","en_api_mp_math_plane.md":"DUu9P3nM","en_api_mp_math_point.md":"DMig0FI1","en_api_mp_math_segment.md":"CcaokAF8","en_api_mp_math_utils.md":"DZohqw2b","en_api_mp_math_vector.md":"Sd_IZsgE","en_api_particle_index.md":"CmC1QX5o","en_api_presets_index.md":"CZ5hl_7D","en_api_presets_model_index.md":"Cs8vON2C","guide_index.md":"BE2yloik","index.md":"BE1qChTt","ja_api_index.md":"4BnflFIm","ja_api_mp_math_angle.md":"DL9J6RE2","ja_api_mp_math_const.md":"CyaIJkFx","ja_api_mp_math_equation.md":"DvgEtgmw","ja_api_mp_math_index.md":"CSAMHYsB","ja_api_mp_math_line.md":"fj-_s5Ug","ja_api_mp_math_mp_math_typing.md":"Bl5kyhpI","ja_api_mp_math_plane.md":"yLekgCvK","ja_api_mp_math_point.md":"CpHHrSk8","ja_api_mp_math_segment.md":"CB1_z-rn","ja_api_mp_math_utils.md":"BrfEEfl-","ja_api_mp_math_vector.md":"p54TKACE","ja_api_particle_index.md":"E2YnH7EN","ja_api_presets_index.md":"ATGcHt9d","ja_api_presets_model_index.md":"D8yZmO5R","md-ex.md":"BX0WqOqv","zht_api_index.md":"Dq4XPUKZ","zht_api_mp_math_angle.md":"B4T6L25M","zht_api_mp_math_const.md":"B8uQOIr_","zht_api_mp_math_equation.md":"CtFwMbbV","zht_api_mp_math_index.md":"D09y2ubg","zht_api_mp_math_line.md":"DYC1X0oD","zht_api_mp_math_mp_math_typing.md":"DLx0IibM","zht_api_mp_math_plane.md":"B6GWRRF6","zht_api_mp_math_point.md":"Bm1IEwlI","zht_api_mp_math_segment.md":"Bop8t2IE","zht_api_mp_math_utils.md":"CERv8c-M","zht_api_mp_math_vector.md":"BTWxlpB1","zht_api_particle_index.md":"kAm9VAEw","zht_api_presets_index.md":"BmouaEaT","zht_api_presets_model_index.md":"SQ5PPdaL"} +{"api_index.md":"CBQkxs7b","api_mp_math_angle.md":"gd7UQvyy","api_mp_math_const.md":"3scs0T6A","api_mp_math_equation.md":"DuZ1hN4l","api_mp_math_function.md":"U6hGSIm3","api_mp_math_index.md":"1HMGGW3A","api_mp_math_line.md":"B-ShajAF","api_mp_math_mp_math_typing.md":"BtAkBFH3","api_mp_math_plane.md":"DnJHiXsz","api_mp_math_point.md":"9ZJsp3fx","api_mp_math_segment.md":"BLQ-UFFk","api_mp_math_utils.md":"yzrnwrbP","api_mp_math_vector.md":"BSPllWFK","api_particle_index.md":"Cgiljhcz","api_presets_index.md":"RZipvyLz","api_presets_model_index.md":"4RPSG4yh","demo_index.md":"D-H9zRUE","en_api_index.md":"BaqBYqY8","en_api_mp_math_angle.md":"z39I-qRz","en_api_mp_math_const.md":"CSc4Ut1v","en_api_mp_math_equation.md":"0VnHCQQ4","en_api_mp_math_function.md":"BzQ8FTPC","en_api_mp_math_index.md":"Gx9tQ_Za","en_api_mp_math_line.md":"e8dK90h_","en_api_mp_math_mp_math_typing.md":"DByFpCMm","en_api_mp_math_plane.md":"DYLAU1Re","en_api_mp_math_point.md":"DYCVxK7m","en_api_mp_math_segment.md":"CUQLS_qv","en_api_mp_math_utils.md":"B4NFHkPz","en_api_mp_math_vector.md":"BJF5J3QY","en_api_particle_index.md":"f-q0HsfK","en_api_presets_index.md":"CAyxYhKI","en_api_presets_model_index.md":"DypEdCdE","en_guide_index.md":"DrDHTYCZ","en_index.md":"MCm69eyE","guide_index.md":"NVx3l2Cr","index.md":"BjJ9-kbE","ja_api_index.md":"DW7hb-YH","ja_api_mp_math_angle.md":"Cac0Crec","ja_api_mp_math_const.md":"ClLsNkM_","ja_api_mp_math_equation.md":"8i-WXc7A","ja_api_mp_math_function.md":"GLsPZWha","ja_api_mp_math_index.md":"BBAQ-AOT","ja_api_mp_math_line.md":"BwZJXqnL","ja_api_mp_math_mp_math_typing.md":"DHbmIzMT","ja_api_mp_math_plane.md":"Ck5Q7igW","ja_api_mp_math_point.md":"CbFZXfAJ","ja_api_mp_math_segment.md":"DbTMeZAn","ja_api_mp_math_utils.md":"D2dcQ_ET","ja_api_mp_math_vector.md":"DBPPUIlc","ja_api_particle_index.md":"C9QFJ8EN","ja_api_presets_index.md":"BZKh7pEG","ja_api_presets_model_index.md":"DzI-SA0H","ja_guide_index.md":"BxGnZYwR","ja_index.md":"CtozMsIU","zht_api_index.md":"BoNToa7V","zht_api_mp_math_angle.md":"B7iqArJr","zht_api_mp_math_const.md":"3LY5TQ7t","zht_api_mp_math_equation.md":"DMSjWdou","zht_api_mp_math_function.md":"DOX7pGXC","zht_api_mp_math_index.md":"Cp3ggfPO","zht_api_mp_math_line.md":"D3xPFA2p","zht_api_mp_math_mp_math_typing.md":"DTY2F-6g","zht_api_mp_math_plane.md":"DAAO1c38","zht_api_mp_math_point.md":"CK50W0JG","zht_api_mp_math_segment.md":"BK0QQket","zht_api_mp_math_utils.md":"BQrrPf8T","zht_api_mp_math_vector.md":"CtYckwOL","zht_api_particle_index.md":"CljeoVXn","zht_api_presets_index.md":"DEbOKiST","zht_api_presets_model_index.md":"3pGdZAT9","zht_guide_index.md":"CsuFVFxu","zht_index.md":"V9U3SwDR"} diff --git a/index.html b/index.html index ad97001..69bda17 100644 --- a/index.html +++ b/index.html @@ -6,19 +6,19 @@ MBCP docs - + - + - - - + + + -
Skip to content

MBCP docs

More basic change particle

用于几何运算和粒子制作的库

- +
Skip to content

MBCP docs

More basic change particle

用于几何运算和粒子制作的库

文档由 VitePress 构建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/ja/api/index.html b/ja/api/index.html index 7183624..637c320 100644 --- a/ja/api/index.html +++ b/ja/api/index.html @@ -6,19 +6,19 @@ mbcp | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp

説明: 本模块塞了一些预设的粒子生成器

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/angle.html b/ja/api/mp_math/angle.html index b5e3b49..6f7c89f 100644 --- a/ja/api/mp_math/angle.html +++ b/ja/api/mp_math/angle.html @@ -6,18 +6,18 @@ mbcp.mp_math.angle | MBCP docs - + - + - - - + + + -
Skip to content

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

引数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
ソースコード
python
def __init__(self, value: float, is_radian: bool=False):
+    
Skip to content

mbcp.mp_math.angle

説明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

引数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
ソースコード
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -27,96 +27,96 @@
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

戻り値: 余角

ソースコード
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

戻り値: 余角

ソースコード
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

戻り値: 补角

ソースコード
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

戻り値: 补角

ソースコード
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

戻り値: 弧度

ソースコード
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

戻り値: 弧度

ソースコード
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

戻り値: 最小正角度

ソースコード
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

戻り値: 最小正角度

ソースコード
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

戻り値: 最大负角度

ソースコード
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

戻り値: 最大负角度

ソースコード
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

戻り値: 正弦值

ソースコード
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

戻り値: 正弦值

ソースコード
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

戻り値: 余弦值

ソースコード
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

戻り値: 余弦值

ソースコード
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

戻り値: 正切值

ソースコード
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

戻り値: 正切值

ソースコード
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

戻り値: 余切值

ソースコード
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

戻り値: 余切值

ソースコード
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

戻り値: 正割值

ソースコード
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

戻り値: 正割值

ソースコード
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

戻り値: 余割值

ソースコード
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

戻り値: 余割值

ソースコード
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

ソースコード
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

ソースコード
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

ソースコード
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

ソースコード
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

ソースコード
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

ソースコード
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

ソースコード
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

ソースコード
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

ソースコード
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

ソースコード
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

ソースコード
python
def __truediv__(self, other):
+    ...

method self / other

ソースコード
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
- + return AnyAngle(self.radian / other, is_radian=True)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/const.html b/ja/api/mp_math/const.html index 113538b..bc930f4 100644 --- a/ja/api/mp_math/const.html +++ b/ja/api/mp_math/const.html @@ -6,19 +6,19 @@ mbcp.mp_math.const | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math.const

説明: 本模块定义了一些常用的常量

var PI = math.pi

  • 説明: 常量 π

var E = math.e

  • 説明: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • 説明: 黄金分割比

var GAMMA = 0.5772156649015329

  • 説明: 欧拉常数

var EPSILON = 0.0001

  • 説明: 精度误差

var APPROX = 0.001

  • 説明: 约等于判定误差

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/equation.html b/ja/api/mp_math/equation.html index cf32f10..b90ca61 100644 --- a/ja/api/mp_math/equation.html +++ b/ja/api/mp_math/equation.html @@ -6,18 +6,40 @@ mbcp.mp_math.equation | MBCP docs - + - + - - - + + + -
Skip to content

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

引数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

戻り値: 偏导函数

例外:

  • ValueError 无效变量类型
ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+    
Skip to content

mbcp.mp_math.equation

説明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

引数:

  • *t:
  • 参数:

戻り値: 目标点

ソースコード
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

引数:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

戻り値: 偏导函数

例外:

  • ValueError 无效变量类型
ソースコード
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -59,7 +81,7 @@
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

引数:

  • func: 函数
  • *args: 参数

戻り値: 柯里化后的函数

ソースコード
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

引数:

  • func: 函数
  • *args: 参数

戻り値: 柯里化后的函数

ソースコード
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -74,30 +96,8 @@
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

引数:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
ソースコード
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

引数:

  • *t:
  • 参数:
ソースコード
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + return curried_func

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/function.html b/ja/api/mp_math/function.html new file mode 100644 index 0000000..a5f04fa --- /dev/null +++ b/ja/api/mp_math/function.html @@ -0,0 +1,40 @@ + + + + + + mbcp.mp_math.function | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.mp_math.function

説明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

説明: 计算三元函数在某点的梯度向量。

TIP

已知一个函数f(x,y,z),则其在点(x0,y0,z0)处的梯度向量为: f(x0,y0,z0)=(fx,fy,fz)

引数:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

戻り値: 梯度

ソースコード
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\nabla f(x_0, y_0, z_0) = \\left(\\frac{\\partial f}{\\partial x}, \\frac{\\partial f}{\\partial y}, \\frac{\\partial f}{\\partial z}\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ + + + \ No newline at end of file diff --git a/ja/api/mp_math/index.html b/ja/api/mp_math/index.html index 90e0b4a..cc6f857 100644 --- a/ja/api/mp_math/index.html +++ b/ja/api/mp_math/index.html @@ -6,19 +6,19 @@ mbcp.mp_math | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math

説明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/line.html b/ja/api/mp_math/line.html index 07c8c72..2457d5b 100644 --- a/ja/api/mp_math/line.html +++ b/ja/api/mp_math/line.html @@ -6,18 +6,18 @@ mbcp.mp_math.line | MBCP docs - + - + - - - + + + -
Skip to content

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

引数:

  • point: 直线上的一点
  • direction: 直线的方向向量
ソースコード
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+    
Skip to content

mbcp.mp_math.line

説明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

引数:

  • point: 直线上的一点
  • direction: 直线的方向向量
ソースコード
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -25,7 +25,7 @@
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -34,7 +34,7 @@
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

引数:

  • other: 另一条直线

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

引数:

  • other: 另一条直线

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -44,7 +44,7 @@
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

引数:

  • other: 平行直线或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

引数:

  • other: 平行直线或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -67,7 +67,7 @@
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

引数:

  • other: 另一条直线

戻り値: 交点

例外:

  • ValueError 直线平行
  • ValueError 直线不共面
ソースコード
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

引数:

  • other: 另一条直线

戻り値: 交点

例外:

  • ValueError 直线平行
  • ValueError 直线不共面
ソースコード
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -82,7 +82,7 @@
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

引数:

  • point: 指定点

戻り値: 垂线

ソースコード
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

引数:

  • point: 指定点

戻り値: 垂线

ソースコード
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -90,7 +90,7 @@
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

引数:

  • t: 参数t

戻り値: 点

ソースコード
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

引数:

  • t: 参数t

戻り値: 点

ソースコード
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -98,13 +98,13 @@
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

戻り値: x(t), y(t), z(t)

ソースコード
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

戻り値: x(t), y(t), z(t)

ソースコード
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

引数:

  • other: 另一条直线
  • epsilon: 误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -113,7 +113,7 @@
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

引数:

  • other: 另一条直线

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

引数:

  • other: 另一条直线

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -121,7 +121,7 @@
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

引数:

  • other: 另一条直线

戻り値: 是否共线

ソースコード
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

引数:

  • other: 另一条直线

戻り値: 是否共线

ソースコード
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -129,7 +129,7 @@
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

引数:

  • point: 点

戻り値: 是否在直线上

ソースコード
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

引数:

  • point: 点

戻り値: 是否在直线上

ソースコード
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -137,7 +137,7 @@
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

引数:

  • other: 另一条直线

戻り値: 是否共面

ソースコード
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

引数:

  • other: 另一条直线

戻り値: 是否共面

ソースコード
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -146,7 +146,7 @@
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

ソースコード
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

ソースコード
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -159,7 +159,7 @@
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

引数:

  • p1: 点1
  • p2: 点2

戻り値: 直线

ソースコード
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

引数:

  • p1: 点1
  • p2: 点2

戻り値: 直线

ソースコード
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -170,7 +170,7 @@
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

引数:

  • other: 另一条直线

戻り値: 交点

ソースコード
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

引数:

  • other: 另一条直线

戻り値: 交点

ソースコード
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -183,7 +183,7 @@
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

引数:

  • other:
ソースコード
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

引数:

  • other:
ソースコード
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -194,8 +194,8 @@
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
- + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/mp_math_typing.html b/ja/api/mp_math/mp_math_typing.html index eb0f2b8..315a40c 100644 --- a/ja/api/mp_math/mp_math_typing.html +++ b/ja/api/mp_math/mp_math_typing.html @@ -6,19 +6,19 @@ mbcp.mp_math.mp_math_typing | MBCP docs - + - + - - - + + + -
Skip to content

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

- +
Skip to content

mbcp.mp_math.mp_math_typing

説明: 本模块用于内部类型提示

var RealNumber = int | float

  • タイプ: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • タイプ: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • タイプ: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • タイプ: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • タイプ: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • タイプ: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • タイプ: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • タイプ: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • タイプ: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • タイプ: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • タイプ: TypeAlias

  • 説明: 多元函数

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/plane.html b/ja/api/mp_math/plane.html index d8b5121..177353d 100644 --- a/ja/api/mp_math/plane.html +++ b/ja/api/mp_math/plane.html @@ -6,18 +6,18 @@ mbcp.mp_math.plane | MBCP docs - + - + - - - + + + -
Skip to content

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

引数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
ソースコード
python
def __init__(self, a: float, b: float, c: float, d: float):
+    
Skip to content

mbcp.mp_math.plane

説明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

引数:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
ソースコード
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -29,7 +29,7 @@
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

引数:

  • other: 另一个平面

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

引数:

  • other: 另一个平面

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -47,7 +47,7 @@
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

引数:

  • other: 另一个平面

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

引数:

  • other: 另一个平面

戻り値: 夹角弧度

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -62,7 +62,7 @@
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

引数:

  • other: 另一个平面或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

引数:

  • other: 另一个平面或点

戻り値: 距离

例外:

  • TypeError 不支持的类型
ソースコード
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -77,7 +77,7 @@
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

引数:

  • other: 另一个平面

戻り値: 两平面的交线

ソースコード
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

引数:

  • other: 另一个平面

戻り値: 两平面的交线

ソースコード
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -102,7 +102,7 @@
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

引数:

  • other: 不与平面平行或在平面上的直线

戻り値: 交点

例外:

  • ValueError 平面与直线平行或重合
ソースコード
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

引数:

  • other: 不与平面平行或在平面上的直线

戻り値: 交点

例外:

  • ValueError 平面与直线平行或重合
ソースコード
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -116,7 +116,7 @@
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

引数:

  • point: 指定点

戻り値: 所求平面

ソースコード
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

引数:

  • point: 指定点

戻り値: 所求平面

ソースコード
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -124,7 +124,7 @@
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

引数:

  • other: 另一个平面

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

引数:

  • other: 另一个平面

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -132,14 +132,14 @@
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

戻り値: 法向量

ソースコード
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

戻り値: 法向量

ソースコード
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

引数:

  • point: 平面上的一点
  • normal: 法向量

戻り値: 平面

ソースコード
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

引数:

  • point: 平面上的一点
  • normal: 法向量

戻り値: 平面

ソースコード
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -151,7 +151,7 @@
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

引数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

戻り値: 平面

ソースコード
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

引数:

  • p1: 点1
  • p2: 点2
  • p3: 点3

戻り値: 平面

ソースコード
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -165,7 +165,7 @@
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

引数:

  • l1: 直线1
  • l2: 直线2

戻り値: 平面

ソースコード
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

引数:

  • l1: 直线1
  • l2: 直线2

戻り値: 平面

ソースコード
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -179,7 +179,7 @@
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

引数:

  • point: 面上一点
  • line: 面上直线,不包含点

戻り値: 平面

ソースコード
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

引数:

  • point: 面上一点
  • line: 面上直线,不包含点

戻り値: 平面

ソースコード
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -189,11 +189,11 @@
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

ソースコード
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

ソースコード
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

ソースコード
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

ソースコード
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

引数:

  • other:

戻り値: 不平行平面的交线,平面平行返回None

ソースコード
python
def __and__(self, other):
+    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

引数:

  • other:

戻り値: 不平行平面的交线,平面平行返回None

ソースコード
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -210,10 +210,10 @@
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

ソースコード
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
- + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

ソースコード
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/point.html b/ja/api/mp_math/point.html index de2feb3..8039319 100644 --- a/ja/api/mp_math/point.html +++ b/ja/api/mp_math/point.html @@ -6,18 +6,18 @@ mbcp.mp_math.point | MBCP docs - + - + - - - + + + -
Skip to content

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

引数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
ソースコード
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.point

説明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

引数:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
ソースコード
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -37,11 +37,11 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

ソースコード
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: P + V -> P P + P -> P

引数:

  • other:
ソースコード
python
def __add__(self, other):
+    ...

method self + other

説明: P + V -> P P + P -> P

引数:

  • other:
ソースコード
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -49,14 +49,14 @@
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

引数:

  • other:
ソースコード
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

引数:

  • other:
ソースコード
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

引数:

  • other:
ソースコード
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

引数:

  • other:
ソースコード
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -67,8 +67,8 @@
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
- + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/segment.html b/ja/api/mp_math/segment.html index a1dee82..42fd15e 100644 --- a/ja/api/mp_math/segment.html +++ b/ja/api/mp_math/segment.html @@ -6,18 +6,18 @@ mbcp.mp_math.segment | MBCP docs - + - + - - - + + + -
Skip to content

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

ソースコード
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+    
Skip to content

mbcp.mp_math.segment

説明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

ソースコード
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -30,8 +30,8 @@
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
- + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/utils.html b/ja/api/mp_math/utils.html index e6c566e..941534f 100644 --- a/ja/api/mp_math/utils.html +++ b/ja/api/mp_math/utils.html @@ -6,18 +6,18 @@ mbcp.mp_math.utils | MBCP docs - + - + - - - + + + -
Skip to content

func clamp() -> float

説明: 区间限定函数

引数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
+    
Skip to content

mbcp.mp_math.utils

説明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

説明: 区间限定函数

引数:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -28,7 +28,20 @@
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

引数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

ソースコード
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

ソースコード
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

ソースコード
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

引数:

  • x: 数1
  • y: 数2
  • epsilon: 误差

戻り値: 是否近似相等

ソースコード
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -38,7 +51,7 @@
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

説明: 获取数的符号。

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

説明: 获取数的符号。

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -51,7 +64,7 @@
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

引数:

  • x: 数
  • only_neg: 是否只返回负数的符号

戻り値: 符号 + - ""

ソースコード
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -67,21 +80,8 @@
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

ソースコード
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

ソースコード
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

ソースコード
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

ソースコード
python
def __ne__(self, other):
-    return not self.__eq__(other)
- + return ''

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/mp_math/vector.html b/ja/api/mp_math/vector.html index 46b1ca8..f18761a 100644 --- a/ja/api/mp_math/vector.html +++ b/ja/api/mp_math/vector.html @@ -6,18 +6,18 @@ mbcp.mp_math.vector | MBCP docs - + - + - - - + + + -
Skip to content

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

引数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
ソースコード
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.vector

説明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

引数:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
ソースコード
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

引数:

  • other:
  • epsilon:

戻り値: 是否近似相等

ソースコード
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -37,7 +37,7 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

引数:

  • other: 另一个向量

戻り値: 夹角

ソースコード
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

引数:

  • other: 另一个向量

戻り値: 夹角

ソースコード
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -45,7 +45,7 @@
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

引数:

  • other:

戻り値: 行列式的结果

ソースコード
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

引数:

  • other:

戻り値: 行列式的结果

ソースコード
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -65,7 +65,7 @@
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

引数:

  • other: 另一个向量
  • epsilon: 允许的误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

引数:

  • other: 另一个向量
  • epsilon: 允许的误差

戻り値: 是否近似平行

ソースコード
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -74,7 +74,7 @@
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

引数:

  • other: 另一个向量

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

引数:

  • other: 另一个向量

戻り値: 是否平行

ソースコード
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -82,7 +82,7 @@
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

ソースコード
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

ソースコード
python
def normalize(self):
     """
         将向量归一化。
 
@@ -91,32 +91,32 @@
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

ソースコード
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

ソースコード
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

戻り値: 模

ソースコード
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

戻り値: 模

ソースコード
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

戻り値: 单位向量

ソースコード
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

戻り値: 单位向量

ソースコード
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

ソースコード
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

ソースコード
python
@overload
+    return self / self.length

method __abs__(self)

ソースコード
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

ソースコード
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

ソースコード
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: V + P -> P

V + V -> V

引数:

  • other:
ソースコード
python
def __add__(self, other):
+    ...

method self + other

説明: V + P -> P

V + V -> V

引数:

  • other:
ソースコード
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -131,7 +131,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

引数:

  • other:

戻り値: 是否相等

ソースコード
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

引数:

  • other:

戻り値: 是否相等

ソースコード
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -139,7 +139,7 @@
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

ソースコード
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

ソースコード
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -147,11 +147,11 @@
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

ソースコード
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

ソースコード
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

ソースコード
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

ソースコード
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

説明: V - P -> P

V - V -> V

引数:

  • other:
ソースコード
python
def __sub__(self, other):
+    ...

method self - other

説明: V - P -> P

V - V -> V

引数:

  • other:
ソースコード
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -165,7 +165,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

引数:

  • other:
ソースコード
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

引数:

  • other:
ソースコード
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -176,11 +176,11 @@
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

ソースコード
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

ソースコード
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

ソースコード
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

ソースコード
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

引数:

  • other:
ソースコード
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

引数:

  • other:
ソースコード
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -193,18 +193,18 @@
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

ソースコード
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

引数:

  • other:
ソースコード
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

ソースコード
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

引数:

  • other:
ソースコード
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

ソースコード
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • タイプ: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • タイプ: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • タイプ: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • タイプ: Vector3

  • 説明: z轴单位向量

- + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

ソースコード
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • タイプ: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • タイプ: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • タイプ: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • タイプ: Vector3

  • 説明: z轴单位向量

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/particle/index.html b/ja/api/particle/index.html index f408f31..18c9abe 100644 --- a/ja/api/particle/index.html +++ b/ja/api/particle/index.html @@ -6,19 +6,19 @@ mbcp.particle | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.particle

説明: 本模块定义了粒子生成相关的工具

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/presets/index.html b/ja/api/presets/index.html index 75336a0..3f6583d 100644 --- a/ja/api/presets/index.html +++ b/ja/api/presets/index.html @@ -6,19 +6,19 @@ mbcp.presets | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.presets

説明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : init.py @Software: PyCharm

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/api/presets/model/index.html b/ja/api/presets/model/index.html index 5404213..b4003a6 100644 --- a/ja/api/presets/model/index.html +++ b/ja/api/presets/model/index.html @@ -6,18 +6,18 @@ mbcp.presets.model | MBCP docs - + - + - - - + + + -
Skip to content

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
- + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ \ No newline at end of file diff --git a/ja/guide/index.html b/ja/guide/index.html new file mode 100644 index 0000000..42402be --- /dev/null +++ b/ja/guide/index.html @@ -0,0 +1,24 @@ + + + + + + 开始不了一点 | MBCP docs + + + + + + + + + + + + + +
Skip to content

开始不了一点

12x111

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ + + + \ No newline at end of file diff --git a/ja/index.html b/ja/index.html new file mode 100644 index 0000000..4235664 --- /dev/null +++ b/ja/index.html @@ -0,0 +1,24 @@ + + + + + + MBCP docs + + + + + + + + + + + + + +
Skip to content

MBCP docs

More basic change particle

ジオメトリ演算とパーティクル作成のためのライブラリ

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

+ + + + \ No newline at end of file diff --git a/md-ex.html b/md-ex.html deleted file mode 100644 index 0b4cf49..0000000 --- a/md-ex.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - Markdown Extension Examples | MBCP docs - - - - - - - - - - - - - -
Skip to content

Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

Syntax Highlighting

VitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:

Input

md
```js{4}
-export default {
-  data () {
-    return {
-      msg: 'Highlighted!'
-    }
-  }
-}
-```

Output

js
export default {
-  data () {
-    return {
-      msg: 'Highlighted!'
-    }
-  }
-}

Custom Containers

Input

md
::: info
-This is an info box.
-:::
-
-::: tip
-This is a tip.
-:::
-
-::: warning
-This is a warning.
-:::
-
-::: danger
-This is a dangerous warning.
-:::
-
-::: details
-This is a details block.
-:::

Output

INFO

This is an info box.

TIP

This is a tip.

WARNING

This is a warning.

DANGER

This is a dangerous warning.

Details

This is a details block.

More

Check out the documentation for the full list of markdown extensions.

- - - - \ No newline at end of file diff --git a/zht/api/index.html b/zht/api/index.html index 38ec51f..d1e14e8 100644 --- a/zht/api/index.html +++ b/zht/api/index.html @@ -6,19 +6,19 @@ mbcp | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp

説明: 本模块塞了一些预设的粒子生成器

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/angle.html b/zht/api/mp_math/angle.html index be17b2e..35c15e5 100644 --- a/zht/api/mp_math/angle.html +++ b/zht/api/mp_math/angle.html @@ -6,18 +6,18 @@ mbcp.mp_math.angle | MBCP docs - + - + - - - + + + -
Skip to content

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

變數説明:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源碼
python
def __init__(self, value: float, is_radian: bool=False):
+    
Skip to content

mbcp.mp_math.angle

説明: 本模块定义了角度相关的类

class Angle

class AnyAngle(Angle)

method __init__(self, value: float, is_radian: bool = False)

説明: 任意角度。

變數説明:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源碼
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -27,96 +27,96 @@
     if is_radian:
         self.radian = value
     else:
-        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

返回: 余角

源碼
python
@property
+        self.radian = value * PI / 180

@property

method complementary(self) -> AnyAngle

説明: 余角:两角的和为90°。

返回: 余角

源碼
python
@property
 def complementary(self) -> 'AnyAngle':
     """
         余角:两角的和为90°。
         Returns:
             余角
         """
-    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

返回: 补角

源碼
python
@property
+    return AnyAngle(PI / 2 - self.minimum_positive.radian, is_radian=True)

@property

method supplementary(self) -> AnyAngle

説明: 补角:两角的和为180°。

返回: 补角

源碼
python
@property
 def supplementary(self) -> 'AnyAngle':
     """
         补角:两角的和为180°。
         Returns:
             补角
         """
-    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

返回: 弧度

源碼
python
@property
+    return AnyAngle(PI - self.minimum_positive.radian, is_radian=True)

@property

method degree(self) -> float

説明: 角度。

返回: 弧度

源碼
python
@property
 def degree(self) -> float:
     """
         角度。
         Returns:
             弧度
         """
-    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

返回: 最小正角度

源碼
python
@property
+    return self.radian * 180 / PI

@property

method minimum_positive(self) -> AnyAngle

説明: 最小正角。

返回: 最小正角度

源碼
python
@property
 def minimum_positive(self) -> 'AnyAngle':
     """
         最小正角。
         Returns:
             最小正角度
         """
-    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

返回: 最大负角度

源碼
python
@property
+    return AnyAngle(self.radian % (2 * PI))

@property

method maximum_negative(self) -> AnyAngle

説明: 最大负角。

返回: 最大负角度

源碼
python
@property
 def maximum_negative(self) -> 'AnyAngle':
     """
         最大负角。
         Returns:
             最大负角度
         """
-    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

返回: 正弦值

源碼
python
@property
+    return AnyAngle(-self.radian % (2 * PI), is_radian=True)

@property

method sin(self) -> float

説明: 正弦值。

返回: 正弦值

源碼
python
@property
 def sin(self) -> float:
     """
         正弦值。
         Returns:
             正弦值
         """
-    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

返回: 余弦值

源碼
python
@property
+    return math.sin(self.radian)

@property

method cos(self) -> float

説明: 余弦值。

返回: 余弦值

源碼
python
@property
 def cos(self) -> float:
     """
         余弦值。
         Returns:
             余弦值
         """
-    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

返回: 正切值

源碼
python
@property
+    return math.cos(self.radian)

@property

method tan(self) -> float

説明: 正切值。

返回: 正切值

源碼
python
@property
 def tan(self) -> float:
     """
         正切值。
         Returns:
             正切值
         """
-    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

返回: 余切值

源碼
python
@property
+    return math.tan(self.radian)

@property

method cot(self) -> float

説明: 余切值。

返回: 余切值

源碼
python
@property
 def cot(self) -> float:
     """
         余切值。
         Returns:
             余切值
         """
-    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

返回: 正割值

源碼
python
@property
+    return 1 / math.tan(self.radian)

@property

method sec(self) -> float

説明: 正割值。

返回: 正割值

源碼
python
@property
 def sec(self) -> float:
     """
         正割值。
         Returns:
             正割值
         """
-    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

返回: 余割值

源碼
python
@property
+    return 1 / math.cos(self.radian)

@property

method csc(self) -> float

説明: 余割值。

返回: 余割值

源碼
python
@property
 def csc(self) -> float:
     """
         余割值。
         Returns:
             余割值
         """
-    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源碼
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源碼
python
def __eq__(self, other):
-    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源碼
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
-    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源碼
python
def __mul__(self, other: float) -> 'AnyAngle':
-    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源碼
python
@overload
+    return 1 / math.sin(self.radian)

method self + other: AnyAngle => AnyAngle

源碼
python
def __add__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian + other.radian, is_radian=True)

method __eq__(self, other)

源碼
python
def __eq__(self, other):
+    return approx(self.radian, other.radian)

method self - other: AnyAngle => AnyAngle

源碼
python
def __sub__(self, other: 'AnyAngle') -> 'AnyAngle':
+    return AnyAngle(self.radian - other.radian, is_radian=True)

method self * other: float => AnyAngle

源碼
python
def __mul__(self, other: float) -> 'AnyAngle':
+    return AnyAngle(self.radian * other, is_radian=True)

@overload

method self / other: float => AnyAngle

源碼
python
@overload
 def __truediv__(self, other: float) -> 'AnyAngle':
-    ...

@overload

method self / other: AnyAngle => float

源碼
python
@overload
+    ...

@overload

method self / other: AnyAngle => float

源碼
python
@overload
 def __truediv__(self, other: 'AnyAngle') -> float:
-    ...

method self / other

源碼
python
def __truediv__(self, other):
+    ...

method self / other

源碼
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)
- + return AnyAngle(self.radian / other, is_radian=True)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/const.html b/zht/api/mp_math/const.html index c3736b1..ff40d89 100644 --- a/zht/api/mp_math/const.html +++ b/zht/api/mp_math/const.html @@ -6,19 +6,19 @@ mbcp.mp_math.const | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math.const

説明: 本模块定义了一些常用的常量

var PI = math.pi

  • 説明: 常量 π

var E = math.e

  • 説明: 自然对数的底 exp(1)

var GOLDEN_RATIO = (1 + math.sqrt(5)) / 2

  • 説明: 黄金分割比

var GAMMA = 0.5772156649015329

  • 説明: 欧拉常数

var EPSILON = 0.0001

  • 説明: 精度误差

var APPROX = 0.001

  • 説明: 约等于判定误差

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/equation.html b/zht/api/mp_math/equation.html index 1d25063..1c4ac9d 100644 --- a/zht/api/mp_math/equation.html +++ b/zht/api/mp_math/equation.html @@ -6,18 +6,40 @@ mbcp.mp_math.equation | MBCP docs - + - + - - - + + + -
Skip to content

func get_partial_derivative_func(func: MultiVarsFunc = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

變數説明:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

抛出:

  • ValueError 无效变量类型
源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
+    
Skip to content

mbcp.mp_math.equation

説明: 本模块定义了方程相关的类和函数以及一些常用的数学函数

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
+    """
+        曲线方程。
+        Args:
+            x_func: x函数
+            y_func: y函数
+            z_func: z函数
+        """
+    self.x_func = x_func
+    self.y_func = y_func
+    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

變數説明:

  • *t:
  • 参数:

返回: 目标点

源碼
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
+    """
+        计算曲线上的点。
+        Args:
+            *t:
+                参数
+        Returns:
+            目标点
+        """
+    if len(t) == 1:
+        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
+    else:
+        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])

func get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number = EPSILON) -> MultiVarsFunc

説明: 求N元函数一阶偏导函数。这玩意不太稳定,慎用。

WARNING

目前数学界对于一个函数的导函数并没有通解的说法,因此该函数的稳定性有待提升

變數説明:

  • func: 函数
  • var: 变量位置,可为整数(一阶偏导)或整数元组(高阶偏导)
  • epsilon: 偏移量

返回: 偏导函数

抛出:

  • ValueError 无效变量类型
源碼
python
def get_partial_derivative_func(func: MultiVarsFunc, var: int | tuple[int, ...], epsilon: Number=EPSILON) -> MultiVarsFunc:
     """
     求N元函数一阶偏导函数。这玩意不太稳定,慎用。
     > [!warning]
@@ -59,7 +81,7 @@
             return result_func(*args)
         return high_order_partial_derivative_func
     else:
-        raise ValueError('Invalid var type')

func curry(*args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

變數説明:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源碼
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
+        raise ValueError('Invalid var type')

func curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc

説明: 对多参数函数进行柯里化。

TIP

有关函数柯里化,可参考函数式编程--柯理化(Currying)

變數説明:

  • func: 函数
  • *args: 参数

返回: 柯里化后的函数

源碼
python
def curry(func: MultiVarsFunc, *args: Var) -> OneVarFunc:
     """
     对多参数函数进行柯里化。
     > [!tip]
@@ -74,30 +96,8 @@
     def curried_func(*args2: Var) -> Var:
         """@litedoc-hide"""
         return func(*args, *args2)
-    return curried_func

class CurveEquation

method __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc)

説明: 曲线方程。

變數説明:

  • x_func: x函数
  • y_func: y函数
  • z_func: z函数
源碼
python
def __init__(self, x_func: OneVarFunc, y_func: OneVarFunc, z_func: OneVarFunc):
-    """
-        曲线方程。
-        Args:
-            x_func: x函数
-            y_func: y函数
-            z_func: z函数
-        """
-    self.x_func = x_func
-    self.y_func = y_func
-    self.z_func = z_func

method __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]

説明: 计算曲线上的点。

變數説明:

  • *t:
  • 参数:
源碼
python
def __call__(self, *t: Var) -> Point3 | tuple[Point3, ...]:
-    """
-        计算曲线上的点。
-        Args:
-            *t:
-                参数
-        Returns:
-
-        """
-    if len(t) == 1:
-        return Point3(self.x_func(t[0]), self.y_func(t[0]), self.z_func(t[0]))
-    else:
-        return tuple([Point3(x, y, z) for x, y, z in zip(self.x_func(t), self.y_func(t), self.z_func(t))])
- + return curried_func

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/function.html b/zht/api/mp_math/function.html new file mode 100644 index 0000000..9b3d3ae --- /dev/null +++ b/zht/api/mp_math/function.html @@ -0,0 +1,40 @@ + + + + + + mbcp.mp_math.function | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.mp_math.function

説明: AAA

func cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float = EPSILON) -> Vector3

説明: 计算三元函数在某点的梯度向量。

TIP

已知一个函数f(x,y,z),则其在点(x0,y0,z0)处的梯度向量为: f(x0,y0,z0)=(fx,fy,fz)

變數説明:

  • func: 三元函数
  • p: 点
  • epsilon: 偏移量

返回: 梯度

源碼
python
def cal_gradient_3vf(func: ThreeSingleVarsFunc, p: Point3, epsilon: float=EPSILON) -> Vector3:
+    """
+    计算三元函数在某点的梯度向量。
+    > [!tip]
+    > 已知一个函数$f(x, y, z)$,则其在点$(x_0, y_0, z_0)$处的梯度向量为:
+    $\\nabla f(x_0, y_0, z_0) = \\left(\\frac{\\partial f}{\\partial x}, \\frac{\\partial f}{\\partial y}, \\frac{\\partial f}{\\partial z}\\right)$
+    Args:
+        func: 三元函数
+        p: 点
+        epsilon: 偏移量
+    Returns:
+        梯度
+    """
+    dx = (func(p.x + epsilon, p.y, p.z) - func(p.x - epsilon, p.y, p.z)) / (2 * epsilon)
+    dy = (func(p.x, p.y + epsilon, p.z) - func(p.x, p.y - epsilon, p.z)) / (2 * epsilon)
+    dz = (func(p.x, p.y, p.z + epsilon) - func(p.x, p.y, p.z - epsilon)) / (2 * epsilon)
+    return Vector3(dx, dy, dz)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/zht/api/mp_math/index.html b/zht/api/mp_math/index.html index 199fadd..ec87a20 100644 --- a/zht/api/mp_math/index.html +++ b/zht/api/mp_math/index.html @@ -6,19 +6,19 @@ mbcp.mp_math | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.mp_math

説明: 本包定义了一些常用的导入,可直接从mbcp.mp_math导入使用 导入的类有:

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/line.html b/zht/api/mp_math/line.html index 96e13ef..a3a811d 100644 --- a/zht/api/mp_math/line.html +++ b/zht/api/mp_math/line.html @@ -6,18 +6,18 @@ mbcp.mp_math.line | MBCP docs - + - + - - - + + + -
Skip to content

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

變數説明:

  • point: 直线上的一点
  • direction: 直线的方向向量
源碼
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
+    
Skip to content

mbcp.mp_math.line

説明: 本模块定义了三维空间中的直线类

class Line3

method __init__(self, point: Point3, direction: Vector3)

説明: 三维空间中的直线。由一个点和一个方向向量确定。

變數説明:

  • point: 直线上的一点
  • direction: 直线的方向向量
源碼
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -25,7 +25,7 @@
             direction: 直线的方向向量
         """
     self.point = point
-    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
+    self.direction = direction

method approx(self, other: Line3, epsilon: float = APPROX) -> bool

説明: 判断两条直线是否近似相等。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(self, other: 'Line3', epsilon: float=APPROX) -> bool:
     """
         判断两条直线是否近似相等。
         Args:
@@ -34,7 +34,7 @@
         Returns:
             是否近似相等
         """
-    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

變數説明:

  • other: 另一条直线

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
+    return self.is_approx_parallel(other, epsilon) and (self.point - other.point).is_approx_parallel(self.direction, epsilon)

method cal_angle(self, other: Line3) -> AnyAngle

説明: 计算直线和直线之间的夹角。

變數説明:

  • other: 另一条直线

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3') -> 'AnyAngle':
     """
         计算直线和直线之间的夹角。
         Args:
@@ -44,7 +44,7 @@
         Raises:
             TypeError: 不支持的类型
         """
-    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

變數説明:

  • other: 平行直线或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
+    return self.direction.cal_angle(other.direction)

method cal_distance(self, other: Line3 | Point3) -> float

説明: 计算直线和直线或点之间的距离。

變數説明:

  • other: 平行直线或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Line3 | Point3') -> float:
     """
         计算直线和直线或点之间的距离。
         Args:
@@ -67,7 +67,7 @@
     elif isinstance(other, Point3):
         return (other - self.point).cross(self.direction).length / self.direction.length
     else:
-        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

變數説明:

  • other: 另一条直线

返回: 交点

抛出:

  • ValueError 直线平行
  • ValueError 直线不共面
源碼
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
+        raise TypeError('Unsupported type.')

method cal_intersection(self, other: Line3) -> Point3

説明: 计算两条直线的交点。

變數説明:

  • other: 另一条直线

返回: 交点

抛出:

  • ValueError 直线平行
  • ValueError 直线不共面
源碼
python
def cal_intersection(self, other: 'Line3') -> 'Point3':
     """
         计算两条直线的交点。
         Args:
@@ -82,7 +82,7 @@
         raise ValueError('Lines are parallel and do not intersect.')
     if not self.is_coplanar(other):
         raise ValueError('Lines are not coplanar and do not intersect.')
-    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

變數説明:

  • point: 指定点

返回: 垂线

源碼
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
+    return self.point + self.direction.cross(other.direction) @ other.direction.cross(self.point - other.point) / self.direction.cross(other.direction).length ** 2 * self.direction

method cal_perpendicular(self, point: Point3) -> Line3

説明: 计算直线经过指定点p的垂线。

變數説明:

  • point: 指定点

返回: 垂线

源碼
python
def cal_perpendicular(self, point: 'Point3') -> 'Line3':
     """
         计算直线经过指定点p的垂线。
         Args:
@@ -90,7 +90,7 @@
         Returns:
             垂线
         """
-    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

變數説明:

  • t: 参数t

返回: 点

源碼
python
def get_point(self, t: RealNumber) -> 'Point3':
+    return Line3(point, self.direction.cross(point - self.point))

method get_point(self, t: RealNumber) -> Point3

説明: 获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。

變數説明:

  • t: 参数t

返回: 点

源碼
python
def get_point(self, t: RealNumber) -> 'Point3':
     """
         获取直线上的点。同一条直线,但起始点和方向向量不同,则同一个t对应的点不同。
         Args:
@@ -98,13 +98,13 @@
         Returns:
 
         """
-    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源碼
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
+    return self.point + t * self.direction

method get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]

説明: 获取直线的参数方程。

返回: x(t), y(t), z(t)

源碼
python
def get_parametric_equations(self) -> tuple[OneSingleVarFunc, OneSingleVarFunc, OneSingleVarFunc]:
     """
         获取直线的参数方程。
         Returns:
             x(t), y(t), z(t)
         """
-    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
+    return (lambda t: self.point.x + self.direction.x * t, lambda t: self.point.y + self.direction.y * t, lambda t: self.point.z + self.direction.z * t)

method is_approx_parallel(self, other: Line3, epsilon: float = 1e-06) -> bool

説明: 判断两条直线是否近似平行。

變數説明:

  • other: 另一条直线
  • epsilon: 误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Line3', epsilon: float=1e-06) -> bool:
     """
         判断两条直线是否近似平行。
         Args:
@@ -113,7 +113,7 @@
         Returns:
             是否近似平行
         """
-    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

變數説明:

  • other: 另一条直线

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Line3') -> bool:
+    return self.direction.is_approx_parallel(other.direction, epsilon)

method is_parallel(self, other: Line3) -> bool

説明: 判断两条直线是否平行。

變數説明:

  • other: 另一条直线

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Line3') -> bool:
     """
         判断两条直线是否平行。
         Args:
@@ -121,7 +121,7 @@
         Returns:
             是否平行
         """
-    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

變數説明:

  • other: 另一条直线

返回: 是否共线

源碼
python
def is_collinear(self, other: 'Line3') -> bool:
+    return self.direction.is_parallel(other.direction)

method is_collinear(self, other: Line3) -> bool

説明: 判断两条直线是否共线。

變數説明:

  • other: 另一条直线

返回: 是否共线

源碼
python
def is_collinear(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共线。
         Args:
@@ -129,7 +129,7 @@
         Returns:
             是否共线
         """
-    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

變數説明:

  • point: 点

返回: 是否在直线上

源碼
python
def is_point_on(self, point: 'Point3') -> bool:
+    return self.is_parallel(other) and (self.point - other.point).is_parallel(self.direction)

method is_point_on(self, point: Point3) -> bool

説明: 判断点是否在直线上。

變數説明:

  • point: 点

返回: 是否在直线上

源碼
python
def is_point_on(self, point: 'Point3') -> bool:
     """
         判断点是否在直线上。
         Args:
@@ -137,7 +137,7 @@
         Returns:
             是否在直线上
         """
-    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

變數説明:

  • other: 另一条直线

返回: 是否共面

源碼
python
def is_coplanar(self, other: 'Line3') -> bool:
+    return (point - self.point).is_parallel(self.direction)

method is_coplanar(self, other: Line3) -> bool

説明: 判断两条直线是否共面。 充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。

變數説明:

  • other: 另一条直线

返回: 是否共面

源碼
python
def is_coplanar(self, other: 'Line3') -> bool:
     """
         判断两条直线是否共面。
         充要条件:两直线方向向量的叉乘与两直线上任意一点的向量的点积为0。
@@ -146,7 +146,7 @@
         Returns:
             是否共面
         """
-    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源碼
python
def simplify(self):
+    return self.direction.cross(other.direction) @ (self.point - other.point) == 0

method simplify(self)

説明: 简化直线方程,等价相等。 自体简化,不返回值。

按照可行性一次对x y z 化 0 处理,并对向量单位化

源碼
python
def simplify(self):
     """
         简化直线方程,等价相等。
         自体简化,不返回值。
@@ -159,7 +159,7 @@
     if self.direction.y == 0:
         self.point.y = 0
     if self.direction.z == 0:
-        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

變數説明:

  • p1: 点1
  • p2: 点2

返回: 直线

源碼
python
@classmethod
+        self.point.z = 0

@classmethod

method from_two_points(cls, p1: Point3, p2: Point3) -> Line3

説明: 工厂函数 由两点构造直线。

變數説明:

  • p1: 点1
  • p2: 点2

返回: 直线

源碼
python
@classmethod
 def from_two_points(cls, p1: 'Point3', p2: 'Point3') -> 'Line3':
     """
         工厂函数 由两点构造直线。
@@ -170,7 +170,7 @@
             直线
         """
     direction = p2 - p1
-    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

變數説明:

  • other: 另一条直线

返回: 交点

源碼
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
+    return cls(p1, direction)

method __and__(self, other: Line3) -> Line3 | Point3 | None

説明: 计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。

變數説明:

  • other: 另一条直线

返回: 交点

源碼
python
def __and__(self, other: 'Line3') -> 'Line3 | Point3 | None':
     """
         计算两条直线点集合的交集。重合线返回自身,平行线返回None,交线返回交点。
         Args:
@@ -183,7 +183,7 @@
     elif self.is_parallel(other) or not self.is_coplanar(other):
         return None
     else:
-        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

變數説明:

  • other:
源碼
python
def __eq__(self, other) -> bool:
+        return self.cal_intersection(other)

method __eq__(self, other) -> bool

説明: 判断两条直线是否等价。

v1 // v2 ∧ (p1 - p2) // v1

變數説明:

  • other:
源碼
python
def __eq__(self, other) -> bool:
     """
         判断两条直线是否等价。
 
@@ -194,8 +194,8 @@
         Returns:
 
         """
-    return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)
- + return self.direction.is_parallel(other.direction) and (self.point - other.point).is_parallel(self.direction)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/mp_math_typing.html b/zht/api/mp_math/mp_math_typing.html index 728f324..13c0b41 100644 --- a/zht/api/mp_math/mp_math_typing.html +++ b/zht/api/mp_math/mp_math_typing.html @@ -6,19 +6,19 @@ mbcp.mp_math.mp_math_typing | MBCP docs - + - + - - - + + + -
Skip to content

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

- +
Skip to content

mbcp.mp_math.mp_math_typing

説明: 本模块用于内部类型提示

var RealNumber = int | float

  • 類型: TypeAlias

  • 説明: 实数

var Number = RealNumber | complex

  • 類型: TypeAlias

  • 説明: 数

var SingleVar = TypeVar('SingleVar', bound=Number)

  • 説明: 单变量

var ArrayVar = TypeVar('ArrayVar', bound=Iterable[Number])

  • 説明: 数组变量

var Var = SingleVar | ArrayVar

  • 類型: TypeAlias

  • 説明: 变量

var OneSingleVarFunc = Callable[[SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 一元单变量函数

var OneArrayFunc = Callable[[ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 一元数组函数

var OneVarFunc = OneSingleVarFunc | OneArrayFunc

  • 類型: TypeAlias

  • 説明: 一元函数

var TwoSingleVarsFunc = Callable[[SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 二元单变量函数

var TwoArraysFunc = Callable[[ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 二元数组函数

var TwoVarsFunc = TwoSingleVarsFunc | TwoArraysFunc

  • 類型: TypeAlias

  • 説明: 二元函数

var ThreeSingleVarsFunc = Callable[[SingleVar, SingleVar, SingleVar], SingleVar]

  • 類型: TypeAlias

  • 説明: 三元单变量函数

var ThreeArraysFunc = Callable[[ArrayVar, ArrayVar, ArrayVar], ArrayVar]

  • 類型: TypeAlias

  • 説明: 三元数组函数

var ThreeVarsFunc = ThreeSingleVarsFunc | ThreeArraysFunc

  • 類型: TypeAlias

  • 説明: 三元函数

var MultiSingleVarsFunc = Callable[..., SingleVar]

  • 類型: TypeAlias

  • 説明: 多元单变量函数

var MultiArraysFunc = Callable[..., ArrayVar]

  • 類型: TypeAlias

  • 説明: 多元数组函数

var MultiVarsFunc = MultiSingleVarsFunc | MultiArraysFunc

  • 類型: TypeAlias

  • 説明: 多元函数

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/plane.html b/zht/api/mp_math/plane.html index d321d38..5400a1a 100644 --- a/zht/api/mp_math/plane.html +++ b/zht/api/mp_math/plane.html @@ -6,18 +6,18 @@ mbcp.mp_math.plane | MBCP docs - + - + - - - + + + -
Skip to content

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

變數説明:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源碼
python
def __init__(self, a: float, b: float, c: float, d: float):
+    
Skip to content

mbcp.mp_math.plane

説明: 本模块定义了三维空间中的平面类

class Plane3

method __init__(self, a: float, b: float, c: float, d: float)

説明: 平面方程:ax + by + cz + d = 0

變數説明:

  • a: x系数
  • b: y系数
  • c: z系数
  • d: 常数项
源碼
python
def __init__(self, a: float, b: float, c: float, d: float):
     """
         平面方程:ax + by + cz + d = 0
         Args:
@@ -29,7 +29,7 @@
     self.a = a
     self.b = b
     self.c = c
-    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

變數説明:

  • other: 另一个平面

返回: 是否近似相等

源碼
python
def approx(self, other: 'Plane3') -> bool:
+    self.d = d

method approx(self, other: Plane3) -> bool

説明: 判断两个平面是否近似相等。

變數説明:

  • other: 另一个平面

返回: 是否近似相等

源碼
python
def approx(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否近似相等。
         Args:
@@ -47,7 +47,7 @@
         k = other.c / self.c
         return approx(other.a, self.a * k) and approx(other.b, self.b * k) and approx(other.d, self.d * k)
     else:
-        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

變數説明:

  • other: 另一个平面

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
+        return False

method cal_angle(self, other: Line3 | Plane3) -> AnyAngle

説明: 计算平面与平面之间的夹角。

變數説明:

  • other: 另一个平面

返回: 夹角弧度

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_angle(self, other: 'Line3 | Plane3') -> 'AnyAngle':
     """
         计算平面与平面之间的夹角。
         Args:
@@ -62,7 +62,7 @@
     elif isinstance(other, Plane3):
         return AnyAngle(math.acos(self.normal @ other.normal / (self.normal.length * other.normal.length)), is_radian=True)
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

變數説明:

  • other: 另一个平面或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_distance(self, other: Plane3 | Point3) -> float

説明: 计算平面与平面或点之间的距离。

變數説明:

  • other: 另一个平面或点

返回: 距离

抛出:

  • TypeError 不支持的类型
源碼
python
def cal_distance(self, other: 'Plane3 | Point3') -> float:
     """
         计算平面与平面或点之间的距离。
         Args:
@@ -77,7 +77,7 @@
     elif isinstance(other, Point3):
         return abs(self.a * other.x + self.b * other.y + self.c * other.z + self.d) / (self.a ** 2 + self.b ** 2 + self.c ** 2) ** 0.5
     else:
-        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

變數説明:

  • other: 另一个平面

返回: 两平面的交线

源碼
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
+        raise TypeError(f'Unsupported type: {type(other)}')

method cal_intersection_line3(self, other: Plane3) -> Line3

説明: 计算两平面的交线。

變數説明:

  • other: 另一个平面

返回: 两平面的交线

源碼
python
def cal_intersection_line3(self, other: 'Plane3') -> 'Line3':
     """
         计算两平面的交线。
         Args:
@@ -102,7 +102,7 @@
         A = np.array([[self.a, self.b], [other.a, other.b]])
         B = np.array([-self.d, -other.d])
         x, y = np.linalg.solve(A, B)
-    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

變數説明:

  • other: 不与平面平行或在平面上的直线

返回: 交点

抛出:

  • ValueError 平面与直线平行或重合
源碼
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
+    return Line3(Point3(x, y, z), direction)

method cal_intersection_point3(self, other: Line3) -> Point3

説明: 计算平面与直线的交点。

變數説明:

  • other: 不与平面平行或在平面上的直线

返回: 交点

抛出:

  • ValueError 平面与直线平行或重合
源碼
python
def cal_intersection_point3(self, other: 'Line3') -> 'Point3':
     """
         计算平面与直线的交点。
         Args:
@@ -116,7 +116,7 @@
         raise ValueError('The plane and the line are parallel or coincident.')
     x, y, z = other.get_parametric_equations()
     t = -(self.a * other.point.x + self.b * other.point.y + self.c * other.point.z + self.d) / (self.a * other.direction.x + self.b * other.direction.y + self.c * other.direction.z)
-    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

變數説明:

  • point: 指定点

返回: 所求平面

源碼
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
+    return Point3(x(t), y(t), z(t))

method cal_parallel_plane3(self, point: Point3) -> Plane3

説明: 计算平行于该平面且过指定点的平面。

變數説明:

  • point: 指定点

返回: 所求平面

源碼
python
def cal_parallel_plane3(self, point: 'Point3') -> 'Plane3':
     """
         计算平行于该平面且过指定点的平面。
         Args:
@@ -124,7 +124,7 @@
         Returns:
             所求平面
         """
-    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

變數説明:

  • other: 另一个平面

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Plane3') -> bool:
+    return Plane3.from_point_and_normal(point, self.normal)

method is_parallel(self, other: Plane3) -> bool

説明: 判断两个平面是否平行。

變數説明:

  • other: 另一个平面

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Plane3') -> bool:
     """
         判断两个平面是否平行。
         Args:
@@ -132,14 +132,14 @@
         Returns:
             是否平行
         """
-    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

返回: 法向量

源碼
python
@property
+    return self.normal.is_parallel(other.normal)

@property

method normal(self) -> Vector3

説明: 平面的法向量。

返回: 法向量

源碼
python
@property
 def normal(self) -> 'Vector3':
     """
         平面的法向量。
         Returns:
             法向量
         """
-    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

變數説明:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源碼
python
@classmethod
+    return Vector3(self.a, self.b, self.c)

@classmethod

method from_point_and_normal(cls, point: Point3, normal: Vector3) -> Plane3

説明: 工厂函数 由点和法向量构造平面(点法式构造)。

變數説明:

  • point: 平面上的一点
  • normal: 法向量

返回: 平面

源碼
python
@classmethod
 def from_point_and_normal(cls, point: 'Point3', normal: 'Vector3') -> 'Plane3':
     """
         工厂函数 由点和法向量构造平面(点法式构造)。
@@ -151,7 +151,7 @@
         """
     a, b, c = (normal.x, normal.y, normal.z)
     d = -a * point.x - b * point.y - c * point.z
-    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

變數説明:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源碼
python
@classmethod
+    return cls(a, b, c, d)

@classmethod

method from_three_points(cls, p1: Point3, p2: Point3, p3: Point3) -> Plane3

説明: 工厂函数 由三点构造平面。

變數説明:

  • p1: 点1
  • p2: 点2
  • p3: 点3

返回: 平面

源碼
python
@classmethod
 def from_three_points(cls, p1: 'Point3', p2: 'Point3', p3: 'Point3') -> 'Plane3':
     """
         工厂函数 由三点构造平面。
@@ -165,7 +165,7 @@
     v1 = p2 - p1
     v2 = p3 - p1
     normal = v1.cross(v2)
-    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

變數説明:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源碼
python
@classmethod
+    return cls.from_point_and_normal(p1, normal)

@classmethod

method from_two_lines(cls, l1: Line3, l2: Line3) -> Plane3

説明: 工厂函数 由两直线构造平面。

變數説明:

  • l1: 直线1
  • l2: 直线2

返回: 平面

源碼
python
@classmethod
 def from_two_lines(cls, l1: 'Line3', l2: 'Line3') -> 'Plane3':
     """
         工厂函数 由两直线构造平面。
@@ -179,7 +179,7 @@
     v2 = l2.point - l1.point
     if v2 == zero_vector3:
         v2 = l2.get_point(1) - l1.point
-    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

變數説明:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源碼
python
@classmethod
+    return cls.from_point_and_normal(l1.point, v1.cross(v2))

@classmethod

method from_point_and_line(cls, point: Point3, line: Line3) -> Plane3

説明: 工厂函数 由点和直线构造平面。

變數説明:

  • point: 面上一点
  • line: 面上直线,不包含点

返回: 平面

源碼
python
@classmethod
 def from_point_and_line(cls, point: 'Point3', line: 'Line3') -> 'Plane3':
     """
         工厂函数 由点和直线构造平面。
@@ -189,11 +189,11 @@
         Returns:
             平面
         """
-    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源碼
python
@overload
+    return cls.from_point_and_normal(point, line.direction)

@overload

method __and__(self, other: Line3) -> Point3 | None

源碼
python
@overload
 def __and__(self, other: 'Line3') -> 'Point3 | None':
-    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源碼
python
@overload
+    ...

@overload

method __and__(self, other: Plane3) -> Line3 | None

源碼
python
@overload
 def __and__(self, other: 'Plane3') -> 'Line3 | None':
-    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

變數説明:

  • other:

返回: 不平行平面的交线,平面平行返回None

源碼
python
def __and__(self, other):
+    ...

method __and__(self, other)

説明: 取两平面的交集(人话:交线)

變數説明:

  • other:

返回: 不平行平面的交线,平面平行返回None

源碼
python
def __and__(self, other):
     """
         取两平面的交集(人话:交线)
         Args:
@@ -210,10 +210,10 @@
             return None
         return self.cal_intersection_point3(other)
     else:
-        raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源碼
python
def __eq__(self, other) -> bool:
-    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源碼
python
def __rand__(self, other: 'Line3') -> 'Point3':
-    return self.cal_intersection_point3(other)
- + raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

method __eq__(self, other) -> bool

源碼
python
def __eq__(self, other) -> bool:
+    return self.approx(other)

method __rand__(self, other: Line3) -> Point3

源碼
python
def __rand__(self, other: 'Line3') -> 'Point3':
+    return self.cal_intersection_point3(other)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/point.html b/zht/api/mp_math/point.html index 4b3cfe3..8af8b32 100644 --- a/zht/api/mp_math/point.html +++ b/zht/api/mp_math/point.html @@ -6,18 +6,18 @@ mbcp.mp_math.point | MBCP docs - + - + - - - + + + -
Skip to content

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

變數説明:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源碼
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.point

説明: 本模块定义了三维空间中点的类。

class Point3

method __init__(self, x: float, y: float, z: float)

説明: 笛卡尔坐标系中的点。

變數説明:

  • x: x 坐标
  • y: y 坐标
  • z: z 坐标
源碼
python
def __init__(self, x: float, y: float, z: float):
     """
         笛卡尔坐标系中的点。
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Point3, epsilon: float = APPROX) -> bool

説明: 判断两个点是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Point3', epsilon: float=APPROX) -> bool:
     """
         判断两个点是否近似相等。
         Args:
@@ -37,11 +37,11 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源碼
python
@overload
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

@overload

method self + other: Vector3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Vector3') -> 'Point3':
-    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: P + V -> P P + P -> P

變數説明:

  • other:
源碼
python
def __add__(self, other):
+    ...

method self + other

説明: P + V -> P P + P -> P

變數説明:

  • other:
源碼
python
def __add__(self, other):
     """
         P + V -> P
         P + P -> P
@@ -49,14 +49,14 @@
             other:
         Returns:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

變數説明:

  • other:
源碼
python
def __eq__(self, other):
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

method __eq__(self, other)

説明: 判断两个点是否相等。

變數説明:

  • other:
源碼
python
def __eq__(self, other):
     """
         判断两个点是否相等。
         Args:
             other:
         Returns:
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

變數説明:

  • other:
源碼
python
def __sub__(self, other: 'Point3') -> 'Vector3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self - other: Point3 => Vector3

説明: P - P -> V

P - V -> P 已在 :class:Vector3 中实现

變數説明:

  • other:
源碼
python
def __sub__(self, other: 'Point3') -> 'Vector3':
     """
         P - P -> V
 
@@ -67,8 +67,8 @@
 
         """
     from .vector import Vector3
-    return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)
- + return Vector3(self.x - other.x, self.y - other.y, self.z - other.z)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/segment.html b/zht/api/mp_math/segment.html index 61b355d..38bf8f3 100644 --- a/zht/api/mp_math/segment.html +++ b/zht/api/mp_math/segment.html @@ -6,18 +6,18 @@ mbcp.mp_math.segment | MBCP docs - + - + - - - + + + -
Skip to content

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

源碼
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
+    
Skip to content

mbcp.mp_math.segment

説明: 本模块定义了三维空间中的线段类

class Segment3

method __init__(self, p1: Point3, p2: Point3)

説明: 三维空间中的线段。 :param p1: :param p2:

源碼
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -30,8 +30,8 @@
     '长度'
     self.length = self.direction.length
     '中心点'
-    self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)
- + self.midpoint = Point3((self.p1.x + self.p2.x) / 2, (self.p1.y + self.p2.y) / 2, (self.p1.z + self.p2.z) / 2)

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/utils.html b/zht/api/mp_math/utils.html index c155199..1cb2673 100644 --- a/zht/api/mp_math/utils.html +++ b/zht/api/mp_math/utils.html @@ -6,18 +6,18 @@ mbcp.mp_math.utils | MBCP docs - + - + - - - + + + -
Skip to content

func clamp() -> float

説明: 区间限定函数

變數説明:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源碼
python
def clamp(x: float, min_: float, max_: float) -> float:
+    
Skip to content

mbcp.mp_math.utils

説明: 本模块定义了一些常用的工具函数

func clamp(x: float, min_: float, max_: float) -> float

説明: 区间限定函数

變數説明:

  • x: 待限定的值
  • min_: 最小值
  • max_: 最大值

返回: 限制后的值

源碼
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -28,7 +28,20 @@
     Returns:
         限制后的值
     """
-    return max(min(x, max_), min_)

func approx(x: float = 0.0, y: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

變數説明:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
+    return max(min(x, max_), min_)

class Approx

method __init__(self, value: RealNumber)

源碼
python
def __init__(self, value: RealNumber):
+    self.value = value

method __eq__(self, other)

源碼
python
def __eq__(self, other):
+    if isinstance(self.value, (float, int)):
+        if isinstance(other, (float, int)):
+            return abs(self.value - other) < APPROX
+        else:
+            self.raise_type_error(other)
+    elif isinstance(self.value, Vector3):
+        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
+            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
+        else:
+            self.raise_type_error(other)

method raise_type_error(self, other)

源碼
python
def raise_type_error(self, other):
+    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源碼
python
def __ne__(self, other):
+    return not self.__eq__(other)

func approx(x: float, y: float = 0.0, epsilon: float = APPROX) -> bool

説明: 判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。

變數説明:

  • x: 数1
  • y: 数2
  • epsilon: 误差

返回: 是否近似相等

源碼
python
def approx(x: float, y: float=0.0, epsilon: float=APPROX) -> bool:
     """
     判断两个数是否近似相等。或包装一个实数,用于判断是否近似于0。
     Args:
@@ -38,7 +51,7 @@
     Returns:
         是否近似相等
     """
-    return abs(x - y) < epsilon

func sign(x: float = False) -> str

説明: 获取数的符号。

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign(x: float, only_neg: bool=False) -> str:
+    return abs(x - y) < epsilon

func sign(x: float, only_neg: bool = False) -> str

説明: 获取数的符号。

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign(x: float, only_neg: bool=False) -> str:
     """获取数的符号。
     Args:
         x: 数
@@ -51,7 +64,7 @@
     elif x < 0:
         return '-'
     else:
-        return ''

func sign_format(x: float = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign_format(x: float, only_neg: bool=False) -> str:
+        return ''

func sign_format(x: float, only_neg: bool = False) -> str

説明: 格式化符号数 -1 -> -1 1 -> +1 0 -> ""

變數説明:

  • x: 数
  • only_neg: 是否只返回负数的符号

返回: 符号 + - ""

源碼
python
def sign_format(x: float, only_neg: bool=False) -> str:
     """格式化符号数
     -1 -> -1
     1 -> +1
@@ -67,21 +80,8 @@
     elif x < 0:
         return f'-{abs(x)}'
     else:
-        return ''

class Approx

method __init__(self, value: RealNumber)

源碼
python
def __init__(self, value: RealNumber):
-    self.value = value

method __eq__(self, other)

源碼
python
def __eq__(self, other):
-    if isinstance(self.value, (float, int)):
-        if isinstance(other, (float, int)):
-            return abs(self.value - other) < APPROX
-        else:
-            self.raise_type_error(other)
-    elif isinstance(self.value, Vector3):
-        if isinstance(other, (Vector3, Point3, Plane3, Line3)):
-            return all([approx(self.value.x, other.x), approx(self.value.y, other.y), approx(self.value.z, other.z)])
-        else:
-            self.raise_type_error(other)

method raise_type_error(self, other)

源碼
python
def raise_type_error(self, other):
-    raise TypeError(f'Unsupported type: {type(self.value)} and {type(other)}')

method __ne__(self, other)

源碼
python
def __ne__(self, other):
-    return not self.__eq__(other)
- + return ''

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/mp_math/vector.html b/zht/api/mp_math/vector.html index d44f8e1..8ceaccc 100644 --- a/zht/api/mp_math/vector.html +++ b/zht/api/mp_math/vector.html @@ -6,18 +6,18 @@ mbcp.mp_math.vector | MBCP docs - + - + - - - + + + -
Skip to content

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

變數説明:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源碼
python
def __init__(self, x: float, y: float, z: float):
+    
Skip to content

mbcp.mp_math.vector

説明: 本模块定义了3维向量的类Vector3,以及一些常用的向量。

class Vector3

method __init__(self, x: float, y: float, z: float)

説明: 3维向量

變數説明:

  • x: x轴分量
  • y: y轴分量
  • z: z轴分量
源碼
python
def __init__(self, x: float, y: float, z: float):
     """
         3维向量
         Args:
@@ -27,7 +27,7 @@
         """
     self.x = x
     self.y = y
-    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    self.z = z

method approx(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似相等。

變數説明:

  • other:
  • epsilon:

返回: 是否近似相等

源碼
python
def approx(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似相等。
         Args:
@@ -37,7 +37,7 @@
         Returns:
             是否近似相等
         """
-    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

變數説明:

  • other: 另一个向量

返回: 夹角

源碼
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
+    return all([abs(self.x - other.x) < epsilon, abs(self.y - other.y) < epsilon, abs(self.z - other.z) < epsilon])

method cal_angle(self, other: Vector3) -> AnyAngle

説明: 计算两个向量之间的夹角。

變數説明:

  • other: 另一个向量

返回: 夹角

源碼
python
def cal_angle(self, other: 'Vector3') -> 'AnyAngle':
     """
         计算两个向量之间的夹角。
         Args:
@@ -45,7 +45,7 @@
         Returns:
             夹角
         """
-    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

變數説明:

  • other:

返回: 行列式的结果

源碼
python
def cross(self, other: 'Vector3') -> 'Vector3':
+    return AnyAngle(math.acos(self @ other / (self.length * other.length)), is_radian=True)

method cross(self, other: Vector3) -> Vector3

説明: 向量积 叉乘:v1 cross v2 -> v3

叉乘为0,则两向量平行。 其余结果的模为平行四边形的面积。

變數説明:

  • other:

返回: 行列式的结果

源碼
python
def cross(self, other: 'Vector3') -> 'Vector3':
     """
         向量积 叉乘:v1 cross v2 -> v3
 
@@ -65,7 +65,7 @@
         Returns:
             行列式的结果
         """
-    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

變數説明:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
+    return Vector3(self.y * other.z - self.z * other.y, self.z * other.x - self.x * other.z, self.x * other.y - self.y * other.x)

method is_approx_parallel(self, other: Vector3, epsilon: float = APPROX) -> bool

説明: 判断两个向量是否近似平行。

變數説明:

  • other: 另一个向量
  • epsilon: 允许的误差

返回: 是否近似平行

源碼
python
def is_approx_parallel(self, other: 'Vector3', epsilon: float=APPROX) -> bool:
     """
         判断两个向量是否近似平行。
         Args:
@@ -74,7 +74,7 @@
         Returns:
             是否近似平行
         """
-    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

變數説明:

  • other: 另一个向量

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Vector3') -> bool:
+    return self.cross(other).length < epsilon

method is_parallel(self, other: Vector3) -> bool

説明: 判断两个向量是否平行。

變數説明:

  • other: 另一个向量

返回: 是否平行

源碼
python
def is_parallel(self, other: 'Vector3') -> bool:
     """
         判断两个向量是否平行。
         Args:
@@ -82,7 +82,7 @@
         Returns:
             是否平行
         """
-    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

源碼
python
def normalize(self):
+    return self.cross(other).approx(zero_vector3)

method normalize(self)

説明: 将向量归一化。

自体归一化,不返回值。

源碼
python
def normalize(self):
     """
         将向量归一化。
 
@@ -91,32 +91,32 @@
     length = self.length
     self.x /= length
     self.y /= length
-    self.z /= length

@property

method np_array(self) -> np.ndarray

源碼
python
@property
+    self.z /= length

@property

method np_array(self) -> np.ndarray

源碼
python
@property
 def np_array(self) -> 'np.ndarray':
     """
         返回numpy数组
         Returns:
         """
-    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

返回: 模

源碼
python
@property
+    return np.array([self.x, self.y, self.z])

@property

method length(self) -> float

説明: 向量的模。

返回: 模

源碼
python
@property
 def length(self) -> float:
     """
         向量的模。
         Returns:
 
         """
-    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

返回: 单位向量

源碼
python
@property
+    return math.sqrt(self.x ** 2 + self.y ** 2 + self.z ** 2)

@property

method unit(self) -> Vector3

説明: 获取该向量的单位向量。

返回: 单位向量

源碼
python
@property
 def unit(self) -> 'Vector3':
     """
         获取该向量的单位向量。
         Returns:
             单位向量
         """
-    return self / self.length

method __abs__(self)

源碼
python
def __abs__(self):
-    return self.length

@overload

method self + other: Vector3 => Vector3

源碼
python
@overload
+    return self / self.length

method __abs__(self)

源碼
python
def __abs__(self):
+    return self.length

@overload

method self + other: Vector3 => Vector3

源碼
python
@overload
 def __add__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self + other: Point3 => Point3

源碼
python
@overload
 def __add__(self, other: 'Point3') -> 'Point3':
-    ...

method self + other

説明: V + P -> P

V + V -> V

變數説明:

  • other:
源碼
python
def __add__(self, other):
+    ...

method self + other

説明: V + P -> P

V + V -> V

變數説明:

  • other:
源碼
python
def __add__(self, other):
     """
         V + P -> P
 
@@ -131,7 +131,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x + other.x, self.y + other.y, self.z + other.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

變數説明:

  • other:

返回: 是否相等

源碼
python
def __eq__(self, other):
+        raise TypeError(f"unsupported operand type(s) for +: 'Vector3' and '{type(other)}'")

method __eq__(self, other)

説明: 判断两个向量是否相等。

變數説明:

  • other:

返回: 是否相等

源碼
python
def __eq__(self, other):
     """
         判断两个向量是否相等。
         Args:
@@ -139,7 +139,7 @@
         Returns:
             是否相等
         """
-    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

源碼
python
def __radd__(self, other: 'Point3') -> 'Point3':
+    return approx(self.x, other.x) and approx(self.y, other.y) and approx(self.z, other.z)

method self + other: Point3 => Point3

説明: P + V -> P

别去点那边实现了。 :param other: :return:

源碼
python
def __radd__(self, other: 'Point3') -> 'Point3':
     """
         P + V -> P
 
@@ -147,11 +147,11 @@
         :param other:
         :return:
         """
-    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源碼
python
@overload
+    return Point3(self.x + other.x, self.y + other.y, self.z + other.z)

@overload

method self - other: Vector3 => Vector3

源碼
python
@overload
 def __sub__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self - other: Point3 => Point3

源碼
python
@overload
+    ...

@overload

method self - other: Point3 => Point3

源碼
python
@overload
 def __sub__(self, other: 'Point3') -> 'Point3':
-    ...

method self - other

説明: V - P -> P

V - V -> V

變數説明:

  • other:
源碼
python
def __sub__(self, other):
+    ...

method self - other

説明: V - P -> P

V - V -> V

變數説明:

  • other:
源碼
python
def __sub__(self, other):
     """
         V - P -> P
 
@@ -165,7 +165,7 @@
     elif isinstance(other, Point3):
         return Point3(self.x - other.x, self.y - other.y, self.z - other.z)
     else:
-        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

變數説明:

  • other:
源碼
python
def __rsub__(self, other: 'Point3'):
+        raise TypeError(f'unsupported operand type(s) for -: "Vector3" and "{type(other)}"')

method self - other: Point3

説明: P - V -> P

變數説明:

  • other:
源碼
python
def __rsub__(self, other: 'Point3'):
     """
         P - V -> P
         Args:
@@ -176,11 +176,11 @@
     if isinstance(other, Point3):
         return Point3(other.x - self.x, other.y - self.y, other.z - self.z)
     else:
-        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源碼
python
@overload
+        raise TypeError(f"unsupported operand type(s) for -: '{type(other)}' and 'Vector3'")

@overload

method self * other: Vector3 => Vector3

源碼
python
@overload
 def __mul__(self, other: 'Vector3') -> 'Vector3':
-    ...

@overload

method self * other: RealNumber => Vector3

源碼
python
@overload
+    ...

@overload

method self * other: RealNumber => Vector3

源碼
python
@overload
 def __mul__(self, other: RealNumber) -> 'Vector3':
-    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

變數説明:

  • other:
源碼
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
+    ...

method self * other: int | float | Vector3 => Vector3

説明: 数组运算 非点乘。点乘使用@,叉乘使用cross。

變數説明:

  • other:
源碼
python
def __mul__(self, other: 'int | float | Vector3') -> 'Vector3':
     """
         数组运算 非点乘。点乘使用@,叉乘使用cross。
         Args:
@@ -193,18 +193,18 @@
     elif isinstance(other, (float, int)):
         return Vector3(self.x * other, self.y * other, self.z * other)
     else:
-        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源碼
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
-    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

變數説明:

  • other:
源碼
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
+        raise TypeError(f"unsupported operand type(s) for *: 'Vector3' and '{type(other)}'")

method self * other: RealNumber => Vector3

源碼
python
def __rmul__(self, other: 'RealNumber') -> 'Vector3':
+    return self.__mul__(other)

method self @ other: Vector3 => RealNumber

説明: 点乘。

變數説明:

  • other:
源碼
python
def __matmul__(self, other: 'Vector3') -> 'RealNumber':
     """
         点乘。
         Args:
             other:
         Returns:
         """
-    return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源碼
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
-    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源碼
python
def __neg__(self):
-    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 類型: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 類型: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 類型: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 類型: Vector3

  • 説明: z轴单位向量

- + return self.x * other.x + self.y * other.y + self.z * other.z

method self / other: RealNumber => Vector3

源碼
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
+    return Vector3(self.x / other, self.y / other, self.z / other)

method - self

源碼
python
def __neg__(self):
+    return Vector3(-self.x, -self.y, -self.z)

var zero_vector3 = Vector3(0, 0, 0)

  • 類型: Vector3

  • 説明: 零向量

var x_axis = Vector3(1, 0, 0)

  • 類型: Vector3

  • 説明: x轴单位向量

var y_axis = Vector3(0, 1, 0)

  • 類型: Vector3

  • 説明: y轴单位向量

var z_axis = Vector3(0, 0, 1)

  • 類型: Vector3

  • 説明: z轴单位向量

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/particle/index.html b/zht/api/particle/index.html index 0c59267..4df31d4 100644 --- a/zht/api/particle/index.html +++ b/zht/api/particle/index.html @@ -6,19 +6,19 @@ mbcp.particle | MBCP docs - + - + - - - + + + - - + + \ No newline at end of file diff --git a/zht/api/presets/index.html b/zht/api/presets/index.html index 933ee51..8eb5f4c 100644 --- a/zht/api/presets/index.html +++ b/zht/api/presets/index.html @@ -6,19 +6,19 @@ mbcp.presets | MBCP docs - + - + - - - + + + - - +
Skip to content

mbcp.presets

説明: Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved

@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : snowykami@outlook.com @File : init.py @Software: PyCharm

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/api/presets/model/index.html b/zht/api/presets/model/index.html index a0309f2..53c374d 100644 --- a/zht/api/presets/model/index.html +++ b/zht/api/presets/model/index.html @@ -6,18 +6,18 @@ mbcp.presets.model | MBCP docs - + - + - - - + + + -
Skip to content

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

變數説明:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源碼
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

method sphere(radius: float, density: float)

説明: 生成球体上的点集。

變數説明:

  • radius:
  • density:

返回: List[Point3]: 球体上的点集。

源碼
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
- + return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ \ No newline at end of file diff --git a/zht/guide/index.html b/zht/guide/index.html new file mode 100644 index 0000000..f9a88ef --- /dev/null +++ b/zht/guide/index.html @@ -0,0 +1,24 @@ + + + + + + 开始不了一点 | MBCP docs + + + + + + + + + + + + + +
Skip to content

开始不了一点

12x111

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file diff --git a/zht/index.html b/zht/index.html new file mode 100644 index 0000000..eb3511a --- /dev/null +++ b/zht/index.html @@ -0,0 +1,24 @@ + + + + + + MBCP docs + + + + + + + + + + + + + +
Skip to content

MBCP docs

More basic change particle

用於幾何運算和粒子製作的軟體庫

文檔由 VitePress 構建 | API引用由 litedoc 生成

+ + + + \ No newline at end of file