CMyDoc::CMyDoc()
{
	//======  
	double	pi = 4. * atan(1.),
			a1 = pi / 10., 		// 
			a2 = 3. * a1,
			//====== 2  
			x1 = cos(a1),
			y1 = sin(a1),	
			x2 = cos(a2),
			y2 = sin(a2),
			x[5], y[5];
	
	//=====  (World)   
	//===== ,    
	//=====    
	x[0] = 0.;		y[0] = 1.;		//  	
	x[1] = -x2;		y[1] = -y2;		//   
	x[2] = x1;		y[2] = y1;		//   
	x[3] = -x1;		y[3] = y1;		//   
	x[4] = x2;		y[4] = -y2;		//   
	
	//=====    
	//=====   
	for (int i=0; i<5; i++)
	{
		//=====     
		//   100 ,     		
		CPoint pt(200 + int(100. * x[i]),
					150 - int(100. * y[i]));
		//====    
		m_Points.push_back(pt);
	}
}


void CMyView::OnDraw(CDC* pDC)
{
	CMyDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	
	//=======    
	UINT nPoints = pDoc->m_Points.size();

	//======= ,   
	if (!nPoints)
		return;
	
	//     ( GDI)
	pDC->SaveDC();

	//   Windows    
	CPen pen (PS_SOLID,2,RGB(0,96,0));

	//=====     
	pDC->SelectObject (&pen);
	
	//===   Windows    
	CBrush brush (RGB(240,255,250));
	pDC->SelectObject (&brush);

	//=====  
	pDC->Polygon (&pDoc->m_Points[0], nPoints);
	
	//   (  GDI)
	pDC->RestoreDC(-1);
}


//======    STL
#include <vector>
//======     STL
using namespace std;
