A set of images is produced (according to variable "steps") that you can view in biasviewwx as an animation.
#include <iostream>
#include <sstream>
#include <Base/Image/Image.hh>
#include <Base/Image/ImageIO.hh>
#include <Base/ImageUtils/ImageDraw.hh>
#include <Base/Geometry/HomgPoint2D.hh>
#include <Base/Geometry/HomgPoint3D.hh>
#include <Geometry/RMatrix.hh>
using namespace BIAS;
using namespace std;
int main(int argc, char** argv) {
unsigned int steps = 90;
unsigned char bgCol[] = {127, 0, 127};
std::vector<unsigned char> red, green, blue, white, gray, none;
red.push_back(255);
red.push_back(0);
red.push_back(0);
green.push_back(0);
green.push_back(255);
green.push_back(0);
blue.push_back(0);
blue.push_back(0);
blue.push_back(255);
white.push_back(255);
white.push_back(255);
white.push_back(255);
gray.push_back(127);
gray.push_back(127);
gray.push_back(127);
float angle = 2.0f * float(M_PI) / float(steps);
ostringstream filename;
for (unsigned int i = 0; i < steps; i++) {
cout << endl << endl << "step: " << (i + 1) << "/" << steps << endl;
filename.str("");
filename << "clock_";
if (i < 100) {
filename << 0;
}
if (i < 10) {
filename << 0;
}
filename << i << ".mip";
unsigned char col[] = {255, 255, 255};
100,
col);
clockOuterRunner[0] = clockOuter[0];
clockOuterRunner[1] = clockOuter[1];
clockOuterRunner[0] -= clockCenter[0];
clockOuterRunner[1] -= clockCenter[1];
R.
SetXYZ(0.0, 0.0, i * angle);
clockOuterRunner[0] = p3D2[0];
clockOuterRunner[1] = p3D2[1];
clockOuterRunner[0] += clockCenter[0];
clockOuterRunner[1] += clockCenter[1];
moveStartRunner[0] = moveStart[0];
moveStartRunner[0] += (HOMGPOINT2D_TYPE)i / (HOMGPOINT2D_TYPE)steps;
moveStartRunner[1] = moveStart[1] + i / steps;
moveStartRunner[1] += (HOMGPOINT2D_TYPE)i / (HOMGPOINT2D_TYPE)steps;
moveEndRunner[0] = moveEnd[0] + i / steps;
moveEndRunner[0] += (HOMGPOINT2D_TYPE)i / (HOMGPOINT2D_TYPE)steps;
moveEndRunner[1] = moveEnd[1] + i / steps;
moveEndRunner[1] += (HOMGPOINT2D_TYPE)i / (HOMGPOINT2D_TYPE)steps;
}
return 0;
}