I have the 5 points of a star calculated as follows:
Now I want this star to be centered at a point given by m_ptCenter.Code:// Calculate the outer points of the star for(int i = 0; i < m_nPoints; i++) { m_dAngle += m_dTheta; int X = (int)(m_dRadius * cos(m_dAngle)); int Y = (int)(m_dRadius * sin(m_dAngle)); m_ptsOuter[i].x = X; m_ptsOuter[i].y = Y; }
How can I move the points defined in m_ptsOuter to be centered on m_ptCenter?
Mike B




Reply With Quote