Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
lmj01 committed Aug 30, 2024
1 parent 4ba2f07 commit 6fa0184
Show file tree
Hide file tree
Showing 27 changed files with 351 additions and 37 deletions.
6 changes: 6 additions & 0 deletions articles/notes/work.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
## 方案页面

- 2024-7-25 游离根 跟着 颌骨显示
### CT

- 大平台通过一个接口来显示控制
- 企业版,返回字段有rootBone就显示



## 快速目标位

Expand Down
24 changes: 24 additions & 0 deletions cg/dental/night.guard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Night Guard

Night Guard可以治疗磨牙、下巴不适、头痛和睡眠问题等特定疾病。

Night Guard是一种口腔保护器,可以覆盖牙齿的咬合表面。Night Guard是它最常使用的名称,还可以称作护齿器、咬合护罩、咬合夹板、牙科护齿器、夜间咬合板等。

Night Guard通常分上颌和下颌,具体使用哪款,取决于患者病情的严重程度。

## 种类
颞下颌关节疾病(连接颌骨和颅骨的滑动铰链功能障碍)的患者需要硬质的Night Guard。它们由一种非柔韧的刚性丙烯酸材料热成型,可将夹板保持在适当的位置,并将牙齿保持在正确的位置。坚固的夜间防护装置为最严重的牙齿咬牙和磨牙症提供保护。

柔软的Night Guard是大多数轻微的咬牙和磨牙症病例的最佳选择。它们佩戴舒适,可有效治疗下巴疼痛、酸痛和头痛等疾病。

## 功能
Night Guard是修复的关键
修复体是复杂而昂贵的程序,对牙齿健康至关重要。Night Guard确保这项工作是持久的,防止了治疗后期的不良趋势,并减少了随着时间的推移进行修复的需要。对患者的好处是,Night Guard是他们护理的一种具有成本效益的预防性补充。

Night Guard是一种多用途工具
Night Guard可以帮助缓解许多健康问题,包括睡眠困难、偏头痛、头痛、下巴疼痛问题和夜间充血。咬牙和磨牙通常是这些疾病背后的罪魁祸首, 而Night Guard可以产生显着影响,从而显着改善舒适度和整体健康状况。

## 权衡

在材料方面,牙医了解并熟悉软、硬两种质地,质地的选择伴随着不可避免的权衡。与硬质Night Guard相比,软质Night Guard更舒适,但不能有效承受力,并且更需要更换。但软质的柔韧会让患者更倾向握紧和咀嚼。

9 changes: 8 additions & 1 deletion cg/dental/tooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,11 @@
- Z轴:垂直于牙槽嵴平面,通常代表牙齿的垂直移动方向(如伸长或压低)
- X轴:平行于牙槽嵴平面,代表牙齿的近远中移动方向(如向前或向后移动)
- Y轴:垂直于X轴和Z轴,代表牙齿的颊舌向移动(如唇向或舌向移动)


## 美学

- [前牙美学标准](https://mp.weixin.qq.com/s/BWKfHP8vAqO-QeATLjYyeA)

## JawBone

- [Human Jawbones Collection Yellow参考,有纹理的渲染效果](https://www.turbosquid.com/3d-models/3d-model-human-jawbones-collection-yellow-4-models-1752186)
1 change: 1 addition & 0 deletions cg/geometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
- [计算几何第四周:维诺图](https://zhuanlan.zhihu.com/p/33896575)
- [Lattice学习笔记01:格的简介](https://zhuanlan.zhihu.com/p/161411204)
- [How to make an infinite grid无限网格](http://asliceofrendering.com/scene%20helper/2020/01/05/InfiniteGrid/)
- [Geometric Deep Learning for Computer-Aided Design: A Survey探讨了大数据模型下的CAD](https://arxiv.org/abs/2402.17695)

- [Macad|3D is a free and open-source 3D construction program which implements easy-to-handle workflows specific to the model making hobbyist. Macad|3D is mainly based on the technologies .Net, C#, C++/CLI and OpenCASCADE Technology (OCCT). ](https://github.com/Macad3D/Macad3D)
12 changes: 12 additions & 0 deletions cg/lighting/light.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Light灯光

## PointLight

PointLight是一种从特定点向所有方向发射光线的光源类型,类似于现实生活中的白炽灯

点光源的数学原理主要涉及到光线的发射、衰减以及对场景中物体的照明效果

点光源的数学模型通常基于光的发射和衰减原理,其中光线的衰减可以通过反平方定律(inverse square law)来描述,即光的强度与距离的平方成反比。
- 距离(distance):点光源有一个影响范围,即distance属性,它定义了点光源可以照射多远。如果物体距离点光源超过这个距离,将不会受到点光源的影响
- 衰减(decay):点光源的衰减属性定义了光线随着距离增加而减弱的速率。衰减度的值可以设置为1或2,其中2可以模拟现实中的光照衰减效果
- 阴影(shadows):点光源可以产生阴影,为场景中的物体增加逼真的阴影效果。要启用点光源的阴影功能,需要将castShadow属性设置为true,并为场景中的接收阴影的物体设置receiveShadow属性为true
20 changes: 19 additions & 1 deletion cg/threejs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
- [乱记](/cg/threejs/threejs.md)
- [Bump map](/cg/threejs/bumpmap.md)
- [RayCaster](/cg/threejs/raycaster.md)
- [Loader细节](/cg/threejs/loader.md)
- [模型-导入-导出](/cg/threejs/model.md)
- [Grid实现](/cg/threejs/grid.md)
- [shader](/cg/threejs/shader.md)
- [material材质](/cg/threejs/material.md)
- [灯光](/cg/lighting/light.md)
- [数学相关](/cg/threejs/math.md)
- [灯光](/cg/tools/camera.md)

## 参考

- [退火算法的模拟](https://github.com/algorithmx/WiresSA/blob/main/wires.html)
- [模拟的原神启动](https://github.com/gamemcu/www-genshin)
- [其官网显示“我们致力于创造令人惊叹的用户体验”, 目前看到其B站上的效果真的很amazing](https://gamemcu.com/)
- [一个模拟PC桌面的个人网站,可以参考](https://henryheffernan.com/)
Expand All @@ -23,3 +26,18 @@
- [THREE.js rendering order渲染顺序](https://segmentfault.com/a/1190000041221932/en)
- [A camera control for three.js, similar to THREE.OrbitControls yet supports smooth transitions and more features. ](https://github.com/lmj01/camera-controls)

### threejs discourse
- [perlin noise v2,效果看起来非常舒服](https://codepen.io/vcomics/pen/RwQgXzv)
- [Shaky / Jumpy - Camera Interpolation Along Curve](https://discourse.threejs.org/t/shaky-jumpy-camera-interpolation-along-curve/52278/2)
- [Extruded tube with holes相机跟着视角变化,钻洞的效果](https://codepen.io/boytchev/pen/poxpGZN)


### 成熟的框架

- [3D framework for Svelte ](https://github.com/threlte/threlte)

- [A React renderer for Three.js ](https://github.com/pmndrs/react-three-fiber)
- [three.js example里面的封装](https://github.com/pmndrs/three-stdlib)

- [Web framework for building virtual reality experiences. ](https://github.com/aframevr/aframe)
- [github super-three的定制版](https://github.com/supermedium/three.js)
18 changes: 0 additions & 18 deletions cg/threejs/loader.md

This file was deleted.

6 changes: 6 additions & 0 deletions cg/threejs/material.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## linear workflow

是指any sRGB input colors (as found in most textures, color pickers, CSS, and HTML) are converted from sRGB to a linear working color space for rendering, and the rendered image is converted back to sRGB for display,即输入的sRGB要转换为线性的方便渲染,渲染后的图像要转换回sRGB给显示。

- 在引起内部的计算都是线性的,输入的sRGB需要转线性
- 渲染后的图像,输出时都是sRGB的,便于格式的交换和显示

在r152中引入这个概念,

- [The Importance of Being Linear](https://developer.nvidia.com/gpugems/gpugems3/part-iv-image-effects/chapter-24-importance-being-linear)
Expand All @@ -12,6 +17,7 @@
- [Shadow and color problems going from v64 to v161](https://discourse.threejs.org/t/shadow-and-color-problems-going-from-v64-to-v161/61640)



```js
```

Expand Down
42 changes: 42 additions & 0 deletions cg/threejs/model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 数据加载

## 导入

- Loader

相对路径为src\loaders\Loader.js,LoadingManager两个类管理封装了基础接口
继承的加载器需要实现两个接口,一个是请求,一个是解析
```js
XXXLoader extends Loader {
load(url, onLoad, onProgress, onError) {

}
parse(data) {

}
}
```
LoadingManager是一个独立封装的,类似一个函数,全部在constructor中实现,至少用了class的语法

## 导出

### JSON
导出当前内存的对象为JSON文件
```js
/**
* 使用方法,传入
* str JSON.stringify(scene.toJSON())
*/
(function(str, type, filename){
const encode = new TextEncoder();
const blob = new Blob([encode.encode(str)]);
const url = window.URL.createObjectURL(blob, {type: type || 'application/octet-stream'});
const tagA = document.createElement('a');
tagA.href = url;
tagA.download = filename || 'raw.dat';
tagA.click();
window.URL.revokeObjectURL(url);
})();
```


31 changes: 27 additions & 4 deletions cg/threejs/use.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
# 问题集

## 2024-8-6
## render view with offset

2024-8-16

一直知道可以一个画布可以绘制多个区域,每个区域还能配置各种的内容。但是如何实现的一直没有让我明白透彻!

在multiple views例子中,注意bottom是从下往上设置的

## grid with plane

2024-8-6

看到的grid绘制,但是不是使用threejs自带的控制器,这些控制器不是改变物体,而是改变camera的位置和朝向。

这样使用多个renderTarget来合成单个图像,就存在一个显示问题,鼠标操作的应该是object对象的移动,而不是camera的移动。

## 2024-7-30
## camera

### light

2024-8-27

- pointLight跟着camera走,就是把执行add到camera中,并执行camera.updateMatrixWorld()更新
- 但camera必须也在scene中,scene.add(camera),不加进去也不会有灯光效果
- 此时的control居然不卡顿啦!
- [Adding Controls to each element](https://threejs.org/manual/?q=canvase#en/multiple-scenes) 这里说明了加入scene.add(camera), camera.add(light)的目的,就是为了跟着视角走,确保视角正向就是就是光照的方向

### perspective & orthographic camera switch

2024-7-30

正交与透视camera的切换,且场景的大小不能改变!
之前项目中的代码看不出什么逻辑上的设置,现在就是从透视到正交切换时,缩放差异很大,
Expand All @@ -28,13 +51,13 @@ camera的近远曲线的趋势。
![投影切换](/images/cg/switch-persp-ortho.png "Switch persp to ortho and ortho to persp")
![log graph](/images/cg/desmos-graph-log.svg "log graph")

## 2024-7-19
## flickering

接手公司项目时,使用他们的代码拷贝过来,产生了一个问题,就是渲染时牙龈边沿处的跳动。

牙龈根据牙齿数据来生成,目前存在牙龈穿过牙齿的现象。

### flickering
### 2024-7-19

渲染边沿出现跳动flicker的现象通常由几个常见的原因组成
- z-fighting, 是webgl常见的问题,当两个表面或多个表面非常接近时,它们的深度值可能会重叠,导致在渲染时不知道切换那个表面,可以增加一个偏移来避免
Expand Down
27 changes: 27 additions & 0 deletions cg/tools/camera.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Camera


## 插值

要实现缩放动画并应用插值,修改camera的以下属性值,并逐步更新这些值就形成了动画的缩放
- fov(视场角,对于透视相机
- zoom(缩放级别,对于正交相机)属性

- Zooming and changing the FOV is the same thing, but they are very different to getting near/far.

## dolly zoom
What is the dolly zoom? Also known as the contra zoom or Vertigo shot (as it was first used to magnificent effect by Alfred Hitchcock in his 1958 thriller film Vertigo), the dolly zoom is a camera movement that's quick yet effective at disorienting viewers.

Dolly-Zoom,也被称为“Vertigo effect”或“zolly”,是一种电影拍摄技巧,通过同时进行推拉镜头和改变镜头焦距来保持画面中主体的尺寸不变,从而在背景上产生一种扭曲的视觉效果,这种效果可以创造出一种令人迷惑的感觉。这种技术经常被用来在视觉上表现角色的心理状态,比如突然的领悟、震惊或恐惧感

Dolly-Zoom一般分为两种类型:

- 外退内进(Dolly-out & Zoom-in):摄像机往后退,同时焦距往前进,使得背景看起来逐渐变大,而主体大小保持不变。
- 外进内退(Dolly-in & Zoom-out):摄像机往前进,同时焦距往后退,使得背景看起来逐渐变小,同样主体大小保持不变。


实现Dolly-Zoom效果,需要保存开始缩放时物体位置处的frustum高度,然后随着相机的移动,找到新的距离,并调整FOV以保持物体在物体位置处的相同高度,这样就可以实现Dolly-Zoom效果

## 参考

- [The Dolly Zoom Effect, Explained (And 7 Examples in Movies)](https://whatnerd.com/contra-zoom-film-technique-explained-examples/)
6 changes: 5 additions & 1 deletion cg/tools/curve.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ Catmull-Rom样条线是由四个控制点p0,p1,p2,p3定义的插值样条曲线

[Physically-Based Facial Modeling, Analysis, and Animation](https://web.cs.ucla.edu/~dt/papers/vca90/vca90.pdf)

- [Implementation of my HPG2020 paper: Quadratic Approximation of Cubic Curves ](https://github.com/ttnghia/QuadraticApproximation)
- [Implementation of my HPG2020 paper: Quadratic Approximation of Cubic Curves ](https://github.com/ttnghia/QuadraticApproximation)

- [Modeling 3D Curves of Minimal Energy荷兰埃因霍芬理工大学的Veltkamp与Wesselink]()
- [基于最小能量理论的曲线构造](https://mp.weixin.qq.com/s/UI6xDWl3g5Yik3HkhCtQ5Q)
- [能量优化法曲线拟合](https://mp.weixin.qq.com/s/5crb2OO-_WruPMmDy0aXhg)
7 changes: 6 additions & 1 deletion cg/tools/webgl.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@

## [WebGL API](https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API)

[Rendering algorithms implemented in raw WebGL 2](https://github.com/tsherif/webgl2examples)
[Rendering algorithms implemented in raw WebGL 2](https://github.com/tsherif/webgl2examples)

## 参考

- [Rendering & Art](http://www.artvily.com/)
- [github voxweb3d High Performence WebGL 3D Engine System(Env: PC/Mobile) ](https://github.com/vilyLei/voxweb3d)
4 changes: 4 additions & 0 deletions cg/ui.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@
- [IUP is a multi-platform toolkit for building graphical user interfaces. It offers a simple API in three basic languages: C, Lua and LED. IUP's purpose is to allow a program source code to be compiled in different systems without any modification.](https://www.tecgraf.puc-rio.br/iup/)
- [Nuklear is a minimal-state, immediate-mode graphical user interface toolkit written in ANSI C and licensed under public domain. It was designed as a simple embeddable user interface for application and does not have any dependencies, a default render backend or OS window/input handling but instead provides a highly modular, library-based approach, with simple input state for input and draw commands describing primitive shapes as output.](https://github.com/Immediate-Mode-UI/Nuklear)
- [CopperSpice is a set of individual libraries which can be used to develop cross platform software applications in C++.](../cg/library/copperspice.md)

## JS

- [Compact GUI for fine-tuning parameters and monitoring value changes 比dat.GUI更舒服的库](https://github.com/cocopon/tweakpane)
2 changes: 2 additions & 0 deletions cpl/js/lmj.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// 2024-8-20
const q2in2024 = {
p: [
0.15,
Expand Down Expand Up @@ -83,4 +84,5 @@ function toScroe(data) {
}, 0)
}

// total -- [ 85.5, 78.5, 69.25999999999999 ]
console.log('total -- ', arrayList.map(e=>toScroe(e)));
24 changes: 24 additions & 0 deletions exercises/book-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Book-Info

- [物理科学和技术中使用的数学符号](https://std.samr.gov.cn/gb/search/gbDetailed?id=71F772D812E4D3A7E05397BE0A0AB82A)
- [pdf](https://journal.cricaas.com.cn/attached/file/20210517/20210517161953_566.pdf)

## 线性代数

- [Serge Lang《linear algebra》](https://book.douban.com/subject/2314300/)

## 分析

- [Walter Rudin《Principles of Mathematical Analysis》(数学分析原理)](https://book.douban.com/subject/1230095/)
- 学习数学的学生的必读之作
- 在谈论实数和复数集时,使用几何语言通常很方便,然而应该清楚理解的是,证明不能基于几何直觉,尽管几何解释可能非常有助于暗示证明可能进行的步骤
- 大部分文本以定义、示例、定理、证明、推论为顺序,组织非常高效,同时给初学者困惑和迷茫的
- [Charles Chapman Pugh《Real Mathematical Analysis》(实数学分析)](https://book.douban.com/subject/26588474/)
- 很好的解释了概念或证明的本质,帮助建立直觉

## 概率论

- [Ross《a First Course in Probability》]()
- 不需要测度论知识,从可数或有限样本空间中来学习概率论
- [Rick Durrett《Probability: Theory and Examples》]()
- 概率论有左手和右手。左手是使用测度论工具进行的严谨的基础工作。右手‘以概率方式思考’,将问题简化为赌博情况、抛硬币和物理粒子的运动。
5 changes: 5 additions & 0 deletions exercises/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## 数学

- [相关推荐的书籍](/exercises/book-info.md)

- [数学](/exercises/math.md)
- [小学数学](/exercises/math.primary.md)
- [初中数学](/exercises/math.secondary.md)
Expand All @@ -16,6 +18,7 @@
- [几何](/exercises/geometry.md)
- [线性代数](/exercises/linear.algebra.md)
- [多项式](/exercises/polynomial.md)
- [概率与统计](/exercises/probability.statistics.md)

## 物理学

Expand All @@ -26,6 +29,8 @@
- [Wolfram MathWorld](https://mathworld.wolfram.com/)
- [提供各种数学问题的交互式解法和动画](https://www.cut-the-knot.org/)
- [图形计算器,用[email protected]登录的](https://www.desmos.com/calculator?lang=zh-CN)
- [math is fun](https://www.mathsisfun.com/)
- [数学乐-中文版](https://www.shuxuele.com/index.html)

<details>
<summary>Geogebra开源在线工具</summary>
Expand Down
11 changes: 11 additions & 0 deletions exercises/math.secondary.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ $e^{\pi i} + 1 = 0 \to e^{\pi i} = -1$

## 几何

<details>
<summary>2024-8-23塞瓦定理</summary>

- [一个很哇塞的定理 ](https://mp.weixin.qq.com/s/teDnXG-v53GHxvdlrND-DA)

你有没有发现这样一个现象:三角形的三条高线(或其延长线)、三条角平分线、三条中线都会分别交于一点。你可以试着画出各种不同三角形的高线(或其延长线)、角平分线、中线,会发现无论什么样的三角形,它的三条高线(或其延长线)都会交于同一个点,角平分线和中线也是如此。

“塞瓦定理”记录在塞瓦(Giovanni Ceva,1648~1734,意大利水利工程师,数学家)于1678年发表的《直线论》一书中。“塞瓦定理”是塞瓦的重大发现,因此后世以他的名字来命名,将其称为“塞瓦定理”。

</details>

<details>
<summary>2024-5-33初三模拟习题</summary>

Expand Down
Loading

0 comments on commit 6fa0184

Please sign in to comment.