Declare Point Class

Point는 기본적으로 쓰이는 기능이다. 모든 Cartesian에서 Point는 반드시 필요하다.
Point는 다음과 같이 정의한다.
Declare 2D Point Template Class
 template < typename _tx >
 class Point2
 {
 public:
 typedef _tx valuetype;
 union { struct {_tx x,y;} _tx _m[2]; }
 public:
 Point2() : x(0),y(0)
 Point2(IN _tx _x, IN _tx _y) : x(_x),y(_y)
 } ;
Declare 3D Point Template Class
 template < typename _tx > class Point3 { public: union { struct {_tx x,y,z;} _tx _m[3]; } public: Point3() : x(0),y(0),z(0) Point3(IN _tx _x, IN _tx _y,IN _tx _z) : x(_x),y(_y),z(_z) } 
union을 사용한 이유는 Point를 사용할 때 x,y성분을 따로 쓰긴 하지만, 배열 형태로 사용할 수도 있다. 그래서 사용의 유연성을 확보하기 위하여 union을 기능을 사용한다.>

Posted by chungki

2009/07/23 11:18 2009/07/23 11:18
,
Response
No Trackback , No Comment
RSS :
http://www.chungki.net/tc/rss/response/278

Planar Fitting of 3D Points

he assumption is that the [Tex]z-[/Tex]component of the data is functionally dependent on the [Tex]x-[/Tex] and [Tex]y-[/Tex]components.
Given a set of samples [Tex]{(x_{i}, y_{i}, z_{i})}_{i=1}^{m} [/Tex], determine A, B, and C so that the plane [Tex] z= Ax+By+C [/Tex] best fits
the samples in the sense that the sum of the squared errors between the zi and the plane values [Tex] Ax+By+C [/Tex] is minimized.
Note that the error is measured only in the z-direction.
Define [Tex]E(A,B,C) = \sum_{i=1}^{m}[(Ax_{i} + By_{i} + C) − z_{i}]^{2}[/Tex]. This function is nonnegative and its graph is a hyper-paraboloid whose vertex occurs when the gradient satistfies ∇E = (0, 0, 0). This leads to a system of three linear equations in A, B, and C which can be easily solved. Precisely,

[TEX](0,0,0)=\nabla E=2\sum_{i=1}^{m}[(Ax_{i}+By_{i}+C_{i})-z_{i}](x_{i},y_{i},1)[/TEX]

사용자 삽입 이미지
The solution provides the least squares solution [Tex] Z=Ax+By+C [/Tex]

Posted by chungki

2009/07/16 21:09 2009/07/16 21:09
Response
A trackback , a comment
RSS :
http://www.chungki.net/tc/rss/response/277

Wigned Edge

* Pseudo Code
class WEPoint
{
     double x,y,z;
};

class WEFace
{
     class Edge* pEdge;
};

class Edge
{

     WEPoint*   Start;
     WEPoint*   End;

     Edge*   Prev;
     Edge*   Next;
     Edge*   Symmetry;

     WEFace*   Face;
};



사용자 삽입 이미지



* Bond two polygon
  1. v1,v8과 동일한 x,y,z를 가지고 있는 v9를 생성한다.
    사용자 삽입 이미지
  2. v2,v7과 동일한 x,y,z를 가지고 있는 v10을 생성한다.
  3. e1의 Start, End를 v9,10으로 설정한다.
  4. e8의 Start, End를 v10,v9로 설정한다.
  5. e4의 End Point를 v9로 설정한다.
  6. e2의 Start Point를 v10으로 설정한다.
  7. e9의 Start Point를 v9로 설정한다.
  8. e7의  End Point를 v10으로 설정한다.
  9. e1의 Symmetry를 e8로 e8의 Symmetry를 e1으로 설정한다








Posted by chungki

2009/06/22 14:31 2009/06/22 14:31
Response
No Trackback , No Comment
RSS :
http://www.chungki.net/tc/rss/response/275

Geometry 관련 링크

http://darkblitz.tistory.com/tag/geome ··· 0archive

Posted by chungki

2009/06/15 12:19 2009/06/15 12:19
Response
No Trackback , No Comment
RSS :
http://www.chungki.net/tc/rss/response/272

Geometry 분류

analytical geometry 해석기하학

descriptive geometry 도형 기하학

Euclidean geometry 유클리드 기하학

plane geometry 평면 기하학

projective geometry 사영 기하학

solid geometry 입체 기하

three-dimensional geometry 3차원 기하


 

Posted by chungki

2009/03/19 11:37 2009/03/19 11:37
Response
No Trackback , No Comment
RSS :
http://www.chungki.net/tc/rss/response/271

기본타입 정의

전에 Quark라는 이름으로 SDK를 개발할려고 했는데 inomer로 바꾸었다.

이 SDK는 범용적으로 만들고 싶지만 너무 양이 많기 때문에 일단 GIS용 2D/3D개발용을 위한 SDK를 목표로 한다.

제일 기본적인 타입을 정의한다.

구조체는 "io_"를 접두사로 이름을 정의하며 클래스는 "io"를 접두사로 이름을 정의한다.
구조체에는 데이터변수외에 절대 함수는 들어가면 안된다.

템플릿의 경우는 "iot_" 혹은 "iot"라는 접두사를 붙인다.


 

typedef char   ioS8; typedef unsigned char ioU8; typedef short   ioS16; typedef unsigned short ioU16; typedef int    ioS32; typedef unsigned int ioU32; typedef float   ioF32; typedef double   ioF64;

typedef char   ioCHAR; typedef unsigned char ioUCHAR; typedef short   ioSHORT; typedef unsigned short ioUSHORT; typedef int    ioINT; typedef unsigned int ioUINT; typedef long   ioLONG; typedef unsigned long ioULONG; typedef float   ioFLOAT; typedef double   ioDOUBLE;

typedef ioU32   ioSIZET; typedef ioU32   ioCOUNT; typedef ioU32   ioPARAM; typedef void*   ioHANDLE;

Posted by chungki

2006/12/01 17:43 2006/12/01 17:43
Response
No Trackback , No Comment
RSS :
http://www.chungki.net/tc/rss/response/237


블로그 이미지

Nice !!!!!!!!

- chungki

Notices

Archives

Authors

  1. chungki

Calendar

«   2012/05   »
    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 29 30 31    

Site Stats

Total hits:
73374
Today:
5
Yesterday:
20