From fb2d91121250d7c1703a28e493dab631a46ad3f2 Mon Sep 17 00:00:00 2001 From: lmj01 Date: Fri, 24 Nov 2023 17:31:39 +0800 Subject: [PATCH] update --- articles/2023/regression.md | 7 +++++++ cg/Color.md | 1 + cg/canvas.md | 6 +++++- cg/curve.md | 27 +++++++++++++++++++++++++-- cg/image/algorithm.md | 10 ++++++++++ cpl/cplusplus.md | 24 +++++++++++++++++++++++- index/article.md | 1 + index/books.md | 4 +++- index/standard.md | 1 + web/http.md | 2 ++ 10 files changed, 78 insertions(+), 5 deletions(-) create mode 100644 articles/2023/regression.md create mode 100644 cg/image/algorithm.md diff --git a/articles/2023/regression.md b/articles/2023/regression.md new file mode 100644 index 0000000..cc9d7ef --- /dev/null +++ b/articles/2023/regression.md @@ -0,0 +1,7 @@ +# 回归分析 +> + +## Gaussian elimination + +## 术语 + diff --git a/cg/Color.md b/cg/Color.md index 3a554d4..b559544 100644 --- a/cg/Color.md +++ b/cg/Color.md @@ -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/) diff --git a/cg/canvas.md b/cg/canvas.md index 0540cdd..5a2a988 100644 --- a/cg/canvas.md +++ b/cg/canvas.md @@ -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) \ No newline at end of file +![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) \ No newline at end of file diff --git a/cg/curve.md b/cg/curve.md index 2313da5..9b9188a 100644 --- a/cg/curve.md +++ b/cg/curve.md @@ -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 @@ -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) \ No newline at end of file diff --git a/cg/image/algorithm.md b/cg/image/algorithm.md new file mode 100644 index 0000000..320ca67 --- /dev/null +++ b/cg/image/algorithm.md @@ -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/) \ No newline at end of file diff --git a/cpl/cplusplus.md b/cpl/cplusplus.md index 611bae6..e4a5149 100644 --- a/cpl/cplusplus.md +++ b/cpl/cplusplus.md @@ -126,7 +126,29 @@ int main() { 在一些数据范围小答案可以枚举,且时间上较为苛刻的,使用暴力枚举得出答案,将答案写入数组中。是指先生成一些数据可直接使用,减少运行的时间,对计算量大的可以这样优化。别人把特定计算放在一些文件中,部署出去的程序就跑得飞快,其他人还好奇为什么你的就这么快。 +### Template + +NTTP-non-type template parameters +```c++ +template +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/) \ No newline at end of file +React中引入Fiber,其概念来自C++,[C++ Fiber的基本知识](https://agraphicsguynotes.com/posts/fiber_in_cpp_understanding_the_basics/) + +## 参考 + +- [C++ stories](https://www.cppstories.com/) + +### 里缪 +> 我看标准的这些机制设计和其他一些架构,其中很重要的一条原则就是追求一致性。不仅是美学上的追求,一旦符合这种一致性,系统本身就具备适应变化的能力,从而能够抵抗非连续性问题。一切本质的东西都很简单,且具有美感。设计之初就追求一致性,本质是一种多阶思维,看似麻烦,往往能够解决很多未能提前发现的问题。 +>> 很多架构都是一致性的体现,一个项目之初如果不用架构,后面慢慢修改抽象,不断演进最后发现跟已有架构一个思路 \ No newline at end of file diff --git a/index/article.md b/index/article.md index 725e30b..d41f8ba 100644 --- a/index/article.md +++ b/index/article.md @@ -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) diff --git a/index/books.md b/index/books.md index 0b2c60c..9c1d71e 100644 --- a/index/books.md +++ b/index/books.md @@ -24,4 +24,6 @@ ## 网上资源 - [世界数字图书馆](https://www.wdl.org/zh/) - [英文文学在线书库](http://www.online-literature.com/) -- [叻报是战前新加坡出版和行销最久的中文日报](http://www.lib.nus.edu.sg/lebao/index.htm) \ No newline at end of file +- [叻报是战前新加坡出版和行销最久的中文日报](http://www.lib.nus.edu.sg/lebao/index.htm) + +- [在线收集的电子读物](http://www.labbookpages.co.uk/index.html) \ No newline at end of file diff --git a/index/standard.md b/index/standard.md index 00dbbd4..7686f70 100644 --- a/index/standard.md +++ b/index/standard.md @@ -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) diff --git a/web/http.md b/web/http.md index 83383da..f7d1143 100644 --- a/web/http.md +++ b/web/http.md @@ -14,3 +14,5 @@ Content-Disposition:'attachment=filename;'。 Response.AppendHeader("Content-Disposition","attachment;filename=FileName.txt"); attachment会以附件方式下载 阿里云的OSS有一个政策就是对这个进行了控制,导致显示不能直接在浏览器中打开 + +## response