rotating a vector using parametric equation of 3d circle
<p>I'm not getting the required output i.e x2,y2,z2 in below code. Here the angle t is in degree, (x2,y2,z2) is the pint of vector face after being rotated and (a2,b2,c2) is the direction cosine of the rotated vector.I used rviz to visualize the rotating vector but its not comming as thought i.e its not rotating.</p>

<pre><code>  double xgp[ipgp] = 23, ygp[ipgp] = 45, zgp[ipgp] = 345; int ipgp = 0;
       double a2, b2 , c2, a1, b1, c1 = ...
       double la = 0.0032;
       for(double t=0;t&lt;360;t+=la)
        {
            double x2 = xgp[ipgp]+a2*cos(t)+a1*sin(t);
            double y2 = ygp[ipgp]+b2*cos(t)+b1*sin(t);
            double z2 = zgp[ipgp]+c2*cos(t)+c1*sin(t);
            a2 = x2-xgp[ipgp];  // vector (xgp,ygp,zgp)-&gt;(x2,y2,z2)
            b2 = y2-ygp[ipgp];
            c2 = z2-zgp[ipgp];
            int i = round(sqrt(pow(a2,2)+pow(b2,2)+pow(c2,2)));
            std::cout&lt;&lt;i&lt;&lt;std::endl;
    }
</code></pre>