Spline Curve (Bezier Curve, B-Spline Curve)

이미지
Spline Curve (Bezier Curve, B-Spline Curve) B-Spline Curve를 공부하면서 알아봤던 내용을 정리   SNU open courseware에서 이규열 교수님의 ' Computer-Aided Ship Design ' 수업자료를 참고하여 Curve 및 Surface에 대해 알아보았다. Bezier Curves  우선 아래의 자료들이 Bezier Curve에 대해 직관적으로 가장 잘 설명한 것 같다. (모두 같은 blog) 중학생도 알 수 있는 베지에 곡선 프런트엔드 엔지니어를 위한 베지에 곡선(Bezier Curves) - 1편 프런트엔드 엔지니어를 위한 베지에 곡선(Bezier Curves) - 2편 프런트엔드 엔지니어를 위한 베지에 곡선(Bezier Curves) - 3편   Bezier Curve는 매개변수 방정식을 이용하여 곡선을 표현한다. Cubic Bezier Curve (3차 Bezier Curve)  Control point가 많은 다차원 곡면을 표현할 때, 한번에 나타내는 것이 아니라 여러개의 spline을 연결하는 방식으로 표현한다. 이 때, Cubic Bezier Curve로 기초삼을 수 있다. The cubic Bezier curve of form: $$ \mathbf{r}(t) = B^3_0(t)\mathbf{b}_0 + B^3_1(t)\mathbf{b}_1 + B^3_2(t)\mathbf{b}_2 + B^3_3(t)\mathbf{b}_3 . $$ $$ (\text{or  }\\\\ \mathbf{r}(t) = (1-t)^3\mathbf{b}_0 + 3(1-t)^2t\mathbf{b}_1 + 3(1-t)t^2\mathbf{b}_2 + t^3\mathbf{b}_3) $$ All in...

Surface Entities and Complex Entity Instance at STEP-file

Surface Entities and Complex Entity Instance at STEP-file  Fusion360, MFCAD, SAMSUNG전자 및 내가 FreeCAD를 통해 직접 그린 형상을 기준으로 정리하였다. Entities of Curve Hierarchy of Curve  편의상 사용되는 Curve들만 정리 Line Conic Circle Ellipse Bounded Curve B-Spline Curve with Knots   Explanation of each entities and ideas to create edge feature for curve related entities Line: Start point, End point Circle: Start point, Center point, Radius, End point Ellipse: Start point, Center point, Radius1, Radius2, End point B-Spline Curve with Knots: Start point, [list of control points], [list of knot multiplicity], [list of knots], End point Entities of Surface Hierarchy of Surface Elementary Surface plane, cylindrical_surface, conical_surface, spherical_surface, toroidal_surface Swept Sur...

Delete unnecessary entities at STEP-file

Method of Deleting Unnecessary Entities Delete unnecessary entities at STEP-file for creating FAG(Face Adjacency Graph) \begin{algorithm} \caption{Delete Unnecessary Entity} \begin{algorithmic} \FUNCTION{FindEdges}{entities} \FOR{each entity in the STEP-file} \IF{entity is CLOSED\_SHELL} \FOR{ref. entities in the CLOSED\_SHELL} \State \Comment{Every ref. entities in CLOSED\_SHELL are ADVANCED\_FACE} \FOR{ref. entities of second attribute} \State \Comment{Every second ref. entities are FACE\_BOUND or FACE\_OUTER\_BOUND} \State go to EDGE\_LOOP through ref. entity \FOR{ref. entities of EDGE\_LOOP} \State \Comment{Every ref. entities are ORIENTED\_EDGE} \State go to ORIENTED\_EDGE's ref. entity \State save the instance name '\#N' \ENDFOR \ENDFOR \ENDFOR \ENDIF \ENDFOR \State remove duplicated instance name \Return instance list of EDGE\_...

STEP-file에서 면 위치, edge 관련 entity에 대한 고찰

이미지
STEP-file에서 면 위치에 대한 고찰   STEP-file을 Graph \(G(V,E)\)로 표현하여, Node에 face관련 attribute들을 부여하는 과정에서 face 위치 정보 및 face 관련된 vector값을 얻는데 문제가 생겼다. Figure 1. 가로, 세로, 높이가인 (5, 10, 15)인 단순한 block  Figure 1과 같이 ADVANCED_FACE의 두 번째 attribute이 face의 geometry 정보를 제대로 담고 있을 줄 알았는데, 예상했던 정보를 담고 있지 못 했다. STEP-file의 hierarchy 를 보면 AXIS2_PLACEMENT_3D가 있는데, 해당 entity가 face의 위치 및 surface normal과 같은 정보를 담고 있는 방식이 내 생각과는 차이가 있었다. 같은 형상을 다른 방식으로도 그려본 결과, AXIS2_PLACEMENT_3D는 그려진 방식에 따라서 face의 기준 원점을 나타내는데 차이가 있었고 면이 향하는 방향(Z)도 달랐다. ADVANCED_FACE의 두 번째 attribute을 통해 얻을 수 있는 정보는 face의 타입(PLAN, CYLINDRICAL SURFACE 등) 정도 일 것 같다. STEP-file을 \(G(V,E)\)로 나타낼 때 대부분의 유의미한 정보는 edge들을 통해 얻을 것 같다.  AXIS2_PLACEMENT_3D가 나타내는 위치를 바꿔봄으로써 어떤 영향을 미치는지 알아본 결과, 값을 극단적으로 바꾸어도 (적어도 FreeCAD에서는) 오류없이 원래 형상을 불러올 수 있었다. 단, PLANE entity를 지웠을 때는 해당 면이 사라졌다.   Edge 관련 entity에 대한 고찰 의문점  STEP-file의 EDGE_CURVE는 vertex start point, vertex end point, edge_geometry 정보를 참조한다. 여기서 edge_ge...

PCURVE란

이미지
STEP-file을 뜯어보던 중, 'PCURVE'라는 entity가 나와 매우 간단히 정리 Surface의 basis를 이루는 curve. Surface의 parameter space에 의해 정의된다. 아래 그림과 같이 경계가 있는 surface를 3차원 공간 상에서 나타낼 때, surface를 u, v parameter를 통해 2차원으로 사영시켜 표현할 수 있다. Basis curve는 오직 surface의 parametric range의 범위 안에서 정의될 수 있다. Reference - https://standards.buildingsmart.org/IFC/DEV/IFC4_3/RC1/HTML/schema/ifcgeometryresource/lexical/ifcpcurve.htm - https://knowledge.autodesk.com/support/powershape/learn-explore/caas/CloudHelp/cloudhelp/2019/ENU/PWRS-ReferenceHelp/files/GUID-068FF80A-2E04-422E-AB83-980A4D01CB54-htm.html

HTML에서 수식 입력, Pseudo code 작성

HTML에서 수식을 입력하는 방법과 Pseudo code를 작성할 수 있는 방법 MathJax에서 유용한 TEX 명령어 Glossary 정리가 매우 잘 되어있는 것 같다. 자주 참고해서 보는 중이다 MathJax 사용은 아래 스클립트를 최상단에 입력하여 사용하고 있다. <script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"> </script>   html에서 pseudocode를 입력할 수 있는 방법 나의 경우, pseudo code 입력은 위의 링크에서 'Step 2'와 'Step 4'를 html에 추가해서 입력하고 있다. <pre id="id_name" style="display:hidden;"> 안에 있는 속성 중 id="id_name" 와 <script> ... </script> 안의 document.getElementById("id_name") 이름이 같아야 함.

Basic Income (21세기 기본소득)

 5장 윤리적으로 정당화할 수 있는가?