Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Nov 24, 2023
1 parent 39584d7 commit fb2d911
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 5 deletions.
7 changes: 7 additions & 0 deletions articles/2023/regression.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# 回归分析
>
## Gaussian elimination

## 术语

1 change: 1 addition & 0 deletions cg/Color.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ HDR高动态范围High dynamic range,就是添加更多的动态范围到图
## JS

- [iro-core实现了颜色的转换核心](https://github.com/irojs/iro-core)
- [Using JavaScript to Adjust Saturation and Brightness of RGB Colors](https://css-tricks.com/using-javascript-to-adjust-saturation-and-brightness-of-rgb-colors/#top-of-site)
- [Okhsv and Okhsl -- Two new color spaces for color picking](https://bottosson.github.io/posts/colorpicker/)
- [Project Status, and iro.js 6.0](https://github.com/jaames/iro.js/issues/217#issuecomment-1214403290)
- [Chroma.js is a tiny small-ish zero-dependency JavaScript library (13.5kB) for all kinds of color conversions and color scales.](https://github.com/gka/chroma.js/)
Expand Down
6 changes: 5 additions & 1 deletion cg/canvas.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,8 @@
*/
CanvasRenderingContext2D.isPointInPath()
```
![Applying winding rules to a path](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Art/winding_path_crossing_2x.png)
![Applying winding rules to a path](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Art/winding_path_crossing_2x.png)

## 参考

- [OffscreenCanvas-离屏canvas使用说明](https://zhuanlan.zhihu.com/p/100375855)
27 changes: 25 additions & 2 deletions cg/curve.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,16 @@

## Catmull-Rom

- uniform
[Parameterization of Catmull-Rom Curves](http://www.cemyuksel.com/research/catmullrom_param/)

Catmull-Rom广泛使用于建模或动画,它有三个属性
- the curves area smooth and interpolate their control points, which gives the user direct control over various points on the curve
- the curves have local support, so that each control point only affects a small neighborhood on the curve
- the curves have an explicit piecewise polynomial representation, allowing them to be easily be converted to other bases and manipulated computationally.

- uniform parameterization, the control points are equally spaced in parametric space,就是Euclidean distance并不能体现在控制点上,而是体现上参数化上
- chordal
- centripetal
- centripetal parameterization produces visually favorable curves, produces curves closer to the control polygon for cubic splines than uniform or chordal parameterization, within an infinite family of parameterization choices between uniform and chordal.

过四个点的曲线(p0,p1,p2,p3)的曲线方程为B(t)=a+b*t+c*t^2+d*t^3
其切线方程为C(t)=b+2c*t+3*d*t^2
Expand All @@ -21,5 +28,21 @@
- c = (2p0 - 5p1 + 4p2 - p3) / 2
- d = (-p0 + 3p1 - 3p2 + p3) / 2

Catmull-Rom样条线是由四个控制点p0,p1,p2,p3定义的插值样条曲线,曲线只绘制从p1到p2的部分,就是去除掉首尾两个点。即如果要绘制一条通过K个点的曲线,需要K+2个控制点,首尾两个点可以任意选择,但是会影响曲线形状。

[On the Parameterization of Catmull-Rom Curves](http://www.cemyuksel.com/research/catmullrom_param/catmullrom.pdf)
[Parameterization and Applications of Catmull-Rom Curves](http://www.cemyuksel.com/research/catmullrom_param/catmullrom_cad.pdf)

[Smooth Paths Using Catmull-Rom Splines](https://qroph.github.io/2018/07/30/smooth-paths-using-catmull-rom-splines.html)

## 其他参考

[Geometric Modeling with Conical Meshes and Developable Surfaces](http://cg.cs.tsinghua.edu.cn/people/~yangyl/papers/quadmesh.pdf)

[Curved Folding](https://graphics.stanford.edu/~niloy/research/folding/paper_docs/folding_sig_08.pdf)

[Using Particles to Sample and Control Implicit Surfaces](https://dl.acm.org/doi/pdf/10.1145/192161.192227)

[Computing Curve Skeletons from Medial Surfaces of 3D Shapes](https://diglib.eg.org/bitstream/handle/10.2312/LocalChapterEvents.TPCG.TPCG12.099-106/099-106.pdf?sequence=1)

[Physically-Based Facial Modeling, Analysis, and Animation](https://web.cs.ucla.edu/~dt/papers/vca90/vca90.pdf)
10 changes: 10 additions & 0 deletions cg/image/algorithm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 图像算法
> 图像处理相关的算法
## 二值化分割阈值

- [Otsu Thresholding大律法--最大类间方差法原理及实现](http://www.labbookpages.co.uk/software/imgProc/otsuThreshold.html)

## 颜色转换

- [Change color lightness](https://www.30secondsofcode.org/js/s/change-lightness/)
24 changes: 23 additions & 1 deletion cpl/cplusplus.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,29 @@ int main() {
在一些数据范围小答案可以枚举,且时间上较为苛刻的,使用暴力枚举得出答案,将答案写入数组中。是指先生成一些数据可直接使用,减少运行的时间,对计算量大的可以这样优化。别人把特定计算放在一些文件中,部署出去的程序就跑得飞快,其他人还好奇为什么你的就这么快。
### Template
NTTP-non-type template parameters
```c++
template <std::size_T N>
struct string_literal {
// str is a reference to an array N of constant char
constexpr string_literal(char const (&str)[N]) {
std::copy_n(str, N, value);
}
char value[N];
}
```

## 其他

### Fiber
React中引入Fiber,其概念来自C++,[C++ Fiber的基本知识](https://agraphicsguynotes.com/posts/fiber_in_cpp_understanding_the_basics/)
React中引入Fiber,其概念来自C++,[C++ Fiber的基本知识](https://agraphicsguynotes.com/posts/fiber_in_cpp_understanding_the_basics/)

## 参考

- [C++ stories](https://www.cppstories.com/)

### 里缪
> 我看标准的这些机制设计和其他一些架构,其中很重要的一条原则就是追求一致性。不仅是美学上的追求,一旦符合这种一致性,系统本身就具备适应变化的能力,从而能够抵抗非连续性问题。一切本质的东西都很简单,且具有美感。设计之初就追求一致性,本质是一种多阶思维,看似麻烦,往往能够解决很多未能提前发现的问题。
>> 很多架构都是一致性的体现,一个项目之初如果不用架构,后面慢慢修改抽象,不断演进最后发现跟已有架构一个思路
1 change: 1 addition & 0 deletions index/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
- [Markdown 例子](../articles/markdown.md)
- [Mathjax](../articles/mathjax.md)
- [农历历法](../articles/2023/chineseCalendar.md)
- [回归分析法](../articles/2023/regression.md)

## 工作中遇到的
- [mobile-detect.js](https://github.com/hgoebl/mobile-detect.js)
Expand Down
4 changes: 3 additions & 1 deletion index/books.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
## 网上资源
- [世界数字图书馆](https://www.wdl.org/zh/)
- [英文文学在线书库](http://www.online-literature.com/)
- [叻报是战前新加坡出版和行销最久的中文日报](http://www.lib.nus.edu.sg/lebao/index.htm)
- [叻报是战前新加坡出版和行销最久的中文日报](http://www.lib.nus.edu.sg/lebao/index.htm)

- [在线收集的电子读物](http://www.labbookpages.co.uk/index.html)
1 change: 1 addition & 0 deletions index/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
## Images

- [颜色](../cg/Color.md)
- [图像相关的算法](../cg/image/algorithm.md)
- [图像格式](../others/images.md)
- [The DICOM Standard Current Edition](https://www.dicomstandard.org/current)
- [Color Profile](../cg/image/ColorProfile.md)
Expand Down
2 changes: 2 additions & 0 deletions web/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ Content-Disposition:'attachment=filename;'。
Response.AppendHeader("Content-Disposition","attachment;filename=FileName.txt");
attachment会以附件方式下载
阿里云的OSS有一个政策就是对这个进行了控制,导致显示不能直接在浏览器中打开

## response

0 comments on commit fb2d911

Please sign in to comment.