Project Notes

In the Regular_triangulation, from vertices iterator’s method “point()”, what we get is Weighted_point directly!

Then use point() and weight() functions to access the basic point and the weight.

For basic point, x(),y() and z() functions are used to access each coordinate.

Following code use the weighted points in regular triangulation to draw circles:

   1:  iVertexFinite pf=rt.finite_vertices_begin();
   2:  while(pf!=rt.finite_vertices_end())
   3:  {
   4:      //wp=pf->point();
   5:      cout<<"****"<<*pf<
  
  
   6:      Utility::drawCircle((pf->point()).point().x(),(pf->point()).point().y(),(pf->point()).weight());
   7:      ++pf;
   8:  }

 

About the include

In C++, usually I would like to put all the necessary header files in stdafx.h. However, if I include my own header files and in my own header file the stdafx.h is also needed, then there will come out some errors.

Remember to include just the system or other library headers in stdafx.h and include own own headers exactly where we need.

The glNewList

To use glCallList funciton to show the list graphics, we should first create a list using a list number.

Notice the number 0 should not be used as the list number. As in my project , I use enum type to enumerate all the list and the first list never shows. After I set the first enum constant to 1, then everything works ok.

No 0 for the display list.

Ball weight of the skin surface

To calculate the skin surface of the given set of weighted points, the first step is to shrink the radius of these balls by sqrt(2), which means to divide the weight by 2. Then all the triangulation, voronoi diagram, mixed cells and so on are based on these new balls!

Divide the weight by 2 firstly!

Oh, that is not needed!

 

Point in triangle test

http://www.blackpawn.com/texts/pointinpoly/default.html

 

Some CGAL functions

CGAL::do_intersect

CGAL::intersection

CGAL::Segment_2

CGAL::get_intersection_points

CGAL::Point_2

CGAL::bounded_side_2      point in polygon test

 

OpenGL 2D rotation

Rotate 2D in opengl, everything is rotated around the z axis!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值