본문 바로가기

Computer125

곡률기반라인생성 DirectX & OpenGL Source Code 2010. 1. 14.
asdffffev Curvature Based Silhouette Rendering 1. Line Strip, 각 Point들의 Angle 얻기 그림 1 LineStrip and Angles 그림1에서 는, 라고 할 경우, 두 벡터 가 이루는 각은, 이다. 코드는, 그림1를 위 코드의 return 값을 Degree로 변경하여 출력한 결과이다. 2. Line Strip에 접하는 원 그림 2 LineStrip and Circle 그림2의 Line Strip은 3개의 Angle이 생기고 따라서 3개의 접하는 원을 얻을 수 있다. 그림 3 원의 접선 와 를 알고 있으므로 원의 반지름은, 이다. 원의 좌표에 대한 두 가지의 경우는 다음과 같다. 그림 4 CCW and CW Line Strip L이 L(A, B, C, D)로 구성되.. 2010. 1. 12.
NPR Line Drawing Hertzman, Curve Analogies, 13th Eurographics Workshop on Rendering, pp. 233-246(2002) Strassman, S., Hairy brushes, SIGGRAPH '86 Hsu, S.C., Skeletal Strokes, Proceeding of the 6th annual ACM symposium on User interface software and technology S. Saito, Curvature-based stroke rendering, Visual Comput (2008) 2010. 1. 10.
ID3DXRenderToSurface, IDirect3DSurface9 We can use 'ID3DXRenderToSurface' or 'IDirect3DSurface9" for Post Processing. but ID3DXRenderToSurface is slower than IDirect3DSurface9. //복구를 위해 저장해 둠. IDirect3DSurface9* pOldRT; gd3dDevice->GetRenderTarget(0, &pOldRT); //생성되어 있는 _pTarget(IDirect3DTexture9)의 surface를 얻어옴. IDirect3DSurface9* pTargetSurf; HR(_pTarget->GetSurfaceLevel(0, &pTargetSurf)); //렌더타켓 설정(_pTarget위에 그려지게됨) gd3dDevice->SetR.. 2009. 4. 17.