currently struggling with a project for my computing class in c++. Being asked to rotate a point in 3d space by 3 angles relative to the 3 axis.
feel like im kinda close on having all the parts needed just struggling to put them together, lecture notes were a bit vague on multiplying matrices :( . any help is appreciated.
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
{
std::cout << "Enter a number for x";
int x;
std::cin >> x;
std::cout << "Enter a number for y";
int y;
std::cin >> y;
std::cout << "Enter a number for z";
int z;
std::cin >> z;
std::cout << "Enter value for Theta";
int theta;
std::cin >> theta;
std::cout << "Enter value for Beta";
int beta;
std::cin >> beta;
std::cout << "Enter value for Gamma";
int gamma;
std::cin >> gamma;
//function allows the insertion of xyz and the three angles
{void RTheta(const double& theta, double array[3][3]);
int array =
{
{cos(theta), sin(theta), 0}, //the matrice for theta values
{sin(theta), cos(theta), 0},
{0,0,1}
};
std::cout << RTheta; //outputs value for theta
}
{
void RBeta(const double& beta, double array[3][3]);
int array =
{
{cos(beta), 0, -sin(beta)}, //the matrice for beta values
{0, 1, 0}, //outputs values for beta
{sin(beta), 0, cos(beta)}
};
std::cout << RBeta;
}
{
void RGamma(const double& gamma, double array[3][3]);
int array =
{
{1,0,0}, //the matrice for gamma
{0,cos(gamma), sin(gamma)}, //outputs values for gamma
{0, -sin(gamma), cos(gamma)}
};
std::cout << RGamma;
}
return 0;
}
the question if this helps: i.imgur.com/eN5RqEe.png