From c3d15d5dfd9e9ae99c04beb1ecd4b10f6f3bd68f Mon Sep 17 00:00:00 2001 From: snowykami Date: Fri, 30 Aug 2024 09:56:46 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20docs=20from=20@=20snowykami/mb?= =?UTF-8?q?cp@d4fdd90ce2f7ecdbd578b4d3bf43da99a2b3cae6=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 2 +- api/api.html | 24 +++++++++++ api/index.html | 4 +- api/mp_math/angle.html | 6 +-- api/mp_math/const.html | 4 +- api/mp_math/equation.html | 4 +- api/mp_math/function.html | 4 +- api/mp_math/index.html | 4 +- api/mp_math/line.html | 4 +- api/mp_math/mp_math.html | 24 +++++++++++ api/mp_math/mp_math_typing.html | 4 +- api/mp_math/plane.html | 4 +- api/mp_math/point.html | 4 +- api/mp_math/segment.html | 4 +- api/mp_math/utils.html | 4 +- api/mp_math/vector.html | 6 +-- api/particle/index.html | 4 +- api/particle/particle.html | 24 +++++++++++ api/presets/index.html | 4 +- api/presets/model/index.html | 6 +-- api/presets/model/model.html | 41 +++++++++++++++++++ api/presets/presets.html | 24 +++++++++++ assets/api_api.md.D_B0Hlcp.js | 1 + assets/api_api.md.D_B0Hlcp.lean.js | 1 + assets/api_mp_math_mp_math.md.BVQYtS99.js | 1 + .../api_mp_math_mp_math.md.BVQYtS99.lean.js | 1 + assets/api_particle_particle.md.yD6tcNSr.js | 1 + .../api_particle_particle.md.yD6tcNSr.lean.js | 1 + assets/api_presets_model_model.md.s8f68j_n.js | 18 ++++++++ ...pi_presets_model_model.md.s8f68j_n.lean.js | 1 + assets/api_presets_presets.md.4R0VRbQo.js | 1 + .../api_presets_presets.md.4R0VRbQo.lean.js | 1 + assets/en_api_api.md.BSgrCX1d.js | 1 + assets/en_api_api.md.BSgrCX1d.lean.js | 1 + assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js | 1 + ...en_api_mp_math_mp_math.md.h0PJ9KWU.lean.js | 1 + .../en_api_particle_particle.md.BNkfEyJn.js | 1 + ..._api_particle_particle.md.BNkfEyJn.lean.js | 1 + .../en_api_presets_model_model.md.CL5uKZbj.js | 18 ++++++++ ...pi_presets_model_model.md.CL5uKZbj.lean.js | 1 + assets/en_api_presets_presets.md.CCUzsYog.js | 1 + ...en_api_presets_presets.md.CCUzsYog.lean.js | 1 + assets/en_refer_index.md.alw4L-bp.js | 1 + assets/en_refer_index.md.alw4L-bp.lean.js | 1 + assets/ja_api_api.md.CPz58qIw.js | 1 + assets/ja_api_api.md.CPz58qIw.lean.js | 1 + assets/ja_api_mp_math_mp_math.md.C7tFDhfI.js | 1 + ...ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js | 1 + .../ja_api_particle_particle.md.exTt46pq.js | 1 + ..._api_particle_particle.md.exTt46pq.lean.js | 1 + .../ja_api_presets_model_model.md.Dwbc1qIc.js | 18 ++++++++ ...pi_presets_model_model.md.Dwbc1qIc.lean.js | 1 + assets/ja_api_presets_presets.md.DwzXdDqR.js | 1 + ...ja_api_presets_presets.md.DwzXdDqR.lean.js | 1 + assets/ja_refer_index.md.CODW6iMX.js | 1 + assets/ja_refer_index.md.CODW6iMX.lean.js | 1 + assets/refer_function_curry.md.DwKZawp5.js | 1 + .../refer_function_curry.md.DwKZawp5.lean.js | 1 + assets/refer_function_function.md.D3IgfZX2.js | 1 + ...efer_function_function.md.D3IgfZX2.lean.js | 1 + assets/refer_index.md.CczYTl3j.js | 1 + assets/refer_index.md.CczYTl3j.lean.js | 1 + assets/zht_api_api.md.DyUSHA0S.js | 1 + assets/zht_api_api.md.DyUSHA0S.lean.js | 1 + assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js | 1 + ...ht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js | 1 + .../zht_api_particle_particle.md.huuRTEb9.js | 1 + ..._api_particle_particle.md.huuRTEb9.lean.js | 1 + ...zht_api_presets_model_model.md.CNI4ubOh.js | 18 ++++++++ ...pi_presets_model_model.md.CNI4ubOh.lean.js | 1 + assets/zht_api_presets_presets.md.CsDHjRbK.js | 1 + ...ht_api_presets_presets.md.CsDHjRbK.lean.js | 1 + assets/zht_refer_index.md.Bz6voxEQ.js | 1 + assets/zht_refer_index.md.Bz6voxEQ.lean.js | 1 + demo/index.html | 4 +- en/api/api.html | 24 +++++++++++ en/api/index.html | 4 +- en/api/mp_math/angle.html | 6 +-- en/api/mp_math/const.html | 4 +- en/api/mp_math/equation.html | 4 +- en/api/mp_math/function.html | 4 +- en/api/mp_math/index.html | 4 +- en/api/mp_math/line.html | 4 +- en/api/mp_math/mp_math.html | 24 +++++++++++ en/api/mp_math/mp_math_typing.html | 4 +- en/api/mp_math/plane.html | 4 +- en/api/mp_math/point.html | 4 +- en/api/mp_math/segment.html | 4 +- en/api/mp_math/utils.html | 4 +- en/api/mp_math/vector.html | 6 +-- en/api/particle/index.html | 4 +- en/api/particle/particle.html | 24 +++++++++++ en/api/presets/index.html | 4 +- en/api/presets/model/index.html | 6 +-- en/api/presets/model/model.html | 41 +++++++++++++++++++ en/api/presets/presets.html | 24 +++++++++++ en/guide/index.html | 4 +- en/index.html | 4 +- en/refer/index.html | 24 +++++++++++ guide/index.html | 4 +- hashmap.json | 2 +- index.html | 4 +- ja/api/api.html | 24 +++++++++++ ja/api/index.html | 4 +- ja/api/mp_math/angle.html | 6 +-- ja/api/mp_math/const.html | 4 +- ja/api/mp_math/equation.html | 4 +- ja/api/mp_math/function.html | 4 +- ja/api/mp_math/index.html | 4 +- ja/api/mp_math/line.html | 4 +- ja/api/mp_math/mp_math.html | 24 +++++++++++ ja/api/mp_math/mp_math_typing.html | 4 +- ja/api/mp_math/plane.html | 4 +- ja/api/mp_math/point.html | 4 +- ja/api/mp_math/segment.html | 4 +- ja/api/mp_math/utils.html | 4 +- ja/api/mp_math/vector.html | 6 +-- ja/api/particle/index.html | 4 +- ja/api/particle/particle.html | 24 +++++++++++ ja/api/presets/index.html | 4 +- ja/api/presets/model/index.html | 6 +-- ja/api/presets/model/model.html | 41 +++++++++++++++++++ ja/api/presets/presets.html | 24 +++++++++++ ja/guide/index.html | 4 +- ja/index.html | 4 +- ja/refer/index.html | 24 +++++++++++ refer/function/curry.html | 24 +++++++++++ refer/function/function.html | 24 +++++++++++ refer/index.html | 24 +++++++++++ sitemap.xml | 2 +- zht/api/api.html | 24 +++++++++++ zht/api/index.html | 4 +- zht/api/mp_math/angle.html | 6 +-- zht/api/mp_math/const.html | 4 +- zht/api/mp_math/equation.html | 4 +- zht/api/mp_math/function.html | 4 +- zht/api/mp_math/index.html | 4 +- zht/api/mp_math/line.html | 4 +- zht/api/mp_math/mp_math.html | 24 +++++++++++ zht/api/mp_math/mp_math_typing.html | 4 +- zht/api/mp_math/plane.html | 4 +- zht/api/mp_math/point.html | 4 +- zht/api/mp_math/segment.html | 4 +- zht/api/mp_math/utils.html | 4 +- zht/api/mp_math/vector.html | 6 +-- zht/api/particle/index.html | 4 +- zht/api/particle/particle.html | 24 +++++++++++ zht/api/presets/index.html | 4 +- zht/api/presets/model/index.html | 6 +-- zht/api/presets/model/model.html | 41 +++++++++++++++++++ zht/api/presets/presets.html | 24 +++++++++++ zht/guide/index.html | 4 +- zht/index.html | 4 +- zht/refer/index.html | 24 +++++++++++ 154 files changed, 973 insertions(+), 161 deletions(-) create mode 100644 api/api.html create mode 100644 api/mp_math/mp_math.html create mode 100644 api/particle/particle.html create mode 100644 api/presets/model/model.html create mode 100644 api/presets/presets.html create mode 100644 assets/api_api.md.D_B0Hlcp.js create mode 100644 assets/api_api.md.D_B0Hlcp.lean.js create mode 100644 assets/api_mp_math_mp_math.md.BVQYtS99.js create mode 100644 assets/api_mp_math_mp_math.md.BVQYtS99.lean.js create mode 100644 assets/api_particle_particle.md.yD6tcNSr.js create mode 100644 assets/api_particle_particle.md.yD6tcNSr.lean.js create mode 100644 assets/api_presets_model_model.md.s8f68j_n.js create mode 100644 assets/api_presets_model_model.md.s8f68j_n.lean.js create mode 100644 assets/api_presets_presets.md.4R0VRbQo.js create mode 100644 assets/api_presets_presets.md.4R0VRbQo.lean.js create mode 100644 assets/en_api_api.md.BSgrCX1d.js create mode 100644 assets/en_api_api.md.BSgrCX1d.lean.js create mode 100644 assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js create mode 100644 assets/en_api_mp_math_mp_math.md.h0PJ9KWU.lean.js create mode 100644 assets/en_api_particle_particle.md.BNkfEyJn.js create mode 100644 assets/en_api_particle_particle.md.BNkfEyJn.lean.js create mode 100644 assets/en_api_presets_model_model.md.CL5uKZbj.js create mode 100644 assets/en_api_presets_model_model.md.CL5uKZbj.lean.js create mode 100644 assets/en_api_presets_presets.md.CCUzsYog.js create mode 100644 assets/en_api_presets_presets.md.CCUzsYog.lean.js create mode 100644 assets/en_refer_index.md.alw4L-bp.js create mode 100644 assets/en_refer_index.md.alw4L-bp.lean.js create mode 100644 assets/ja_api_api.md.CPz58qIw.js create mode 100644 assets/ja_api_api.md.CPz58qIw.lean.js create mode 100644 assets/ja_api_mp_math_mp_math.md.C7tFDhfI.js create mode 100644 assets/ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js create mode 100644 assets/ja_api_particle_particle.md.exTt46pq.js create mode 100644 assets/ja_api_particle_particle.md.exTt46pq.lean.js create mode 100644 assets/ja_api_presets_model_model.md.Dwbc1qIc.js create mode 100644 assets/ja_api_presets_model_model.md.Dwbc1qIc.lean.js create mode 100644 assets/ja_api_presets_presets.md.DwzXdDqR.js create mode 100644 assets/ja_api_presets_presets.md.DwzXdDqR.lean.js create mode 100644 assets/ja_refer_index.md.CODW6iMX.js create mode 100644 assets/ja_refer_index.md.CODW6iMX.lean.js create mode 100644 assets/refer_function_curry.md.DwKZawp5.js create mode 100644 assets/refer_function_curry.md.DwKZawp5.lean.js create mode 100644 assets/refer_function_function.md.D3IgfZX2.js create mode 100644 assets/refer_function_function.md.D3IgfZX2.lean.js create mode 100644 assets/refer_index.md.CczYTl3j.js create mode 100644 assets/refer_index.md.CczYTl3j.lean.js create mode 100644 assets/zht_api_api.md.DyUSHA0S.js create mode 100644 assets/zht_api_api.md.DyUSHA0S.lean.js create mode 100644 assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js create mode 100644 assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js create mode 100644 assets/zht_api_particle_particle.md.huuRTEb9.js create mode 100644 assets/zht_api_particle_particle.md.huuRTEb9.lean.js create mode 100644 assets/zht_api_presets_model_model.md.CNI4ubOh.js create mode 100644 assets/zht_api_presets_model_model.md.CNI4ubOh.lean.js create mode 100644 assets/zht_api_presets_presets.md.CsDHjRbK.js create mode 100644 assets/zht_api_presets_presets.md.CsDHjRbK.lean.js create mode 100644 assets/zht_refer_index.md.Bz6voxEQ.js create mode 100644 assets/zht_refer_index.md.Bz6voxEQ.lean.js create mode 100644 en/api/api.html create mode 100644 en/api/mp_math/mp_math.html create mode 100644 en/api/particle/particle.html create mode 100644 en/api/presets/model/model.html create mode 100644 en/api/presets/presets.html create mode 100644 en/refer/index.html create mode 100644 ja/api/api.html create mode 100644 ja/api/mp_math/mp_math.html create mode 100644 ja/api/particle/particle.html create mode 100644 ja/api/presets/model/model.html create mode 100644 ja/api/presets/presets.html create mode 100644 ja/refer/index.html create mode 100644 refer/function/curry.html create mode 100644 refer/function/function.html create mode 100644 refer/index.html create mode 100644 zht/api/api.html create mode 100644 zht/api/mp_math/mp_math.html create mode 100644 zht/api/particle/particle.html create mode 100644 zht/api/presets/model/model.html create mode 100644 zht/api/presets/presets.html create mode 100644 zht/refer/index.html diff --git a/404.html b/404.html index 6e6b349..2c9facb 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 new file mode 100644 index 0000000..67b74b3 --- /dev/null +++ b/api/api.html @@ -0,0 +1,24 @@ + + + + + + mbcp | MBCP docs + + + + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/api/index.html b/api/index.html index b8c878f..83db185 100644 --- a/api/index.html +++ b/api/index.html @@ -17,8 +17,8 @@ -
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 ae4b06b..ad058bf 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 493c095..e76fdf5 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 db33f59..a514d11 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 7ba5e11..9d3ae02 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 dee8923..8469020 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 efbed45..59f2e83 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 new file mode 100644 index 0000000..d6e7310 --- /dev/null +++ b/api/mp_math/mp_math.html @@ -0,0 +1,24 @@ + + + + + + mbcp.mp_math.mp_math_typing | MBCP docs + + + + + + + + + + + + + +
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/mp_math_typing.html b/api/mp_math/mp_math_typing.html index 7bf6888..d962bc4 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 db97c97..8284334 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 1755b52..6b258c9 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 10a2794..4817b46 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 ad2f2cd..0441b46 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 5402d2f..6bda67a 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:
@@ -203,8 +203,8 @@
         """
     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 生成

- + 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 44eab28..cef67d2 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 new file mode 100644 index 0000000..04b4753 --- /dev/null +++ b/api/particle/particle.html @@ -0,0 +1,24 @@ + + + + + + mbcp.particle | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/api/presets/index.html b/api/presets/index.html index 3fa76e6..8149b42 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 4a87dfc..cb3114c 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):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

- + 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 new file mode 100644 index 0000000..3a11226 --- /dev/null +++ b/api/presets/model/model.html @@ -0,0 +1,41 @@ + + + + + + mbcp.presets.model | MBCP docs + + + + + + + + + + + + + +
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):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

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

mbcp.presets

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

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

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

+ + + + \ No newline at end of file diff --git a/assets/api_api.md.D_B0Hlcp.js b/assets/api_api.md.D_B0Hlcp.js new file mode 100644 index 0000000..27dd159 --- /dev/null +++ b/assets/api_api.md.D_B0Hlcp.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),o={name:"api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x as default}; diff --git a/assets/api_api.md.D_B0Hlcp.lean.js b/assets/api_api.md.D_B0Hlcp.lean.js new file mode 100644 index 0000000..27dd159 --- /dev/null +++ b/assets/api_api.md.D_B0Hlcp.lean.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/api.md","filePath":"zh/api/api.md"}'),o={name:"api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"说明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x as default}; diff --git a/assets/api_mp_math_mp_math.md.BVQYtS99.js b/assets/api_mp_math_mp_math.md.BVQYtS99.js new file mode 100644 index 0000000..525f3e8 --- /dev/null +++ b/assets/api_mp_math_mp_math.md.BVQYtS99.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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 new file mode 100644 index 0000000..1ad474a --- /dev/null +++ b/assets/api_mp_math_mp_math.md.BVQYtS99.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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_particle_particle.md.yD6tcNSr.js b/assets/api_particle_particle.md.yD6tcNSr.js new file mode 100644 index 0000000..cc79389 --- /dev/null +++ b/assets/api_particle_particle.md.yD6tcNSr.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/particle/particle.md","filePath":"zh/api/particle/particle.md"}'),i={name:"api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/api_particle_particle.md.yD6tcNSr.lean.js b/assets/api_particle_particle.md.yD6tcNSr.lean.js new file mode 100644 index 0000000..cc79389 --- /dev/null +++ b/assets/api_particle_particle.md.yD6tcNSr.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/particle/particle.md","filePath":"zh/api/particle/particle.md"}'),i={name:"api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"说明"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/api_presets_model_model.md.s8f68j_n.js b/assets/api_presets_model_model.md.s8f68j_n.js new file mode 100644 index 0000000..549692f --- /dev/null +++ b/assets/api_presets_model_model.md.s8f68j_n.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),t={name:"api/presets/model/model.md"},h=n(`

mbcp.presets.model

说明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

参数:

  • radius:
  • density:

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

源代码
python
@staticmethod
+def sphere(radius: float, density: float):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/api_presets_model_model.md.s8f68j_n.lean.js b/assets/api_presets_model_model.md.s8f68j_n.lean.js new file mode 100644 index 0000000..d72c0d9 --- /dev/null +++ b/assets/api_presets_model_model.md.s8f68j_n.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/presets/model/model.md","filePath":"zh/api/presets/model/model.md"}'),t={name:"api/presets/model/model.md"},h=n("",10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/api_presets_presets.md.4R0VRbQo.js b/assets/api_presets_presets.md.4R0VRbQo.js new file mode 100644 index 0000000..6d8e84b --- /dev/null +++ b/assets/api_presets_presets.md.4R0VRbQo.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/presets/presets.md","filePath":"zh/api/presets/presets.md"}'),o={name:"api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,_,h,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/api_presets_presets.md.4R0VRbQo.lean.js b/assets/api_presets_presets.md.4R0VRbQo.lean.js new file mode 100644 index 0000000..6d8e84b --- /dev/null +++ b/assets/api_presets_presets.md.4R0VRbQo.lean.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"api/presets/presets.md","filePath":"zh/api/presets/presets.md"}'),o={name:"api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"说明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,_,h,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/en_api_api.md.BSgrCX1d.js b/assets/en_api_api.md.BSgrCX1d.js new file mode 100644 index 0000000..c2035e8 --- /dev/null +++ b/assets/en_api_api.md.BSgrCX1d.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),n={name:"en/api/api.md"},o=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),a(": 本模块塞了一些预设的粒子生成器")],-1),r=[o,i];function p(l,d,_,m,h,f){return c(),s("div",null,r)}const x=t(n,[["render",p]]);export{u as __pageData,x as default}; diff --git a/assets/en_api_api.md.BSgrCX1d.lean.js b/assets/en_api_api.md.BSgrCX1d.lean.js new file mode 100644 index 0000000..c2035e8 --- /dev/null +++ b/assets/en_api_api.md.BSgrCX1d.lean.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/api.md","filePath":"en/api/api.md"}'),n={name:"en/api/api.md"},o=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),i=e("p",null,[e("strong",null,"Description"),a(": 本模块塞了一些预设的粒子生成器")],-1),r=[o,i];function p(l,d,_,m,h,f){return c(),s("div",null,r)}const x=t(n,[["render",p]]);export{u as __pageData,x 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 new file mode 100644 index 0000000..f75f203 --- /dev/null +++ b/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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 new file mode 100644 index 0000000..b2f84b9 --- /dev/null +++ b/assets/en_api_mp_math_mp_math.md.h0PJ9KWU.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const h=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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/en_api_particle_particle.md.BNkfEyJn.js b/assets/en_api_particle_particle.md.BNkfEyJn.js new file mode 100644 index 0000000..c4fdf7e --- /dev/null +++ b/assets/en_api_particle_particle.md.BNkfEyJn.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/particle/particle.md","filePath":"en/api/particle/particle.md"}'),i={name:"en/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function n(o,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",n]]);export{u as __pageData,x as default}; diff --git a/assets/en_api_particle_particle.md.BNkfEyJn.lean.js b/assets/en_api_particle_particle.md.BNkfEyJn.lean.js new file mode 100644 index 0000000..c4fdf7e --- /dev/null +++ b/assets/en_api_particle_particle.md.BNkfEyJn.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/particle/particle.md","filePath":"en/api/particle/particle.md"}'),i={name:"en/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"Description"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function n(o,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",n]]);export{u as __pageData,x as default}; diff --git a/assets/en_api_presets_model_model.md.CL5uKZbj.js b/assets/en_api_presets_model_model.md.CL5uKZbj.js new file mode 100644 index 0000000..a34f6e3 --- /dev/null +++ b/assets/en_api_presets_model_model.md.CL5uKZbj.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/model.md","filePath":"en/api/presets/model/model.md"}'),t={name:"en/api/presets/model/model.md"},h=n(`

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):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_api_presets_model_model.md.CL5uKZbj.lean.js b/assets/en_api_presets_model_model.md.CL5uKZbj.lean.js new file mode 100644 index 0000000..fd83d90 --- /dev/null +++ b/assets/en_api_presets_model_model.md.CL5uKZbj.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/model/model.md","filePath":"en/api/presets/model/model.md"}'),t={name:"en/api/presets/model/model.md"},h=n("",10),l=[h];function p(k,e,r,d,E,o){return a(),i("div",null,l)}const c=s(t,[["render",p]]);export{y as __pageData,c as default}; diff --git a/assets/en_api_presets_presets.md.CCUzsYog.js b/assets/en_api_presets_presets.md.CCUzsYog.js new file mode 100644 index 0000000..7b223f7 --- /dev/null +++ b/assets/en_api_presets_presets.md.CCUzsYog.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/presets.md","filePath":"en/api/presets/presets.md"}'),o={name:"en/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(m,d,_,h,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/en_api_presets_presets.md.CCUzsYog.lean.js b/assets/en_api_presets_presets.md.CCUzsYog.lean.js new file mode 100644 index 0000000..7b223f7 --- /dev/null +++ b/assets/en_api_presets_presets.md.CCUzsYog.lean.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"en/api/presets/presets.md","filePath":"en/api/presets/presets.md"}'),o={name:"en/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),n=e("p",null,[e("strong",null,"Description"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),p=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,n,p];function c(m,d,_,h,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/en_refer_index.md.alw4L-bp.js b/assets/en_refer_index.md.alw4L-bp.js new file mode 100644 index 0000000..f8b6e81 --- /dev/null +++ b/assets/en_refer_index.md.alw4L-bp.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"en/refer/index.md","filePath":"en/refer/index.md"}'),s={name:"en/refer/index.md"},r=n('

Reference

help us to improve the documentation

',3),o=[r];function c(i,d,p,_,l,h){return t(),a("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/assets/en_refer_index.md.alw4L-bp.lean.js b/assets/en_refer_index.md.alw4L-bp.lean.js new file mode 100644 index 0000000..1303229 --- /dev/null +++ b/assets/en_refer_index.md.alw4L-bp.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"en/refer/index.md","filePath":"en/refer/index.md"}'),s={name:"en/refer/index.md"},r=n("",3),o=[r];function c(i,d,p,_,l,h){return t(),a("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/assets/ja_api_api.md.CPz58qIw.js b/assets/ja_api_api.md.CPz58qIw.js new file mode 100644 index 0000000..8569975 --- /dev/null +++ b/assets/ja_api_api.md.CPz58qIw.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),o={name:"ja/api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x as default}; diff --git a/assets/ja_api_api.md.CPz58qIw.lean.js b/assets/ja_api_api.md.CPz58qIw.lean.js new file mode 100644 index 0000000..8569975 --- /dev/null +++ b/assets/ja_api_api.md.CPz58qIw.lean.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/api.md","filePath":"ja/api/api.md"}'),o={name:"ja/api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x 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 new file mode 100644 index 0000000..e65d1ca --- /dev/null +++ b/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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 new file mode 100644 index 0000000..b947707 --- /dev/null +++ b/assets/ja_api_mp_math_mp_math.md.C7tFDhfI.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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_particle_particle.md.exTt46pq.js b/assets/ja_api_particle_particle.md.exTt46pq.js new file mode 100644 index 0000000..332c5bc --- /dev/null +++ b/assets/ja_api_particle_particle.md.exTt46pq.js @@ -0,0 +1 @@ +import{_ as t,c,o as r,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/particle/particle.md","filePath":"ja/api/particle/particle.md"}'),i={name:"ja/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[a("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),a(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=t(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/ja_api_particle_particle.md.exTt46pq.lean.js b/assets/ja_api_particle_particle.md.exTt46pq.lean.js new file mode 100644 index 0000000..332c5bc --- /dev/null +++ b/assets/ja_api_particle_particle.md.exTt46pq.lean.js @@ -0,0 +1 @@ +import{_ as t,c,o as r,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/particle/particle.md","filePath":"ja/api/particle/particle.md"}'),i={name:"ja/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[a("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),a(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=t(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/ja_api_presets_model_model.md.Dwbc1qIc.js b/assets/ja_api_presets_model_model.md.Dwbc1qIc.js new file mode 100644 index 0000000..6fbd9a8 --- /dev/null +++ b/assets/ja_api_presets_model_model.md.Dwbc1qIc.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/model.md","filePath":"ja/api/presets/model/model.md"}'),t={name:"ja/api/presets/model/model.md"},h=n(`

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

引数:

  • radius:
  • density:

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

ソースコード
python
@staticmethod
+def sphere(radius: float, density: float):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_presets_model_model.md.Dwbc1qIc.lean.js b/assets/ja_api_presets_model_model.md.Dwbc1qIc.lean.js new file mode 100644 index 0000000..ec27df9 --- /dev/null +++ b/assets/ja_api_presets_model_model.md.Dwbc1qIc.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/model/model.md","filePath":"ja/api/presets/model/model.md"}'),t={name:"ja/api/presets/model/model.md"},h=n("",10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/ja_api_presets_presets.md.DwzXdDqR.js b/assets/ja_api_presets_presets.md.DwzXdDqR.js new file mode 100644 index 0000000..0ec0d40 --- /dev/null +++ b/assets/ja_api_presets_presets.md.DwzXdDqR.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/presets.md","filePath":"ja/api/presets/presets.md"}'),o={name:"ja/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,_,h,u,f){return r(),a("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/ja_api_presets_presets.md.DwzXdDqR.lean.js b/assets/ja_api_presets_presets.md.DwzXdDqR.lean.js new file mode 100644 index 0000000..0ec0d40 --- /dev/null +++ b/assets/ja_api_presets_presets.md.DwzXdDqR.lean.js @@ -0,0 +1 @@ +import{_ as s,c as a,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"ja/api/presets/presets.md","filePath":"ja/api/presets/presets.md"}'),o={name:"ja/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,_,h,u,f){return r(),a("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/ja_refer_index.md.CODW6iMX.js b/assets/ja_refer_index.md.CODW6iMX.js new file mode 100644 index 0000000..6ce982a --- /dev/null +++ b/assets/ja_refer_index.md.CODW6iMX.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"ja/refer/index.md","filePath":"ja/refer/index.md"}'),s={name:"ja/refer/index.md"},r=n('

Reference

Help us to improve the documentation

',3),o=[r];function c(i,d,p,_,l,h){return t(),a("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/assets/ja_refer_index.md.CODW6iMX.lean.js b/assets/ja_refer_index.md.CODW6iMX.lean.js new file mode 100644 index 0000000..36f57ae --- /dev/null +++ b/assets/ja_refer_index.md.CODW6iMX.lean.js @@ -0,0 +1 @@ +import{_ as e,c as a,o as t,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"ja/refer/index.md","filePath":"ja/refer/index.md"}'),s={name:"ja/refer/index.md"},r=n("",3),o=[r];function c(i,d,p,_,l,h){return t(),a("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/assets/refer_function_curry.md.DwKZawp5.js b/assets/refer_function_curry.md.DwKZawp5.js new file mode 100644 index 0000000..00dd824 --- /dev/null +++ b/assets/refer_function_curry.md.DwKZawp5.js @@ -0,0 +1 @@ +import{_ as e,c as r,o as t}from"./chunks/framework.C94oF1kp.js";const _=JSON.parse('{"title":"柯里化","description":"","frontmatter":{"title":"柯里化"},"headers":[],"relativePath":"refer/function/curry.md","filePath":"zh/refer/function/curry.md"}'),c={name:"refer/function/curry.md"};function n(a,o,s,f,i,p){return t(),r("div")}const d=e(c,[["render",n]]);export{_ as __pageData,d as default}; diff --git a/assets/refer_function_curry.md.DwKZawp5.lean.js b/assets/refer_function_curry.md.DwKZawp5.lean.js new file mode 100644 index 0000000..00dd824 --- /dev/null +++ b/assets/refer_function_curry.md.DwKZawp5.lean.js @@ -0,0 +1 @@ +import{_ as e,c as r,o as t}from"./chunks/framework.C94oF1kp.js";const _=JSON.parse('{"title":"柯里化","description":"","frontmatter":{"title":"柯里化"},"headers":[],"relativePath":"refer/function/curry.md","filePath":"zh/refer/function/curry.md"}'),c={name:"refer/function/curry.md"};function n(a,o,s,f,i,p){return t(),r("div")}const d=e(c,[["render",n]]);export{_ as __pageData,d as default}; diff --git a/assets/refer_function_function.md.D3IgfZX2.js b/assets/refer_function_function.md.D3IgfZX2.js new file mode 100644 index 0000000..2e3efd1 --- /dev/null +++ b/assets/refer_function_function.md.D3IgfZX2.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"函数","description":"","frontmatter":{"title":"函数"},"headers":[],"relativePath":"refer/function/function.md","filePath":"zh/refer/function/function.md"}'),o={name:"refer/function/function.md"};function r(c,a,f,i,s,_){return n(),e("div")}const d=t(o,[["render",r]]);export{u as __pageData,d as default}; diff --git a/assets/refer_function_function.md.D3IgfZX2.lean.js b/assets/refer_function_function.md.D3IgfZX2.lean.js new file mode 100644 index 0000000..2e3efd1 --- /dev/null +++ b/assets/refer_function_function.md.D3IgfZX2.lean.js @@ -0,0 +1 @@ +import{_ as t,c as e,o as n}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"函数","description":"","frontmatter":{"title":"函数"},"headers":[],"relativePath":"refer/function/function.md","filePath":"zh/refer/function/function.md"}'),o={name:"refer/function/function.md"};function r(c,a,f,i,s,_){return n(),e("div")}const d=t(o,[["render",r]]);export{u as __pageData,d as default}; diff --git a/assets/refer_index.md.CczYTl3j.js b/assets/refer_index.md.CczYTl3j.js new file mode 100644 index 0000000..5d8d43d --- /dev/null +++ b/assets/refer_index.md.CczYTl3j.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"参考","description":"","frontmatter":{"title":"参考"},"headers":[],"relativePath":"refer/index.md","filePath":"zh/refer/index.md"}'),s={name:"refer/index.md"},r=n('

Reference

Help us to improve the documentation

',3),o=[r];function i(c,d,p,_,l,h){return a(),t("div",null,o)}const u=e(s,[["render",i]]);export{m as __pageData,u as default}; diff --git a/assets/refer_index.md.CczYTl3j.lean.js b/assets/refer_index.md.CczYTl3j.lean.js new file mode 100644 index 0000000..53bb9ad --- /dev/null +++ b/assets/refer_index.md.CczYTl3j.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"参考","description":"","frontmatter":{"title":"参考"},"headers":[],"relativePath":"refer/index.md","filePath":"zh/refer/index.md"}'),s={name:"refer/index.md"},r=n("",3),o=[r];function i(c,d,p,_,l,h){return a(),t("div",null,o)}const u=e(s,[["render",i]]);export{m as __pageData,u as default}; diff --git a/assets/zht_api_api.md.DyUSHA0S.js b/assets/zht_api_api.md.DyUSHA0S.js new file mode 100644 index 0000000..33628d9 --- /dev/null +++ b/assets/zht_api_api.md.DyUSHA0S.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),o={name:"zht/api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x as default}; diff --git a/assets/zht_api_api.md.DyUSHA0S.lean.js b/assets/zht_api_api.md.DyUSHA0S.lean.js new file mode 100644 index 0000000..33628d9 --- /dev/null +++ b/assets/zht_api_api.md.DyUSHA0S.lean.js @@ -0,0 +1 @@ +import{_ as t,c as s,o as c,j as e,a}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp","description":"","frontmatter":{"title":"mbcp","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/api.md","filePath":"zht/api/api.md"}'),o={name:"zht/api/api.md"},i=e("h1",{id:"mbcp",tabindex:"-1"},[a("mbcp "),e("a",{class:"header-anchor",href:"#mbcp","aria-label":'Permalink to "mbcp"'},"​")],-1),r=e("p",null,[e("strong",null,"説明"),a(": 本模块塞了一些预设的粒子生成器")],-1),n=[i,r];function p(l,d,_,m,h,f){return c(),s("div",null,n)}const x=t(o,[["render",p]]);export{u as __pageData,x 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 new file mode 100644 index 0000000..2a5488b --- /dev/null +++ b/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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 new file mode 100644 index 0000000..fe9b8db --- /dev/null +++ b/assets/zht_api_mp_math_mp_math.md.Cx_EDcbj.lean.js @@ -0,0 +1 @@ +import{_ as a,c as r,o as e,a2 as l}from"./chunks/framework.C94oF1kp.js";const p=JSON.parse('{"title":"mbcp.mp_math.mp_math_typing","description":"","frontmatter":{"title":"mbcp.mp_math.mp_math_typing","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/assets/zht_api_particle_particle.md.huuRTEb9.js b/assets/zht_api_particle_particle.md.huuRTEb9.js new file mode 100644 index 0000000..df8f4d9 --- /dev/null +++ b/assets/zht_api_particle_particle.md.huuRTEb9.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/particle/particle.md","filePath":"zht/api/particle/particle.md"}'),i={name:"zht/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/zht_api_particle_particle.md.huuRTEb9.lean.js b/assets/zht_api_particle_particle.md.huuRTEb9.lean.js new file mode 100644 index 0000000..df8f4d9 --- /dev/null +++ b/assets/zht_api_particle_particle.md.huuRTEb9.lean.js @@ -0,0 +1 @@ +import{_ as a,c,o as r,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const u=JSON.parse('{"title":"mbcp.particle","description":"","frontmatter":{"title":"mbcp.particle","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/particle/particle.md","filePath":"zht/api/particle/particle.md"}'),i={name:"zht/api/particle/particle.md"},p=e("h1",{id:"mbcp-particle",tabindex:"-1"},[t("mbcp.particle "),e("a",{class:"header-anchor",href:"#mbcp-particle","aria-label":'Permalink to "mbcp.particle"'},"​")],-1),l=e("p",null,[e("strong",null,"説明"),t(": 本模块定义了粒子生成相关的工具")],-1),s=[p,l];function o(n,d,_,m,h,f){return r(),c("div",null,s)}const x=a(i,[["render",o]]);export{u as __pageData,x as default}; diff --git a/assets/zht_api_presets_model_model.md.CNI4ubOh.js b/assets/zht_api_presets_model_model.md.CNI4ubOh.js new file mode 100644 index 0000000..c5d38ef --- /dev/null +++ b/assets/zht_api_presets_model_model.md.CNI4ubOh.js @@ -0,0 +1,18 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/presets/model/model.md","filePath":"zht/api/presets/model/model.md"}'),t={name:"zht/api/presets/model/model.md"},h=n(`

mbcp.presets.model

説明: 几何模型点集

class GeometricModels

@staticmethod

def sphere(radius: float, density: float)

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

變數説明:

  • radius:
  • density:

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

源碼
python
@staticmethod
+def sphere(radius: float, density: float):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]
`,10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_presets_model_model.md.CNI4ubOh.lean.js b/assets/zht_api_presets_model_model.md.CNI4ubOh.lean.js new file mode 100644 index 0000000..88126ad --- /dev/null +++ b/assets/zht_api_presets_model_model.md.CNI4ubOh.lean.js @@ -0,0 +1 @@ +import{_ as s,c as i,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const y=JSON.parse('{"title":"mbcp.presets.model","description":"","frontmatter":{"title":"mbcp.presets.model","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/presets/model/model.md","filePath":"zht/api/presets/model/model.md"}'),t={name:"zht/api/presets/model/model.md"},h=n("",10),l=[h];function p(k,e,r,d,E,g){return a(),i("div",null,l)}const F=s(t,[["render",p]]);export{y as __pageData,F as default}; diff --git a/assets/zht_api_presets_presets.md.CsDHjRbK.js b/assets/zht_api_presets_presets.md.CsDHjRbK.js new file mode 100644 index 0000000..aea731a --- /dev/null +++ b/assets/zht_api_presets_presets.md.CsDHjRbK.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/presets/presets.md","filePath":"zht/api/presets/presets.md"}'),o={name:"zht/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,h,_,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/zht_api_presets_presets.md.CsDHjRbK.lean.js b/assets/zht_api_presets_presets.md.CsDHjRbK.lean.js new file mode 100644 index 0000000..aea731a --- /dev/null +++ b/assets/zht_api_presets_presets.md.CsDHjRbK.lean.js @@ -0,0 +1 @@ +import{_ as s,c as r,o as a,j as e,a as t}from"./chunks/framework.C94oF1kp.js";const b=JSON.parse('{"title":"mbcp.presets","description":"","frontmatter":{"title":"mbcp.presets","editLink":false,"collapsed":true},"headers":[],"relativePath":"zht/api/presets/presets.md","filePath":"zht/api/presets/presets.md"}'),o={name:"zht/api/presets/presets.md"},i=e("h1",{id:"mbcp-presets",tabindex:"-1"},[t("mbcp.presets "),e("a",{class:"header-anchor",href:"#mbcp-presets","aria-label":'Permalink to "mbcp.presets"'},"​")],-1),p=e("p",null,[e("strong",null,"説明"),t(": Copyright (C) 2020-2024 LiteyukiStudio. All Rights Reserved")],-1),n=e("p",null,[t("@Time : 2024/8/12 下午9:12 @Author : snowykami @Email : "),e("a",{href:"mailto:snowykami@outlook.com",target:"_blank",rel:"noreferrer"},"snowykami@outlook.com"),t(" @File : "),e("strong",null,"init"),t(".py @Software: PyCharm")],-1),l=[i,p,n];function c(m,d,h,_,u,f){return a(),r("div",null,l)}const y=s(o,[["render",c]]);export{b as __pageData,y as default}; diff --git a/assets/zht_refer_index.md.Bz6voxEQ.js b/assets/zht_refer_index.md.Bz6voxEQ.js new file mode 100644 index 0000000..cd212bd --- /dev/null +++ b/assets/zht_refer_index.md.Bz6voxEQ.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"zht/refer/index.md","filePath":"zht/refer/index.md"}'),s={name:"zht/refer/index.md"},r=n('

Reference

Help us to improve the documentation

',3),o=[r];function c(i,d,p,_,l,h){return a(),t("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/assets/zht_refer_index.md.Bz6voxEQ.lean.js b/assets/zht_refer_index.md.Bz6voxEQ.lean.js new file mode 100644 index 0000000..a6c9189 --- /dev/null +++ b/assets/zht_refer_index.md.Bz6voxEQ.lean.js @@ -0,0 +1 @@ +import{_ as e,c as t,o as a,a2 as n}from"./chunks/framework.C94oF1kp.js";const m=JSON.parse('{"title":"Reference","description":"","frontmatter":{},"headers":[],"relativePath":"zht/refer/index.md","filePath":"zht/refer/index.md"}'),s={name:"zht/refer/index.md"},r=n("",3),o=[r];function c(i,d,p,_,l,h){return a(),t("div",null,o)}const u=e(s,[["render",c]]);export{m as __pageData,u as default}; diff --git a/demo/index.html b/demo/index.html index ab81d17..0a65825 100644 --- a/demo/index.html +++ b/demo/index.html @@ -17,8 +17,8 @@ -
Skip to content

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

- +
Skip to content

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

+ \ No newline at end of file diff --git a/en/api/api.html b/en/api/api.html new file mode 100644 index 0000000..7d0ac6f --- /dev/null +++ b/en/api/api.html @@ -0,0 +1,24 @@ + + + + + + mbcp | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/api/index.html b/en/api/index.html index 4d927c0..7ef494b 100644 --- a/en/api/index.html +++ b/en/api/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp

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

Documentation built with VitePress | API references generated by litedoc

- + + \ No newline at end of file diff --git a/en/api/mp_math/angle.html b/en/api/mp_math/angle.html index 4d30d87..3c6e62d 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 67de2e8..96a4d69 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 f80fc8d..8070f61 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 6afaf93..a96a052 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 18a459a..982b225 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 d10eef1..8489c32 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 new file mode 100644 index 0000000..372c46d --- /dev/null +++ b/en/api/mp_math/mp_math.html @@ -0,0 +1,24 @@ + + + + + + mbcp.mp_math.mp_math_typing | MBCP docs + + + + + + + + + + + + + +
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/mp_math_typing.html b/en/api/mp_math/mp_math_typing.html index d794901..ab6cadf 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 30fadac..b0cd680 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 e2003ec..e0f7b44 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 7bc4bf5..6ac80a3 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 96bbc04..d002e53 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 98a57ff..96df04b 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:
@@ -203,8 +203,8 @@
         """
     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

- + 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 3287e44..79b2346 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 new file mode 100644 index 0000000..0730236 --- /dev/null +++ b/en/api/particle/particle.html @@ -0,0 +1,24 @@ + + + + + + mbcp.particle | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/en/api/presets/index.html b/en/api/presets/index.html index 8612f65..af2dac2 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 86e63a0..c3d265e 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):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

Documentation built with VitePress | API references generated by litedoc

- + 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 new file mode 100644 index 0000000..f9e9880 --- /dev/null +++ b/en/api/presets/model/model.html @@ -0,0 +1,41 @@ + + + + + + mbcp.presets.model | MBCP docs + + + + + + + + + + + + + +
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):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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 new file mode 100644 index 0000000..307f48c --- /dev/null +++ b/en/api/presets/presets.html @@ -0,0 +1,24 @@ + + + + + + mbcp.presets | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.presets

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

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

Documentation built with VitePress | API references generated by litedoc

+ + + + \ No newline at end of file diff --git a/en/guide/index.html b/en/guide/index.html index 9303b4e..d02e459 100644 --- a/en/guide/index.html +++ b/en/guide/index.html @@ -17,8 +17,8 @@ -
Skip to content

开始不了一点

12x111

Documentation built with VitePress | API references generated by litedoc

- +
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 06c73ec..01f5546 100644 --- a/en/index.html +++ b/en/index.html @@ -17,8 +17,8 @@ -
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

- +
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 new file mode 100644 index 0000000..f05654e --- /dev/null +++ b/en/refer/index.html @@ -0,0 +1,24 @@ + + + + + + Reference | MBCP docs + + + + + + + + + + + + + +
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 bef4a29..d0ebe39 100644 --- a/guide/index.html +++ b/guide/index.html @@ -17,8 +17,8 @@ -
Skip to content

开始不了一点

12x111

AAA

BBB

C

ddd

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

- +
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 58658c2..2f15ec8 100644 --- a/hashmap.json +++ b/hashmap.json @@ -1 +1 @@ -{"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_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_presets_index.md":"CD62I2gv","api_presets_model_index.md":"gO0Notp6","demo_index.md":"D-H9zRUE","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_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_presets_index.md":"BWb2fpTg","en_api_presets_model_index.md":"pbEu-669","en_guide_index.md":"DrDHTYCZ","en_index.md":"MCm69eyE","guide_index.md":"Cfmzk2IH","index.md":"BjJ9-kbE","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_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_presets_index.md":"CQqdQbIZ","ja_api_presets_model_index.md":"C-Ypf-qh","ja_guide_index.md":"BxGnZYwR","ja_index.md":"CtozMsIU","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_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_presets_index.md":"DvOViSox","zht_api_presets_model_index.md":"BJWX_k6K","zht_guide_index.md":"CsuFVFxu","zht_index.md":"V9U3SwDR"} +{"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"} diff --git a/index.html b/index.html index f9fb065..deb5598 100644 --- a/index.html +++ b/index.html @@ -17,8 +17,8 @@ -
Skip to content

MBCP docs

More basic change particle

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

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

- +
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 new file mode 100644 index 0000000..bcf44be --- /dev/null +++ b/ja/api/api.html @@ -0,0 +1,24 @@ + + + + + + mbcp | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ja/api/index.html b/ja/api/index.html index 7bef607..aa998d1 100644 --- a/ja/api/index.html +++ b/ja/api/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp

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

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

- + + \ No newline at end of file diff --git a/ja/api/mp_math/angle.html b/ja/api/mp_math/angle.html index a7b8eab..f431e0e 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 f82d18d..b9f9823 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 1c8f91e..bdddcea 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 7b308fe..8630a33 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 dca66e0..3468441 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 565050c..b81d0ac 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 new file mode 100644 index 0000000..f78f3a3 --- /dev/null +++ b/ja/api/mp_math/mp_math.html @@ -0,0 +1,24 @@ + + + + + + mbcp.mp_math.mp_math_typing | MBCP docs + + + + + + + + + + + + + +
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/mp_math_typing.html b/ja/api/mp_math/mp_math_typing.html index 33c907e..e97ed73 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 eacc4e4..b9555b3 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 b611b91..7e9af05 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 844c070..2b9e759 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 752c0f7..80c2dd8 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 b88c083..4961f54 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:
@@ -203,8 +203,8 @@
         """
     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リファレンス

- + 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 90da9ab..5e73e29 100644 --- a/ja/api/particle/index.html +++ b/ja/api/particle/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp.particle

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

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

- + + \ No newline at end of file diff --git a/ja/api/particle/particle.html b/ja/api/particle/particle.html new file mode 100644 index 0000000..0917f83 --- /dev/null +++ b/ja/api/particle/particle.html @@ -0,0 +1,24 @@ + + + + + + mbcp.particle | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ja/api/presets/index.html b/ja/api/presets/index.html index e154c81..973e14e 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 a2504ba..f8fc8e4 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):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

- + 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 new file mode 100644 index 0000000..e46aa8d --- /dev/null +++ b/ja/api/presets/model/model.html @@ -0,0 +1,41 @@ + + + + + + mbcp.presets.model | MBCP docs + + + + + + + + + + + + + +
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):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

+ + + + \ No newline at end of file diff --git a/ja/api/presets/presets.html b/ja/api/presets/presets.html new file mode 100644 index 0000000..8122678 --- /dev/null +++ b/ja/api/presets/presets.html @@ -0,0 +1,24 @@ + + + + + + mbcp.presets | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.presets

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

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

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

+ + + + \ No newline at end of file diff --git a/ja/guide/index.html b/ja/guide/index.html index 6e22213..b3dab3e 100644 --- a/ja/guide/index.html +++ b/ja/guide/index.html @@ -17,8 +17,8 @@ -
Skip to content

开始不了一点

12x111

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

- +
Skip to content

开始不了一点

12x111

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

+ \ No newline at end of file diff --git a/ja/index.html b/ja/index.html index 272acdd..024427d 100644 --- a/ja/index.html +++ b/ja/index.html @@ -17,8 +17,8 @@ -
Skip to content

MBCP docs

More basic change particle

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

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

- +
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 new file mode 100644 index 0000000..1e1cbc1 --- /dev/null +++ b/ja/refer/index.html @@ -0,0 +1,24 @@ + + + + + + Reference | MBCP docs + + + + + + + + + + + + + +
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 new file mode 100644 index 0000000..4d1f3eb --- /dev/null +++ b/refer/function/curry.html @@ -0,0 +1,24 @@ + + + + + + 柯里化 | MBCP docs + + + + + + + + + + + + + +
Skip to content

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

+ + + + \ No newline at end of file diff --git a/refer/function/function.html b/refer/function/function.html new file mode 100644 index 0000000..75743d6 --- /dev/null +++ b/refer/function/function.html @@ -0,0 +1,24 @@ + + + + + + 函数 | MBCP docs + + + + + + + + + + + + + +
Skip to content

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

+ + + + \ No newline at end of file diff --git a/refer/index.html b/refer/index.html new file mode 100644 index 0000000..afcaa69 --- /dev/null +++ b/refer/index.html @@ -0,0 +1,24 @@ + + + + + + 参考 | MBCP docs + + + + + + + + + + + + + +
Skip to content

Reference

Help us to improve the documentation

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

+ + + + \ No newline at end of file diff --git a/sitemap.xml b/sitemap.xml index 86c473b..e2f94a5 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://mbcp.sfkm.me/en/api/https://mbcp.sfkm.me/ja/api/https://mbcp.sfkm.me/api/https://mbcp.sfkm.me/zht/api/https://mbcp.sfkm.me/en/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/en/api/mp_math/const.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/const.htmlhttps://mbcp.sfkm.me/api/mp_math/const.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/const.htmlhttps://mbcp.sfkm.me/en/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/en/api/mp_math/function.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/function.htmlhttps://mbcp.sfkm.me/api/mp_math/function.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/function.htmlhttps://mbcp.sfkm.me/en/api/mp_math/https://mbcp.sfkm.me/ja/api/mp_math/https://mbcp.sfkm.me/api/mp_math/https://mbcp.sfkm.me/zht/api/mp_math/https://mbcp.sfkm.me/en/api/mp_math/line.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/line.htmlhttps://mbcp.sfkm.me/api/mp_math/line.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/line.htmlhttps://mbcp.sfkm.me/en/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/en/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/en/api/mp_math/point.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/point.htmlhttps://mbcp.sfkm.me/api/mp_math/point.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/point.htmlhttps://mbcp.sfkm.me/en/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/en/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/en/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/en/api/particle/https://mbcp.sfkm.me/ja/api/particle/https://mbcp.sfkm.me/api/particle/https://mbcp.sfkm.me/zht/api/particle/https://mbcp.sfkm.me/en/api/presets/https://mbcp.sfkm.me/ja/api/presets/https://mbcp.sfkm.me/api/presets/https://mbcp.sfkm.me/zht/api/presets/https://mbcp.sfkm.me/en/api/presets/model/https://mbcp.sfkm.me/ja/api/presets/model/https://mbcp.sfkm.me/api/presets/model/https://mbcp.sfkm.me/zht/api/presets/model/https://mbcp.sfkm.me/en/guide/https://mbcp.sfkm.me/ja/guide/https://mbcp.sfkm.me/guide/https://mbcp.sfkm.me/zht/guide/https://mbcp.sfkm.me/en/https://mbcp.sfkm.me/ja/https://mbcp.sfkm.me/https://mbcp.sfkm.me/zht/https://mbcp.sfkm.me/demo/ \ No newline at end of file +https://mbcp.sfkm.me/en/api/api.htmlhttps://mbcp.sfkm.me/ja/api/api.htmlhttps://mbcp.sfkm.me/api/api.htmlhttps://mbcp.sfkm.me/zht/api/api.htmlhttps://mbcp.sfkm.me/en/api/https://mbcp.sfkm.me/ja/api/https://mbcp.sfkm.me/api/https://mbcp.sfkm.me/zht/api/https://mbcp.sfkm.me/en/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/angle.htmlhttps://mbcp.sfkm.me/en/api/mp_math/const.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/const.htmlhttps://mbcp.sfkm.me/api/mp_math/const.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/const.htmlhttps://mbcp.sfkm.me/en/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/equation.htmlhttps://mbcp.sfkm.me/en/api/mp_math/function.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/function.htmlhttps://mbcp.sfkm.me/api/mp_math/function.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/function.htmlhttps://mbcp.sfkm.me/en/api/mp_math/https://mbcp.sfkm.me/ja/api/mp_math/https://mbcp.sfkm.me/api/mp_math/https://mbcp.sfkm.me/zht/api/mp_math/https://mbcp.sfkm.me/en/api/mp_math/line.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/line.htmlhttps://mbcp.sfkm.me/api/mp_math/line.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/line.htmlhttps://mbcp.sfkm.me/en/api/mp_math/mp_math.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/mp_math.htmlhttps://mbcp.sfkm.me/api/mp_math/mp_math.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/mp_math.htmlhttps://mbcp.sfkm.me/en/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/mp_math_typing.htmlhttps://mbcp.sfkm.me/en/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/plane.htmlhttps://mbcp.sfkm.me/en/api/mp_math/point.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/point.htmlhttps://mbcp.sfkm.me/api/mp_math/point.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/point.htmlhttps://mbcp.sfkm.me/en/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/segment.htmlhttps://mbcp.sfkm.me/en/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/utils.htmlhttps://mbcp.sfkm.me/en/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/ja/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/zht/api/mp_math/vector.htmlhttps://mbcp.sfkm.me/en/api/particle/https://mbcp.sfkm.me/ja/api/particle/https://mbcp.sfkm.me/api/particle/https://mbcp.sfkm.me/zht/api/particle/https://mbcp.sfkm.me/en/api/particle/particle.htmlhttps://mbcp.sfkm.me/ja/api/particle/particle.htmlhttps://mbcp.sfkm.me/api/particle/particle.htmlhttps://mbcp.sfkm.me/zht/api/particle/particle.htmlhttps://mbcp.sfkm.me/en/api/presets/https://mbcp.sfkm.me/ja/api/presets/https://mbcp.sfkm.me/api/presets/https://mbcp.sfkm.me/zht/api/presets/https://mbcp.sfkm.me/en/api/presets/model/https://mbcp.sfkm.me/ja/api/presets/model/https://mbcp.sfkm.me/api/presets/model/https://mbcp.sfkm.me/zht/api/presets/model/https://mbcp.sfkm.me/en/api/presets/model/model.htmlhttps://mbcp.sfkm.me/ja/api/presets/model/model.htmlhttps://mbcp.sfkm.me/api/presets/model/model.htmlhttps://mbcp.sfkm.me/zht/api/presets/model/model.htmlhttps://mbcp.sfkm.me/en/api/presets/presets.htmlhttps://mbcp.sfkm.me/ja/api/presets/presets.htmlhttps://mbcp.sfkm.me/api/presets/presets.htmlhttps://mbcp.sfkm.me/zht/api/presets/presets.htmlhttps://mbcp.sfkm.me/en/guide/https://mbcp.sfkm.me/ja/guide/https://mbcp.sfkm.me/guide/https://mbcp.sfkm.me/zht/guide/https://mbcp.sfkm.me/en/https://mbcp.sfkm.me/ja/https://mbcp.sfkm.me/https://mbcp.sfkm.me/zht/https://mbcp.sfkm.me/en/refer/https://mbcp.sfkm.me/ja/refer/https://mbcp.sfkm.me/refer/https://mbcp.sfkm.me/zht/refer/https://mbcp.sfkm.me/demo/https://mbcp.sfkm.me/refer/function/curry.htmlhttps://mbcp.sfkm.me/refer/function/function.html \ No newline at end of file diff --git a/zht/api/api.html b/zht/api/api.html new file mode 100644 index 0000000..fa2c957 --- /dev/null +++ b/zht/api/api.html @@ -0,0 +1,24 @@ + + + + + + mbcp | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zht/api/index.html b/zht/api/index.html index 5f70636..74b4ab0 100644 --- a/zht/api/index.html +++ b/zht/api/index.html @@ -17,8 +17,8 @@ -
Skip to content

mbcp

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

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

- + + \ No newline at end of file diff --git a/zht/api/mp_math/angle.html b/zht/api/mp_math/angle.html index 7409d62..90bd887 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 76484cc..5ee159d 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 30b6bbf..64ff497 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 24c6474..8c46f72 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 727e610..c2e36eb 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 2429d44..256d4be 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 new file mode 100644 index 0000000..6f927b8 --- /dev/null +++ b/zht/api/mp_math/mp_math.html @@ -0,0 +1,24 @@ + + + + + + mbcp.mp_math.mp_math_typing | MBCP docs + + + + + + + + + + + + + +
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/mp_math_typing.html b/zht/api/mp_math/mp_math_typing.html index b6349c9..3520cd2 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 6a51964..cc5dbc1 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 0f079ff..825e18d 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 0d4a657..96a124b 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 e64c2dc..abca1a6 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 b669081..01772de 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:
@@ -203,8 +203,8 @@
         """
     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 生成

- + 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 11a51e0..4aca02b 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 new file mode 100644 index 0000000..57c0531 --- /dev/null +++ b/zht/api/particle/particle.html @@ -0,0 +1,24 @@ + + + + + + mbcp.particle | MBCP docs + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/zht/api/presets/index.html b/zht/api/presets/index.html index 209a505..f888e55 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 698ab1d..cd87a06 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):
     """
         生成球体上的点集。
@@ -34,8 +34,8 @@
     x_array = radius * np.sin(phi_list) * np.cos(theta_list)
     y_array = radius * np.sin(phi_list) * np.sin(theta_list)
     z_array = radius * np.cos(phi_list)
-    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

- + 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 new file mode 100644 index 0000000..55d665a --- /dev/null +++ b/zht/api/presets/model/model.html @@ -0,0 +1,41 @@ + + + + + + mbcp.presets.model | MBCP docs + + + + + + + + + + + + + +
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):
+    """
+        生成球体上的点集。
+        Args:
+            radius:
+            density:
+        Returns:
+            List[Point3]: 球体上的点集。
+        """
+    area = 4 * np.pi * radius ** 2
+    num = int(area * density)
+    phi_list = np.arccos([clamp(-1 + (2.0 * _ - 1.0) / num, -1, 1) for _ in range(num)])
+    theta_list = np.sqrt(num * np.pi) * phi_list
+    x_array = radius * np.sin(phi_list) * np.cos(theta_list)
+    y_array = radius * np.sin(phi_list) * np.sin(theta_list)
+    z_array = radius * np.cos(phi_list)
+    return [Point3(x_array[i], y_array[i], z_array[i]) for i in range(num)]

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

+ + + + \ No newline at end of file diff --git a/zht/api/presets/presets.html b/zht/api/presets/presets.html new file mode 100644 index 0000000..03c45f9 --- /dev/null +++ b/zht/api/presets/presets.html @@ -0,0 +1,24 @@ + + + + + + mbcp.presets | MBCP docs + + + + + + + + + + + + + +
Skip to content

mbcp.presets

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

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

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

+ + + + \ No newline at end of file diff --git a/zht/guide/index.html b/zht/guide/index.html index bf837fe..d6f756b 100644 --- a/zht/guide/index.html +++ b/zht/guide/index.html @@ -17,8 +17,8 @@ -
Skip to content

开始不了一点

12x111

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

- +
Skip to content

开始不了一点

12x111

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

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

MBCP docs

More basic change particle

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

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

- +
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 new file mode 100644 index 0000000..aeb6080 --- /dev/null +++ b/zht/refer/index.html @@ -0,0 +1,24 @@ + + + + + + Reference | MBCP docs + + + + + + + + + + + + + +
Skip to content

Reference

Help us to improve the documentation

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

+ + + + \ No newline at end of file