세부 사항 :
상태 :
v0.1.4-alphaPep440을 따릅니다.
모든 패키지 : 릴리스
changelogPython 3.10, Windows 10에서 테스트
옥타브 노이즈에 대한 최적화
단위 테스트 작성
API 문서 작성
보류중인 문서 작성
Readthedocs 작성
블로깅
왼쪽 코드 인 코드 문서를 마무리합니다
치수 옥타브
스크린 샷 :










Python>=3.10.0 생산 종속성의 경우 요구 사항을 참조하십시오
개발 종속성의 경우 개발자 수용을 참조하십시오
$ pip install nPerlinNoise설치에 대한 자세한 지침은 설치를 참조하십시오.
설정
import NPerlinNoise as nPN 시도하십시오. >>> import nPerlinNoise as nPN
>>> noise = nPN.Noise( seed = 69420 )기본 사용
주어진 n 차원 좌표에서 노이즈 값을 얻습니다. noise(...) ,
좌표는 단일 값이거나 반복적 일 수 있습니다
소음 (..., l, m, n, ...)
여기서 l, m, n, ...은 단일 값입니다
>>> noise( 73 )
array(0.5207113, dtype=float32)
>>> noise( 73 , 11 , 7 )
array(0.5700986, dtype=float32)
>>> noise( 0 , 73 , 7 , 11 , 0 , 3 )
array(0.5222712, dtype=float32)노이즈 (...., [l1, l2, ..., lx], [m1, m2, ..., mx], [n1, n2, ..., nx], ....)
여기서 ....
>>> noise([ 73 , 49 ])
array([0.52071124, 0.6402224 ], dtype=float32)
>>> noise([ 73 , 49 ], [ 2 , 2 ])
array([0.4563121 , 0.63378346], dtype=float32)
>>> noise([[ 73 ], [ 49 ], [ 0 ]],
... [[ 2 ], [ 2 ], [ 2 ]],
... [[ 0 ], [ 1 ], [ 2 ]])
array([[0.4563121 ],
[0.6571784 ],
[0.16369209]], dtype=float32)
>>> noise([[ 1 , 2 ], [ 2 , 3 ]],
... [[ 1 , 1 ], [ 1 , 1 ]],
... [[ 2 , 2 ], [ 2 , 2 ]])
array([[0.08666219, 0.09778494],
[0.09778494, 0.14886124]], dtype=float32) noise(..., l, m, n, ...) 동일한 값이 동일합니다.
노이즈 (..., l, m, n) = 노이즈 (..., l, m, n, 0) = 소음 (..., l, m, n, 0, 0) = 노이즈 (..., l, m, n, 0, 0, ...)
>>> noise( 73 )
array(0.5207113, dtype=float32)
>>> noise( 73 , 0 )
array(0.5207113, dtype=float32)
>>> noise( 73 , 0 , 0 )
array(0.5207113, dtype=float32)
>>> noise( 73 , 0 , 0 , 0 , 0 )
array(0.5207113, dtype=float32) 그리드 모드는 모든 코드 조합에 대한 노이즈를 컴퓨팅 할 수 있습니다.
noise(..., gridMode=True) 그리드 모드는 키 워드 전용 인수, default = false입니다
출력은 해당 순서대로 코디의 길이와 동일합니다.
>>> noise([ 73 , 49 ], [ 2 , 2 ], [ 0 , 1 ], gridMode = True )
array([[[0.4563121 , 0.63378346],
[0.4563121 , 0.63378346]],
[[0.44594935, 0.6571784 ],
[0.44594935, 0.6571784 ]]], dtype=float32)
>>> noise([ 1 , 20 , 32 , 64 ], [ 1 , 1 , 2 ], 0 , [ 1 , 2 ], gridMode = True )
array([[[[0.06459193, 0.5110498 , 0.669962 , 0.47636804],
[0.06459193, 0.5110498 , 0.669962 , 0.47636804],
[0.09864856, 0.5013973 , 0.62935597, 0.47954425]]],
[[[0.07678645, 0.50853723, 0.6778991 , 0.4679888 ],
[0.07678645, 0.50853723, 0.6778991 , 0.4679888 ],
[0.14069612, 0.47582665, 0.6663638 , 0.48764956]]]],
dtype=float32)자세한 사용은 예를 참조하십시오
모든 테스트를 보려면 테스트를 참조하십시오
No Known BugsNPerlin.findBounds is bottlenecknoise(a, b, c, d, e, f, ...) is slow for single value coordinates질문, 우려 사항, 버그 보고서 등이있는 경우이 저장소의 문제 추적기에 문제를 제기 하거나이 저장소의 토론 섹션에서 토론을 열십시오.
Looking for Contributors for feature additionsLooking for Contributors for optimizationLooking for Contributors for unit testingLooking for Contributors for ReadTheDocsLooking for Contributors for WebAppLooking for Contributors for API docs기여 및 행동 강령에 대한 일반 지침
관리자 :
| Amith m |
기고자 :
| Shravan Revanna |