Category : matrix

FreeGLUT provides already some basic transformation functions such as translate, rotate and scale. However, I need particular geometric transformations to apply to objects in a 3-dimensional space. I’m using FreeGLUT and glm as libraries. I’m having fun with some models already provided by FreeGLUT, such as glutSolidTorus() function. Thanks to linear algebra I can compute ..

Read more

Develop and run the MPI program on the cluster in C ++, in which the transposed matrix is ​​constructed with using procedures for generating data types. I do not know how to solve this, if there is a master here? Разработайте и выполните на кластере программу MPI на языке C++, в которой транспонированная матрица строится ..

Read more

This is my code Does any one know how I can format it so it looks more like a square rather due to the different character sizes in each element. 1 int main() { string a[4][4]= {{"xC9","xCD","xCD","xBB"}, {"xBA","p1","p2","xBA"}, {"xBA","100","p3","xBA"}, {"xC8","xCD","xCD","xBC"}}; printSquare(a); this is my code but the output seems to look funny Source: Windows Questions ..

Read more

#inlude<iostream> using namespace std; int main(){ int n1,n2,n3; cin>>n1>>n2>>n3; int a1[n1][n2]; for(int i=0;i<n1;i++){ for(int j=0;j<n2;j++){ cin>>a1[i][j]; } } int a2[n2][n3]; for(int i=0;i<n2;i++){ for(int j=0;j<n3;j++){ cin>>a2[i][j]; } } int ans[n1][n3]; for(int i=0;i<n1;i++){ for(int j=0;j<n3;j++){ for(int k=0;k<n2;k++){ ans[i][j]+=a1[i][k]*a2[k][j]; } } } for(int i=0;i<n1;i++){ for(int j=0;j<n3;j++){ cout<<ans[i][j]<<" "; } cout<<endl; } return 0; } // this is the ..

Read more