43 #include <visp/vpSphere.h>
44 #include <visp/vpFeatureDisplay.h>
65 const double Z0,
const double R)
88 const double Z0,
const double R)
115 double s, a, b, r, e;
122 s = r*r - y0*y0 -z0*z0;
130 if ((s = z0*z0 - r*r) < 0.0)
143 if ((a = x0*x0 + y0*y0 + z0*z0 - r*r) < 0.0)
166 B = r*sqrt(y0*y0+z0*z0-r*r)/s;
169 p_[2] = ( A*A + B*B * E*E) / (1.0 + E*E);
170 p_[3] = ( A*A - B*B) * E / (1.0 + E*E);
171 p_[4] = ( B*B + A*A * E*E) / (1.0 + E*E);
190 x0 = cMo[0][0]*
oP[0] + cMo[0][1]*
oP[1] + cMo[0][2]*
oP[2] + cMo[0][3];
191 y0 = cMo[1][0]*
oP[0] + cMo[1][1]*
oP[1] + cMo[1][2]*
oP[2] + cMo[1][3];
192 z0 = cMo[2][0]*
oP[0] + cMo[2][1]*
oP[1] + cMo[2][2]*
oP[2] + cMo[2][3];
215 const unsigned int thickness)
221 cam, I, color, thickness) ;
230 const unsigned int thickness)
233 cam, I, color, thickness) ;
static void displayEllipse(double x, double y, double mu20, double mu11, double m02, const vpCameraParameters &cam, const vpImage< unsigned char > &I, const vpColor &color=vpColor::green, unsigned int thickness=1)
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP)
Perspective projection of the circle.
vpSphere * duplicate() const
for memory issue (used by the vpServo class only)
Class to define colors available for display functionnalities.
Class that defines what is a sphere.
void setWorldCoordinates(const vpColVector &oP)
void projection()
perspective projection of the sphere
void display(const vpImage< unsigned char > &I, const vpCameraParameters &cam, const vpColor &color=vpColor::green, const unsigned int thickness=1)
Generic class defining intrinsic camera parameters.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void resize(const unsigned int i, const bool flagNullify=true)