[WIP] Redesign plotting API
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 活躍
- 技術堆疊
- csharp, fsharp
研究方向
建議的進入點是 AngouriMath.Interactive.Plot 型別,它會為繪圖和 slider 方法傳回 GenericChart。首先找出現有的實驗性繪圖實作,並將其 2D、3D 和 slider 行為與此處列出的簽章和預設值進行比較。完成的標準是重新設計的 API 已一致地實作,且對於表達式值範圍這個尚未解決的問題已有記錄在案的決定。
由索引模型根據 Issue 內容生成。
描述
Plotting API
Since 1.4 preview 1 one now can plot functions in "experimental"/preview mode. Time to make it prettier!
Root types
Will be in class Plot:
module AngouriMath.Interactive
...
type AnyFunc = obj
type AnyVar = obj
...
type Plot =
... // here the static members come
2D
Signature
static member plottingFunction(func : AnyFunc,
[<Optional;DefaultParameterValue(null)>] ?var : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?range : double seq
) : GenericChart
Functions
| Function | Default range |
|---|---|
cartesianLine |
[-1.0..0.01..1.0] |
cartesianScatter2D |
[-1.0..0.01..1.0] |
polarLine |
[0.0..0.01..3.1415] |
polarScatter |
[0.0..0.01..3.1415] |
3D
Signature
static member plottingFunction(func : AnyFunc,
[<Optional;DefaultParameterValue(null)>] ?var1 : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?var2 : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?range1 : double seq,
[<Optional;DefaultParameterValue(null)>] ?range2 : double seq
) : GenericChart
If no var was specified, they're taken from the expression in the alphabet order, e. g. for y + x the variables will be x and y.
Functions
| Function | Default range 1 | Default range 2 |
|---|---|---|
cartesianSurface |
[-1.0..0.05..1.0] |
[-1.0..0.05..1.0] |
cartesianScatter3D |
[-1.0..0.05..1.0] |
[-1.0..0.05..1.0] |
sphericalSurface |
[0.0..0.05..3.1415] |
[0.0..0.05..3.1415] |
sphericalScatter |
[0.0..0.05..3.1415] |
[0.0..0.05..3.1415] |
cylindricalSurface |
[0.0..0.05..3.1415] |
[0.0..0.05..1.0] |
cylindricalScatter |
[0.0..0.05..3.1415] |
[0.0..0.05..1.0] |
Sliders
For 2D
static member withSlider2D(func : AnyFunc,
plottingFunc : (AnyFunc * AnyVar Option * double seq option) -> GenericChart,
[<Optional;DefaultParameterValue(null)>] ?var : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?range : double seq,
[<Optional;DefaultParameterValue(null)>] ?param : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?paramRange : double seq,
) : GenericChart
If no parameter and argument is specified, the variables taken from the expression are ordered in alphabet order, and the parameter is the first of them. For example, in x + a the paramater is a and the variable is x.
The default value for range now is [1.0..0.1..2.0], but no default value for range (it will be passed as-is).
For 3D
static member withSlider3D(func : AnyFunc,
plottingFunc : (AnyFunc * AnyVar Option * AnyVar Option * double seq Option * double seq Option) -> GenericChart,
[<Optional;DefaultParameterValue(null)>] ?var1 : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?var2 : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?range1 : double seq,
[<Optional;DefaultParameterValue(null)>] ?range2 : double seq,
[<Optional;DefaultParameterValue(null)>] ?param : AnyVar,
[<Optional;DefaultParameterValue(null)>] ?paramRange : double seq,
) : GenericChart
Likewise, the param variable is defined as the first one by alphabet by default.
Unresolved questions
Can we let input expressions? e. g. range = [ 0.0..0.1.. (2 * pi) ]
- 主要語言
- C#
- 星號
- 831
- 分支
- 79
- 平均合併
- 1 小時 12 分鐘
- 30 天內合併 PR
- 518
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ASC-Community/AngouriMath 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
ASC-Community/AngouriMath#2220 · 4 則留言 ·
維護者通常 1 天內回覆
-
Opinions wanted
難度 4/5 一週以上 新手友好度 15/100
ASC-Community/AngouriMath#2319 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 18/100
ASC-Community/AngouriMath#2298 ·
維護者通常 1 天內回覆
-
The kernel under WebAssembly: 1.26 MB Brotli over the bare runtime, and 0.2 s to the first Simplify未關閉
難度 3/5 半天 新手友好度 48/100
ASC-Community/AngouriMath#2296 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
ASC-Community/AngouriMath#2293 · 2 則留言 ·
維護者通常 1 天內回覆
查看 ASC-Community/AngouriMath 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 3 天內回覆
-
enhancement P3 performance
難度 2/5 1-3 小時 新手友好度 75/100
thomhurst/TUnit#7380 · 2 則留言 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
-
documentation trivial
難度 2/5 1-3 小時 新手友好度 70/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 68/100
PCL-Community/PCL-CE#3767 ·
維護者通常 1 天內回覆