diff --git a/404.html b/404.html index 2c9facb..efb5a29 100644 --- a/404.html +++ b/404.html @@ -15,7 +15,7 @@
- + \ No newline at end of file diff --git a/api/api.html b/api/api.html index 67b74b3..1175885 100644 --- a/api/api.html +++ b/api/api.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp

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

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

- +
Skip to content

mbcp

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

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

+ \ No newline at end of file diff --git a/api/index.html b/api/index.html index 83db185..0e95e7e 100644 --- a/api/index.html +++ b/api/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp

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

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

- +
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 ad058bf..7f03ff4 100644 --- a/api/mp_math/angle.html +++ b/api/mp_math/angle.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.angle

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

class Angle

class AnyAngle(Angle)

def __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)

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

说明: 任意角度。

参数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源代码
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -115,8 +115,8 @@
     ...

def self / other

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

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

- + 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 e76fdf5..2ceb99c 100644 --- a/api/mp_math/const.html +++ b/api/mp_math/const.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 a514d11..c0f1afe 100644 --- a/api/mp_math/equation.html +++ b/api/mp_math/equation.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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):
+    
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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:
@@ -97,7 +97,7 @@
         """@litedoc-hide"""
         return func(*args, *args2)
     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 index 9d3ae02..75cce8d 100644 --- a/api/mp_math/function.html +++ b/api/mp_math/function.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.function

说明: AAA

def 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:
+    
Skip to content

mbcp.mp_math.function

说明: AAA

def 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]
@@ -34,7 +34,7 @@
     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 8469020..16b7c97 100644 --- a/api/mp_math/index.html +++ b/api/mp_math/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp.mp_math

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

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

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

- +
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 59f2e83..5631af6 100644 --- a/api/mp_math/line.html +++ b/api/mp_math/line.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.line

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

class Line3

def __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

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

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

参数:

  • point: 直线上的一点
  • direction: 直线的方向向量
源代码
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -195,7 +195,7 @@
 
         """
     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.html b/api/mp_math/mp_math.html index d6e7310..a7c71be 100644 --- a/api/mp_math/mp_math.html +++ b/api/mp_math/mp_math.html @@ -3,7 +3,7 @@ - mbcp.mp_math.mp_math_typing | MBCP docs + mbcp.mp_math | MBCP docs @@ -12,13 +12,13 @@ - + -
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 生成

- +
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/mp_math_typing.html b/api/mp_math/mp_math_typing.html index d962bc4..cc6fe1e 100644 --- a/api/mp_math/mp_math_typing.html +++ b/api/mp_math/mp_math_typing.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 8284334..b374a00 100644 --- a/api/mp_math/plane.html +++ b/api/mp_math/plane.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.plane

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

class Plane3

def __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

def __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:
@@ -213,7 +213,7 @@
         raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

def __eq__(self, other) -> bool

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

def __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 6b258c9..7126434 100644 --- a/api/mp_math/point.html +++ b/api/mp_math/point.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.point

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

class Point3

def __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

def __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:
@@ -68,7 +68,7 @@
         """
     from .vector import Vector3
     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 4817b46..d367119 100644 --- a/api/mp_math/segment.html +++ b/api/mp_math/segment.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.segment

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

class Segment3

def __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

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

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

源代码
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -31,7 +31,7 @@
     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)

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

- + \ No newline at end of file diff --git a/api/mp_math/utils.html b/api/mp_math/utils.html index 0441b46..4a5c429 100644 --- a/api/mp_math/utils.html +++ b/api/mp_math/utils.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.utils

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

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

说明: 区间限定函数

参数:

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

返回: 限制后的值

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

mbcp.mp_math.utils

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

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

说明: 区间限定函数

参数:

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

返回: 限制后的值

源代码
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -81,7 +81,7 @@
         return f'-{abs(x)}'
     else:
         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 6bda67a..e68cdc5 100644 --- a/api/mp_math/vector.html +++ b/api/mp_math/vector.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.vector

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

class Vector3

def __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

def __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:
@@ -204,7 +204,7 @@
     return self.x * other.x + self.y * other.y + self.z * other.z

def self / other: RealNumber => Vector3

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

def - 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 cef67d2..15b3dbd 100644 --- a/api/particle/index.html +++ b/api/particle/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/api/particle/particle.html b/api/particle/particle.html index 04b4753..4d6e4c1 100644 --- a/api/particle/particle.html +++ b/api/particle/particle.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/api/presets/index.html b/api/presets/index.html index 8149b42..065415b 100644 --- a/api/presets/index.html +++ b/api/presets/index.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 cb3114c..520dbf3 100644 --- a/api/presets/model/index.html +++ b/api/presets/model/index.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

参数:

  • radius:
  • density:

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

源代码
python
@staticmethod
+    
Skip to content

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

参数:

  • radius:
  • density:

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

源代码
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

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

- + \ No newline at end of file diff --git a/api/presets/model/model.html b/api/presets/model/model.html index 3a11226..4064754 100644 --- a/api/presets/model/model.html +++ b/api/presets/model/model.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

参数:

  • radius:
  • density:

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

源代码
python
@staticmethod
+    
Skip to content

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

参数:

  • radius:
  • density:

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

源代码
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

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

- + \ No newline at end of file diff --git a/api/presets/presets.html b/api/presets/presets.html index da5f02c..7113918 100644 --- a/api/presets/presets.html +++ b/api/presets/presets.html @@ -17,8 +17,8 @@ -
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 生成

- +
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/assets/api_mp_math_mp_math.md.BVQYtS99.js b/assets/api_mp_math_mp_math.md.BVQYtS99.js deleted file mode 100644 index 525f3e8..0000000 --- a/assets/api_mp_math_mp_math.md.BVQYtS99.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"api/mp_math/mp_math.md","filePath":"zh/api/mp_math/mp_math.md"}'),n={name:"api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math.md.BVQYtS99.lean.js b/assets/api_mp_math_mp_math.md.BVQYtS99.lean.js deleted file mode 100644 index 1ad474a..0000000 --- a/assets/api_mp_math_mp_math.md.BVQYtS99.lean.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"api/mp_math/mp_math.md","filePath":"zh/api/mp_math/mp_math.md"}'),n={name:"api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/assets/api_mp_math_mp_math.md.GlFMkWiQ.js b/assets/api_mp_math_mp_math.md.GlFMkWiQ.js new file mode 100644 index 0000000..cdbe8d6 --- /dev/null +++ b/assets/api_mp_math_mp_math.md.GlFMkWiQ.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/mp_math/mp_math.md","filePath":"zh/api/mp_math/mp_math.md"}'),c={name:"api/mp_math/mp_math.md"},m=o('

mbcp.mp_math

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

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),i=[m];function _(p,l,d,n,r,s){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/api_mp_math_mp_math.md.GlFMkWiQ.lean.js b/assets/api_mp_math_mp_math.md.GlFMkWiQ.lean.js new file mode 100644 index 0000000..95b2f6b --- /dev/null +++ b/assets/api_mp_math_mp_math.md.GlFMkWiQ.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/mp_math/mp_math.md","filePath":"zh/api/mp_math/mp_math.md"}'),c={name:"api/mp_math/mp_math.md"},m=o("",3),i=[m];function _(p,l,d,n,r,s){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/en_api_mp_math_mp_math.md.D6ihYPav.js b/assets/en_api_mp_math_mp_math.md.D6ihYPav.js new file mode 100644 index 0000000..e2d8596 --- /dev/null +++ b/assets/en_api_mp_math_mp_math.md.D6ihYPav.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/mp_math/mp_math.md","filePath":"en/api/mp_math/mp_math.md"}'),c={name:"en/api/mp_math/mp_math.md"},m=o('

mbcp.mp_math

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

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),i=[m];function p(_,l,n,d,r,s){return a(),t("div",null,i)}const f=e(c,[["render",p]]);export{u as __pageData,f as default}; diff --git a/assets/en_api_mp_math_mp_math.md.D6ihYPav.lean.js b/assets/en_api_mp_math_mp_math.md.D6ihYPav.lean.js new file mode 100644 index 0000000..e9e2538 --- /dev/null +++ b/assets/en_api_mp_math_mp_math.md.D6ihYPav.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/mp_math/mp_math.md","filePath":"en/api/mp_math/mp_math.md"}'),c={name:"en/api/mp_math/mp_math.md"},m=o("",3),i=[m];function p(_,l,n,d,r,s){return a(),t("div",null,i)}const f=e(c,[["render",p]]);export{u as __pageData,f as default}; diff --git a/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js b/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js deleted file mode 100644 index f75f203..0000000 --- a/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"en/api/mp_math/mp_math.md","filePath":"en/api/mp_math/mp_math.md"}'),n={name:"en/api/mp_math/mp_math.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.md.h0PJ9KWU.lean.js b/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.lean.js deleted file mode 100644 index b2f84b9..0000000 --- a/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.lean.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"en/api/mp_math/mp_math.md","filePath":"en/api/mp_math/mp_math.md"}'),n={name:"en/api/mp_math/mp_math.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/ja_api_mp_math_mp_math.md.C7tFDhfI.js b/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.js deleted file mode 100644 index e65d1ca..0000000 --- a/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"ja/api/mp_math/mp_math.md","filePath":"ja/api/mp_math/mp_math.md"}'),n={name:"ja/api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js b/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js deleted file mode 100644 index b947707..0000000 --- a/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"ja/api/mp_math/mp_math.md","filePath":"ja/api/mp_math/mp_math.md"}'),n={name:"ja/api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/assets/ja_api_mp_math_mp_math.md.D-prC0UO.js b/assets/ja_api_mp_math_mp_math.md.D-prC0UO.js new file mode 100644 index 0000000..8b0247d --- /dev/null +++ b/assets/ja_api_mp_math_mp_math.md.D-prC0UO.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/mp_math/mp_math.md","filePath":"ja/api/mp_math/mp_math.md"}'),c={name:"ja/api/mp_math/mp_math.md"},m=o('

mbcp.mp_math

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

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),i=[m];function _(p,l,d,n,r,s){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/ja_api_mp_math_mp_math.md.D-prC0UO.lean.js b/assets/ja_api_mp_math_mp_math.md.D-prC0UO.lean.js new file mode 100644 index 0000000..9fa9600 --- /dev/null +++ b/assets/ja_api_mp_math_mp_math.md.D-prC0UO.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/mp_math/mp_math.md","filePath":"ja/api/mp_math/mp_math.md"}'),c={name:"ja/api/mp_math/mp_math.md"},m=o("",3),i=[m];function _(p,l,d,n,r,s){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/zht_api_mp_math_mp_math.md.C302rxKc.js b/assets/zht_api_mp_math_mp_math.md.C302rxKc.js new file mode 100644 index 0000000..8dc9f03 --- /dev/null +++ b/assets/zht_api_mp_math_mp_math.md.C302rxKc.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/mp_math/mp_math.md","filePath":"zht/api/mp_math/mp_math.md"}'),c={name:"zht/api/mp_math/mp_math.md"},m=o('

mbcp.mp_math

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

  • AnyAngle:任意角
  • CurveEquation:曲线方程
  • Line3:三维直线
  • Plane3:三维平面
  • Point3:三维点
  • Segment3:三维线段
  • Vector3:三维向量
',3),i=[m];function _(p,l,d,n,r,h){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/zht_api_mp_math_mp_math.md.C302rxKc.lean.js b/assets/zht_api_mp_math_mp_math.md.C302rxKc.lean.js new file mode 100644 index 0000000..28c888b --- /dev/null +++ b/assets/zht_api_mp_math_mp_math.md.C302rxKc.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","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/mp_math/mp_math.md","filePath":"zht/api/mp_math/mp_math.md"}'),c={name:"zht/api/mp_math/mp_math.md"},m=o("",3),i=[m];function _(p,l,d,n,r,h){return a(),t("div",null,i)}const f=e(c,[["render",_]]);export{u as __pageData,f as default}; diff --git a/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js b/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js deleted file mode 100644 index 2a5488b..0000000 --- a/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"zht/api/mp_math/mp_math.md","filePath":"zht/api/mp_math/mp_math.md"}'),n={name:"zht/api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js b/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js deleted file mode 100644 index fe9b8db..0000000 --- a/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js +++ /dev/null @@ -1 +0,0 @@ -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","editLink":false},"headers":[],"relativePath":"zht/api/mp_math/mp_math.md","filePath":"zht/api/mp_math/mp_math.md"}'),n={name:"zht/api/mp_math/mp_math.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{p as __pageData,y as default}; diff --git a/demo/index.html b/demo/index.html index 0a65825..faf7ca1 100644 --- a/demo/index.html +++ b/demo/index.html @@ -18,7 +18,7 @@
Skip to content

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

- + \ No newline at end of file diff --git a/en/api/api.html b/en/api/api.html index 7d0ac6f..e41ced5 100644 --- a/en/api/api.html +++ b/en/api/api.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/en/api/index.html b/en/api/index.html index 7ef494b..28ebfd5 100644 --- a/en/api/index.html +++ b/en/api/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/en/api/mp_math/angle.html b/en/api/mp_math/angle.html index 3c6e62d..0a41abc 100644 --- a/en/api/mp_math/angle.html +++ b/en/api/mp_math/angle.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.angle

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

class Angle

class AnyAngle(Angle)

def __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)

def __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:
@@ -115,8 +115,8 @@
     ...

def 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)

Documentation built with VitePress | API references generated by litedoc

- + 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 96a4d69..13a73a7 100644 --- a/en/api/mp_math/const.html +++ b/en/api/mp_math/const.html @@ -17,8 +17,8 @@ -
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

- +
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 8070f61..99da420 100644 --- a/en/api/mp_math/equation.html +++ b/en/api/mp_math/equation.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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):
+    
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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:
@@ -97,7 +97,7 @@
         """@litedoc-hide"""
         return func(*args, *args2)
     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 index a96a052..0976698 100644 --- a/en/api/mp_math/function.html +++ b/en/api/mp_math/function.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.function

Description: AAA

def 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:
+    
Skip to content

mbcp.mp_math.function

Description: AAA

def 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]
@@ -34,7 +34,7 @@
     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 982b225..fad1c63 100644 --- a/en/api/mp_math/index.html +++ b/en/api/mp_math/index.html @@ -17,8 +17,8 @@ -
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

- +
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 8489c32..3bddd37 100644 --- a/en/api/mp_math/line.html +++ b/en/api/mp_math/line.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.line

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

class Line3

def __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

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

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

Arguments:

  • point: 直线上的一点
  • direction: 直线的方向向量
Source code
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -195,7 +195,7 @@
 
         """
     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.html b/en/api/mp_math/mp_math.html index 372c46d..378ee82 100644 --- a/en/api/mp_math/mp_math.html +++ b/en/api/mp_math/mp_math.html @@ -3,7 +3,7 @@ - mbcp.mp_math.mp_math_typing | MBCP docs + mbcp.mp_math | MBCP docs @@ -12,13 +12,13 @@ - + -
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

- +
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/mp_math_typing.html b/en/api/mp_math/mp_math_typing.html index ab6cadf..ed8f887 100644 --- a/en/api/mp_math/mp_math_typing.html +++ b/en/api/mp_math/mp_math_typing.html @@ -17,8 +17,8 @@ -
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

- +
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 b0cd680..f49a01b 100644 --- a/en/api/mp_math/plane.html +++ b/en/api/mp_math/plane.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.plane

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

class Plane3

def __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

def __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:
@@ -213,7 +213,7 @@
         raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

def __eq__(self, other) -> bool

Source code
python
def __eq__(self, other) -> bool:
     return self.approx(other)

def __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 e0f7b44..2463a0c 100644 --- a/en/api/mp_math/point.html +++ b/en/api/mp_math/point.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.point

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

class Point3

def __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

def __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:
@@ -68,7 +68,7 @@
         """
     from .vector import Vector3
     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 6ac80a3..996b156 100644 --- a/en/api/mp_math/segment.html +++ b/en/api/mp_math/segment.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.segment

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

class Segment3

def __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

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

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

Source code
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -31,7 +31,7 @@
     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)

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 d002e53..c386e6c 100644 --- a/en/api/mp_math/utils.html +++ b/en/api/mp_math/utils.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.utils

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

def 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:
+    
Skip to content

mbcp.mp_math.utils

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

def 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:
@@ -81,7 +81,7 @@
         return f'-{abs(x)}'
     else:
         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 96df04b..b2c3493 100644 --- a/en/api/mp_math/vector.html +++ b/en/api/mp_math/vector.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.vector

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

class Vector3

def __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

def __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:
@@ -204,7 +204,7 @@
     return self.x * other.x + self.y * other.y + self.z * other.z

def self / other: RealNumber => Vector3

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

def - 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 79b2346..30a6a7e 100644 --- a/en/api/particle/index.html +++ b/en/api/particle/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/en/api/particle/particle.html b/en/api/particle/particle.html index 0730236..131281c 100644 --- a/en/api/particle/particle.html +++ b/en/api/particle/particle.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/en/api/presets/index.html b/en/api/presets/index.html index af2dac2..f9ac334 100644 --- a/en/api/presets/index.html +++ b/en/api/presets/index.html @@ -17,8 +17,8 @@ -
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

- +
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 c3d265e..e5952bb 100644 --- a/en/api/presets/model/index.html +++ b/en/api/presets/model/index.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

Description: 几何模型点集

class GeometricModels

@staticmethod

def 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

def sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

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

Source code
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

Documentation built with VitePress | API references generated by litedoc

- + \ No newline at end of file diff --git a/en/api/presets/model/model.html b/en/api/presets/model/model.html index f9e9880..1d8e979 100644 --- a/en/api/presets/model/model.html +++ b/en/api/presets/model/model.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

Description: 几何模型点集

class GeometricModels

@staticmethod

def 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

def sphere(radius: float, density: float)

Description: 生成球体上的点集。

Arguments:

  • radius:
  • density:

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

Source code
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

Documentation built with VitePress | API references generated by litedoc

- + \ No newline at end of file diff --git a/en/api/presets/presets.html b/en/api/presets/presets.html index 307f48c..da2e64b 100644 --- a/en/api/presets/presets.html +++ b/en/api/presets/presets.html @@ -17,8 +17,8 @@ -
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

- +
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/guide/index.html b/en/guide/index.html index d02e459..ff3238b 100644 --- a/en/guide/index.html +++ b/en/guide/index.html @@ -18,7 +18,7 @@
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 index 01f5546..2b0daf2 100644 --- a/en/index.html +++ b/en/index.html @@ -18,7 +18,7 @@
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/en/refer/index.html b/en/refer/index.html index f05654e..088cd12 100644 --- a/en/refer/index.html +++ b/en/refer/index.html @@ -18,7 +18,7 @@
Skip to content

Reference

help us to improve the documentation

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 d0ebe39..a4ea245 100644 --- a/guide/index.html +++ b/guide/index.html @@ -18,7 +18,7 @@
Skip to content

开始不了一点

12x111

AAA

BBB

C

ddd

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

- + \ No newline at end of file diff --git a/hashmap.json b/hashmap.json index 2f15ec8..b318702 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"api_api.md":"D_B0Hlcp","api_index.md":"C_wESrrY","api_mp_math_angle.md":"vKQLLqTS","api_mp_math_const.md":"BAf8mK4W","api_mp_math_equation.md":"DpRfW_6Z","api_mp_math_function.md":"Cj4FyaYl","api_mp_math_index.md":"BNf7bQqL","api_mp_math_line.md":"DPWL9O-M","api_mp_math_mp_math.md":"BVQYtS99","api_mp_math_mp_math_typing.md":"DlnJmkos","api_mp_math_plane.md":"DTAJAb0P","api_mp_math_point.md":"vtgIded6","api_mp_math_segment.md":"D-8aRB8W","api_mp_math_utils.md":"DaaoR634","api_mp_math_vector.md":"BTnPeAKR","api_particle_index.md":"Cm3Vk-es","api_particle_particle.md":"yD6tcNSr","api_presets_index.md":"CD62I2gv","api_presets_model_index.md":"gO0Notp6","api_presets_model_model.md":"s8f68j_n","api_presets_presets.md":"4R0VRbQo","demo_index.md":"D-H9zRUE","en_api_api.md":"BSgrCX1d","en_api_index.md":"Dj_5nFTt","en_api_mp_math_angle.md":"Bu07wjnV","en_api_mp_math_const.md":"gGpXUShq","en_api_mp_math_equation.md":"DqlD6s-6","en_api_mp_math_function.md":"Bgn-YygZ","en_api_mp_math_index.md":"BEjLBMpH","en_api_mp_math_line.md":"BGq09mco","en_api_mp_math_mp_math.md":"h0PJ9KWU","en_api_mp_math_mp_math_typing.md":"Dnl2aJQ4","en_api_mp_math_plane.md":"C3KPGKE4","en_api_mp_math_point.md":"D7ZdR7VM","en_api_mp_math_segment.md":"DMW-YUfw","en_api_mp_math_utils.md":"B3i5gz_2","en_api_mp_math_vector.md":"CgtIoM4A","en_api_particle_index.md":"BfyNQiRg","en_api_particle_particle.md":"BNkfEyJn","en_api_presets_index.md":"BWb2fpTg","en_api_presets_model_index.md":"pbEu-669","en_api_presets_model_model.md":"CL5uKZbj","en_api_presets_presets.md":"CCUzsYog","en_guide_index.md":"DrDHTYCZ","en_index.md":"MCm69eyE","en_refer_index.md":"alw4L-bp","guide_index.md":"Cfmzk2IH","index.md":"BjJ9-kbE","ja_api_api.md":"CPz58qIw","ja_api_index.md":"CnUeuifx","ja_api_mp_math_angle.md":"DTK1PNuJ","ja_api_mp_math_const.md":"DGXAgDfn","ja_api_mp_math_equation.md":"Bt8bfjRZ","ja_api_mp_math_function.md":"Bx9H66-W","ja_api_mp_math_index.md":"CTZZ-p9Z","ja_api_mp_math_line.md":"DYJV4KNE","ja_api_mp_math_mp_math.md":"C7tFDhfI","ja_api_mp_math_mp_math_typing.md":"BNymgrCT","ja_api_mp_math_plane.md":"D-yHaxP-","ja_api_mp_math_point.md":"DjHRkHI5","ja_api_mp_math_segment.md":"37V8kAc1","ja_api_mp_math_utils.md":"BbdhM1tp","ja_api_mp_math_vector.md":"BBVnCwJa","ja_api_particle_index.md":"Jr41Y3TS","ja_api_particle_particle.md":"exTt46pq","ja_api_presets_index.md":"CQqdQbIZ","ja_api_presets_model_index.md":"C-Ypf-qh","ja_api_presets_model_model.md":"Dwbc1qIc","ja_api_presets_presets.md":"DwzXdDqR","ja_guide_index.md":"BxGnZYwR","ja_index.md":"CtozMsIU","ja_refer_index.md":"CODW6iMX","refer_function_curry.md":"DwKZawp5","refer_function_function.md":"D3IgfZX2","refer_index.md":"CczYTl3j","zht_api_api.md":"DyUSHA0S","zht_api_index.md":"CgZH6aHQ","zht_api_mp_math_angle.md":"lzcXwnW6","zht_api_mp_math_const.md":"xwQvuYck","zht_api_mp_math_equation.md":"Bn6MiQ1c","zht_api_mp_math_function.md":"C6pPUbwO","zht_api_mp_math_index.md":"mmeMMriu","zht_api_mp_math_line.md":"DX62bgjZ","zht_api_mp_math_mp_math.md":"Cx_EDcbj","zht_api_mp_math_mp_math_typing.md":"CNiSnuMw","zht_api_mp_math_plane.md":"DJ_9NQFz","zht_api_mp_math_point.md":"D1nAiRP0","zht_api_mp_math_segment.md":"CMRey-MG","zht_api_mp_math_utils.md":"BDpW2Fd4","zht_api_mp_math_vector.md":"DGVOQo3Y","zht_api_particle_index.md":"8GaGB1ul","zht_api_particle_particle.md":"huuRTEb9","zht_api_presets_index.md":"DvOViSox","zht_api_presets_model_index.md":"BJWX_k6K","zht_api_presets_model_model.md":"CNI4ubOh","zht_api_presets_presets.md":"CsDHjRbK","zht_guide_index.md":"CsuFVFxu","zht_index.md":"V9U3SwDR","zht_refer_index.md":"Bz6voxEQ"} +{"api_api.md":"D_B0Hlcp","api_index.md":"C_wESrrY","api_mp_math_angle.md":"vKQLLqTS","api_mp_math_const.md":"BAf8mK4W","api_mp_math_equation.md":"DpRfW_6Z","api_mp_math_function.md":"Cj4FyaYl","api_mp_math_index.md":"BNf7bQqL","api_mp_math_line.md":"DPWL9O-M","api_mp_math_mp_math.md":"GlFMkWiQ","api_mp_math_mp_math_typing.md":"DlnJmkos","api_mp_math_plane.md":"DTAJAb0P","api_mp_math_point.md":"vtgIded6","api_mp_math_segment.md":"D-8aRB8W","api_mp_math_utils.md":"DaaoR634","api_mp_math_vector.md":"BTnPeAKR","api_particle_index.md":"Cm3Vk-es","api_particle_particle.md":"yD6tcNSr","api_presets_index.md":"CD62I2gv","api_presets_model_index.md":"gO0Notp6","api_presets_model_model.md":"s8f68j_n","api_presets_presets.md":"4R0VRbQo","demo_index.md":"D-H9zRUE","en_api_api.md":"BSgrCX1d","en_api_index.md":"Dj_5nFTt","en_api_mp_math_angle.md":"Bu07wjnV","en_api_mp_math_const.md":"gGpXUShq","en_api_mp_math_equation.md":"DqlD6s-6","en_api_mp_math_function.md":"Bgn-YygZ","en_api_mp_math_index.md":"BEjLBMpH","en_api_mp_math_line.md":"BGq09mco","en_api_mp_math_mp_math.md":"D6ihYPav","en_api_mp_math_mp_math_typing.md":"Dnl2aJQ4","en_api_mp_math_plane.md":"C3KPGKE4","en_api_mp_math_point.md":"D7ZdR7VM","en_api_mp_math_segment.md":"DMW-YUfw","en_api_mp_math_utils.md":"B3i5gz_2","en_api_mp_math_vector.md":"CgtIoM4A","en_api_particle_index.md":"BfyNQiRg","en_api_particle_particle.md":"BNkfEyJn","en_api_presets_index.md":"BWb2fpTg","en_api_presets_model_index.md":"pbEu-669","en_api_presets_model_model.md":"CL5uKZbj","en_api_presets_presets.md":"CCUzsYog","en_guide_index.md":"DrDHTYCZ","en_index.md":"MCm69eyE","en_refer_index.md":"alw4L-bp","guide_index.md":"Cfmzk2IH","index.md":"BjJ9-kbE","ja_api_api.md":"CPz58qIw","ja_api_index.md":"CnUeuifx","ja_api_mp_math_angle.md":"DTK1PNuJ","ja_api_mp_math_const.md":"DGXAgDfn","ja_api_mp_math_equation.md":"Bt8bfjRZ","ja_api_mp_math_function.md":"Bx9H66-W","ja_api_mp_math_index.md":"CTZZ-p9Z","ja_api_mp_math_line.md":"DYJV4KNE","ja_api_mp_math_mp_math.md":"D-prC0UO","ja_api_mp_math_mp_math_typing.md":"BNymgrCT","ja_api_mp_math_plane.md":"D-yHaxP-","ja_api_mp_math_point.md":"DjHRkHI5","ja_api_mp_math_segment.md":"37V8kAc1","ja_api_mp_math_utils.md":"BbdhM1tp","ja_api_mp_math_vector.md":"BBVnCwJa","ja_api_particle_index.md":"Jr41Y3TS","ja_api_particle_particle.md":"exTt46pq","ja_api_presets_index.md":"CQqdQbIZ","ja_api_presets_model_index.md":"C-Ypf-qh","ja_api_presets_model_model.md":"Dwbc1qIc","ja_api_presets_presets.md":"DwzXdDqR","ja_guide_index.md":"BxGnZYwR","ja_index.md":"CtozMsIU","ja_refer_index.md":"CODW6iMX","refer_function_curry.md":"DwKZawp5","refer_function_function.md":"D3IgfZX2","refer_index.md":"CczYTl3j","zht_api_api.md":"DyUSHA0S","zht_api_index.md":"CgZH6aHQ","zht_api_mp_math_angle.md":"lzcXwnW6","zht_api_mp_math_const.md":"xwQvuYck","zht_api_mp_math_equation.md":"Bn6MiQ1c","zht_api_mp_math_function.md":"C6pPUbwO","zht_api_mp_math_index.md":"mmeMMriu","zht_api_mp_math_line.md":"DX62bgjZ","zht_api_mp_math_mp_math.md":"C302rxKc","zht_api_mp_math_mp_math_typing.md":"CNiSnuMw","zht_api_mp_math_plane.md":"DJ_9NQFz","zht_api_mp_math_point.md":"D1nAiRP0","zht_api_mp_math_segment.md":"CMRey-MG","zht_api_mp_math_utils.md":"BDpW2Fd4","zht_api_mp_math_vector.md":"DGVOQo3Y","zht_api_particle_index.md":"8GaGB1ul","zht_api_particle_particle.md":"huuRTEb9","zht_api_presets_index.md":"DvOViSox","zht_api_presets_model_index.md":"BJWX_k6K","zht_api_presets_model_model.md":"CNI4ubOh","zht_api_presets_presets.md":"CsDHjRbK","zht_guide_index.md":"CsuFVFxu","zht_index.md":"V9U3SwDR","zht_refer_index.md":"Bz6voxEQ"} diff --git a/index.html b/index.html index deb5598..758297b 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@
Skip to content

MBCP docs

More basic change particle

用于几何运算和粒子制作的库

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

- + \ No newline at end of file diff --git a/ja/api/api.html b/ja/api/api.html index bcf44be..a5cd3e3 100644 --- a/ja/api/api.html +++ b/ja/api/api.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/ja/api/index.html b/ja/api/index.html index aa998d1..6479fcc 100644 --- a/ja/api/index.html +++ b/ja/api/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/ja/api/mp_math/angle.html b/ja/api/mp_math/angle.html index f431e0e..8343bc3 100644 --- a/ja/api/mp_math/angle.html +++ b/ja/api/mp_math/angle.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.angle

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

class Angle

class AnyAngle(Angle)

def __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)

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

説明: 任意角度。

引数:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
ソースコード
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -115,8 +115,8 @@
     ...

def self / other

ソースコード
python
def __truediv__(self, other):
     if isinstance(other, AnyAngle):
         return self.radian / other.radian
-    return AnyAngle(self.radian / other, is_radian=True)

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + 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 b9f9823..795e760 100644 --- a/ja/api/mp_math/const.html +++ b/ja/api/mp_math/const.html @@ -17,8 +17,8 @@ -
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リファレンス

- +
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 bdddcea..57adf20 100644 --- a/ja/api/mp_math/equation.html +++ b/ja/api/mp_math/equation.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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):
+    
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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:
@@ -97,7 +97,7 @@
         """@litedoc-hide"""
         return func(*args, *args2)
     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 index 8630a33..4223e16 100644 --- a/ja/api/mp_math/function.html +++ b/ja/api/mp_math/function.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.function

説明: AAA

def 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:
+    
Skip to content

mbcp.mp_math.function

説明: AAA

def 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]
@@ -34,7 +34,7 @@
     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 3468441..f809b10 100644 --- a/ja/api/mp_math/index.html +++ b/ja/api/mp_math/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp.mp_math

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

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

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- +
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 b81d0ac..5695a86 100644 --- a/ja/api/mp_math/line.html +++ b/ja/api/mp_math/line.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.line

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

class Line3

def __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

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

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

引数:

  • point: 直线上的一点
  • direction: 直线的方向向量
ソースコード
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -195,7 +195,7 @@
 
         """
     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.html b/ja/api/mp_math/mp_math.html index f78f3a3..93d2a8b 100644 --- a/ja/api/mp_math/mp_math.html +++ b/ja/api/mp_math/mp_math.html @@ -3,7 +3,7 @@ - mbcp.mp_math.mp_math_typing | MBCP docs + mbcp.mp_math | MBCP docs @@ -12,13 +12,13 @@ - + -
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リファレンス

- +
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/mp_math_typing.html b/ja/api/mp_math/mp_math_typing.html index e97ed73..d28ce7b 100644 --- a/ja/api/mp_math/mp_math_typing.html +++ b/ja/api/mp_math/mp_math_typing.html @@ -17,8 +17,8 @@ -
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リファレンス

- +
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 b9555b3..037d3ee 100644 --- a/ja/api/mp_math/plane.html +++ b/ja/api/mp_math/plane.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.plane

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

class Plane3

def __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

def __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:
@@ -213,7 +213,7 @@
         raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

def __eq__(self, other) -> bool

ソースコード
python
def __eq__(self, other) -> bool:
     return self.approx(other)

def __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 7e9af05..b573f37 100644 --- a/ja/api/mp_math/point.html +++ b/ja/api/mp_math/point.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.point

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

class Point3

def __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

def __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:
@@ -68,7 +68,7 @@
         """
     from .vector import Vector3
     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 2b9e759..8fbdceb 100644 --- a/ja/api/mp_math/segment.html +++ b/ja/api/mp_math/segment.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.segment

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

class Segment3

def __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

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

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

ソースコード
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -31,7 +31,7 @@
     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)

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 80c2dd8..344536e 100644 --- a/ja/api/mp_math/utils.html +++ b/ja/api/mp_math/utils.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.utils

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

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

説明: 区间限定函数

引数:

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

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
+    
Skip to content

mbcp.mp_math.utils

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

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

説明: 区间限定函数

引数:

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

戻り値: 限制后的值

ソースコード
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -81,7 +81,7 @@
         return f'-{abs(x)}'
     else:
         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 4961f54..e9ab402 100644 --- a/ja/api/mp_math/vector.html +++ b/ja/api/mp_math/vector.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.vector

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

class Vector3

def __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

def __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:
@@ -204,7 +204,7 @@
     return self.x * other.x + self.y * other.y + self.z * other.z

def self / other: RealNumber => Vector3

ソースコード
python
def __truediv__(self, other: RealNumber) -> 'Vector3':
     return Vector3(self.x / other, self.y / other, self.z / other)

def - 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 5e73e29..e95c6e0 100644 --- a/ja/api/particle/index.html +++ b/ja/api/particle/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/ja/api/particle/particle.html b/ja/api/particle/particle.html index 0917f83..7ff07f5 100644 --- a/ja/api/particle/particle.html +++ b/ja/api/particle/particle.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/ja/api/presets/index.html b/ja/api/presets/index.html index 973e14e..aa80723 100644 --- a/ja/api/presets/index.html +++ b/ja/api/presets/index.html @@ -17,8 +17,8 @@ -
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リファレンス

- +
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 f8fc8e4..d788177 100644 --- a/ja/api/presets/model/index.html +++ b/ja/api/presets/model/index.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + \ No newline at end of file diff --git a/ja/api/presets/model/model.html b/ja/api/presets/model/model.html index e46aa8d..b9d8c77 100644 --- a/ja/api/presets/model/model.html +++ b/ja/api/presets/model/model.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

引数:

  • radius:
  • density:

戻り値: List[Point3]: 球体上的点集。

ソースコード
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + \ No newline at end of file diff --git a/ja/api/presets/presets.html b/ja/api/presets/presets.html index 8122678..b5276f8 100644 --- a/ja/api/presets/presets.html +++ b/ja/api/presets/presets.html @@ -17,8 +17,8 @@ -
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リファレンス

- +
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/guide/index.html b/ja/guide/index.html index b3dab3e..2aa8e45 100644 --- a/ja/guide/index.html +++ b/ja/guide/index.html @@ -18,7 +18,7 @@
Skip to content

开始不了一点

12x111

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + \ No newline at end of file diff --git a/ja/index.html b/ja/index.html index 024427d..46a9ae8 100644 --- a/ja/index.html +++ b/ja/index.html @@ -18,7 +18,7 @@
Skip to content

MBCP docs

More basic change particle

ジオメトリ演算とパーティクル作成のためのライブラリ

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + \ No newline at end of file diff --git a/ja/refer/index.html b/ja/refer/index.html index 1e1cbc1..c5d0f1d 100644 --- a/ja/refer/index.html +++ b/ja/refer/index.html @@ -18,7 +18,7 @@
Skip to content

Reference

Help us to improve the documentation

VitePress で構築されたドキュメント | litedoc によって生成されたAPIリファレンス

- + \ No newline at end of file diff --git a/refer/function/curry.html b/refer/function/curry.html index 4d1f3eb..0f89552 100644 --- a/refer/function/curry.html +++ b/refer/function/curry.html @@ -18,7 +18,7 @@
Skip to content

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

- + \ No newline at end of file diff --git a/refer/function/function.html b/refer/function/function.html index 75743d6..c56f69a 100644 --- a/refer/function/function.html +++ b/refer/function/function.html @@ -18,7 +18,7 @@
Skip to content

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

- + \ No newline at end of file diff --git a/refer/index.html b/refer/index.html index afcaa69..14754ae 100644 --- a/refer/index.html +++ b/refer/index.html @@ -18,7 +18,7 @@
Skip to content

Reference

Help us to improve the documentation

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

- + \ No newline at end of file diff --git a/zht/api/api.html b/zht/api/api.html index fa2c957..e02db47 100644 --- a/zht/api/api.html +++ b/zht/api/api.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/zht/api/index.html b/zht/api/index.html index 74b4ab0..eaef268 100644 --- a/zht/api/index.html +++ b/zht/api/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/zht/api/mp_math/angle.html b/zht/api/mp_math/angle.html index 90bd887..4e1acb1 100644 --- a/zht/api/mp_math/angle.html +++ b/zht/api/mp_math/angle.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.angle

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

class Angle

class AnyAngle(Angle)

def __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)

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

説明: 任意角度。

變數説明:

  • value: 角度或弧度值
  • is_radian: 是否为弧度,默认为否
源碼
python
def __init__(self, value: float, is_radian: bool=False):
     """
         任意角度。
         Args:
@@ -115,8 +115,8 @@
     ...

def self / other

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

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + 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 5ee159d..5c001d3 100644 --- a/zht/api/mp_math/const.html +++ b/zht/api/mp_math/const.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 64ff497..834a19f 100644 --- a/zht/api/mp_math/equation.html +++ b/zht/api/mp_math/equation.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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):
+    
Skip to content

mbcp.mp_math.equation

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

class CurveEquation

def __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:
@@ -97,7 +97,7 @@
         """@litedoc-hide"""
         return func(*args, *args2)
     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 index 8c46f72..8544650 100644 --- a/zht/api/mp_math/function.html +++ b/zht/api/mp_math/function.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.function

説明: AAA

def 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:
+    
Skip to content

mbcp.mp_math.function

説明: AAA

def 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]
@@ -34,7 +34,7 @@
     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 c2e36eb..03a1b5d 100644 --- a/zht/api/mp_math/index.html +++ b/zht/api/mp_math/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp.mp_math

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

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

文檔由 VitePress 構建 | API引用由 litedoc 生成

- +
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 256d4be..96b6995 100644 --- a/zht/api/mp_math/line.html +++ b/zht/api/mp_math/line.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.line

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

class Line3

def __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

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

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

變數説明:

  • point: 直线上的一点
  • direction: 直线的方向向量
源碼
python
def __init__(self, point: 'Point3', direction: 'Vector3'):
     """
         三维空间中的直线。由一个点和一个方向向量确定。
         Args:
@@ -195,7 +195,7 @@
 
         """
     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.html b/zht/api/mp_math/mp_math.html index 6f927b8..ef207b3 100644 --- a/zht/api/mp_math/mp_math.html +++ b/zht/api/mp_math/mp_math.html @@ -3,7 +3,7 @@ - mbcp.mp_math.mp_math_typing | MBCP docs + mbcp.mp_math | MBCP docs @@ -12,13 +12,13 @@ - + -
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 生成

- +
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/mp_math_typing.html b/zht/api/mp_math/mp_math_typing.html index 3520cd2..6742a67 100644 --- a/zht/api/mp_math/mp_math_typing.html +++ b/zht/api/mp_math/mp_math_typing.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 cc5dbc1..7ae4bcf 100644 --- a/zht/api/mp_math/plane.html +++ b/zht/api/mp_math/plane.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.plane

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

class Plane3

def __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

def __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:
@@ -213,7 +213,7 @@
         raise TypeError(f"unsupported operand type(s) for &: 'Plane3' and '{type(other)}'")

def __eq__(self, other) -> bool

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

def __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 825e18d..5e20d0a 100644 --- a/zht/api/mp_math/point.html +++ b/zht/api/mp_math/point.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.point

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

class Point3

def __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

def __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:
@@ -68,7 +68,7 @@
         """
     from .vector import Vector3
     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 96a124b..a9fc0c0 100644 --- a/zht/api/mp_math/segment.html +++ b/zht/api/mp_math/segment.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.segment

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

class Segment3

def __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

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

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

源碼
python
def __init__(self, p1: 'Point3', p2: 'Point3'):
     """
         三维空间中的线段。
         :param p1:
@@ -31,7 +31,7 @@
     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)

文檔由 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 abca1a6..f240cd7 100644 --- a/zht/api/mp_math/utils.html +++ b/zht/api/mp_math/utils.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.utils

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

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

説明: 区间限定函数

變數説明:

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

返回: 限制后的值

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

mbcp.mp_math.utils

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

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

説明: 区间限定函数

變數説明:

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

返回: 限制后的值

源碼
python
def clamp(x: float, min_: float, max_: float) -> float:
     """
     区间限定函数
     Args:
@@ -81,7 +81,7 @@
         return f'-{abs(x)}'
     else:
         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 01772de..d3a1f7f 100644 --- a/zht/api/mp_math/vector.html +++ b/zht/api/mp_math/vector.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.mp_math.vector

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

class Vector3

def __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

def __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:
@@ -204,7 +204,7 @@
     return self.x * other.x + self.y * other.y + self.z * other.z

def self / other: RealNumber => Vector3

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

def - 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 4aca02b..86c6b42 100644 --- a/zht/api/particle/index.html +++ b/zht/api/particle/index.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/zht/api/particle/particle.html b/zht/api/particle/particle.html index 57c0531..cd190f2 100644 --- a/zht/api/particle/particle.html +++ b/zht/api/particle/particle.html @@ -17,8 +17,8 @@ - - + + \ No newline at end of file diff --git a/zht/api/presets/index.html b/zht/api/presets/index.html index f888e55..7a13a9c 100644 --- a/zht/api/presets/index.html +++ b/zht/api/presets/index.html @@ -17,8 +17,8 @@ -
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 生成

- +
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 cd87a06..a4cb96d 100644 --- a/zht/api/presets/model/index.html +++ b/zht/api/presets/model/index.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

變數説明:

  • radius:
  • density:

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

源碼
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

變數説明:

  • radius:
  • density:

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

源碼
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + \ No newline at end of file diff --git a/zht/api/presets/model/model.html b/zht/api/presets/model/model.html index 55d665a..47bc4fd 100644 --- a/zht/api/presets/model/model.html +++ b/zht/api/presets/model/model.html @@ -17,7 +17,7 @@ -
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

變數説明:

  • radius:
  • density:

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

源碼
python
@staticmethod
+    
Skip to content

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

變數説明:

  • radius:
  • density:

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

源碼
python
@staticmethod
 def sphere(radius: float, density: float):
     """
         生成球体上的点集。
@@ -35,7 +35,7 @@
     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)]

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + \ No newline at end of file diff --git a/zht/api/presets/presets.html b/zht/api/presets/presets.html index 03c45f9..4237c44 100644 --- a/zht/api/presets/presets.html +++ b/zht/api/presets/presets.html @@ -17,8 +17,8 @@ -
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 生成

- +
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/guide/index.html b/zht/guide/index.html index d6f756b..9824218 100644 --- a/zht/guide/index.html +++ b/zht/guide/index.html @@ -18,7 +18,7 @@
Skip to content

开始不了一点

12x111

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + \ No newline at end of file diff --git a/zht/index.html b/zht/index.html index 32c66f4..0470473 100644 --- a/zht/index.html +++ b/zht/index.html @@ -18,7 +18,7 @@
Skip to content

MBCP docs

More basic change particle

用於幾何運算和粒子製作的軟體庫

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + \ No newline at end of file diff --git a/zht/refer/index.html b/zht/refer/index.html index aeb6080..91d469d 100644 --- a/zht/refer/index.html +++ b/zht/refer/index.html @@ -18,7 +18,7 @@
Skip to content

Reference

Help us to improve the documentation

文檔由 VitePress 構建 | API引用由 litedoc 生成

- + \ No newline at end of file