| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- HTML
- CSS
- FRunnableThread
- render target
- unreal visual studio
- FRunnable
- page dot
- scroll-snap
- render target2d
- unreal c++ #unreal #unreal build #unreal
- unreal niagara
- unreal compute shader #unreal niagara #unreal #compute shader #unreal niagara with compute shader
- Unreal
- texture render target
- kanban
- niagara.pdb 로드되지 않음
- HLSL
- Agile 게임 개발
- IntersectionObserver
- Compute Shader
- unreal niagara with compute shader
- Riot Games
- unreal compute shader
- League of Legend
- hlsl with unreal
- jquery
- carousel indicator
- visual studio integration tool 상태
- Game Developement
- JavaScript
Archives
- Today
- Total
Nephrite21
피보나치 스피어 -> 구면 상에 n개의 입자를 배치. 본문
구면 상에 균일 분포로 입자를 배치할 때 사용하기 좋은 알고리즘이 있다
피보나치 스피어이다.
const cos = Math.cos, sin = Math.sin, asin = Math.asin, sqrt = Math.sqrt;
const M_PI = Math.PI;
function fibonacci_spiral_sphere(num_points) {
const goldenRatio = (sqrt(5.0) + 1.0) / 2.0; // golden ratio = 1.6180339887498948482
const goldenAngle = (2.0 - goldenRatio) * (2.0 * M_PI); // golden angle = 2.39996322972865332
let points = [];
let lat, lon;
let x, y, z;
for (let i=1; i <= num_points; ++i) {
lat = asin(-1.0 + 2.0 * (i / (num_points+1)));
lon = goldenAngle * i;
x = cos(lon)*cos(lat);
y = sin(lon)*cos(lat);
z = sin(lat);
points.push(x, y, z);
}
return points;
}
구의 표면에 점들을 균등하게 분포시키는 방법 (Three.js)
구면 상에 점들을 고르게 분포시키는 문제는 기하학에서 고전적인 문제 중 하나이며, 컴퓨터 그래픽, 분자 모델링, 물리학 등 다양한 분야에서 활용됩니다. 실용적으로 가장 적절한 방법 중 하
3dcodekits.tistory.com
lon이 위에서 내려다보았을 때 회전 각도이고, lat이 중심에서 떨어져있는 정도를 asin을 통해서 생성하는 내용이다.
피보나치 형태로 이파리가 나는 나무처럼 쌓아올리는 것. 여기서 중심축과 멀리떨어진 정도를 lat을 통해서 정하는 것.
