I was hoping this c++ file could be adapted to use as data compression or encryption(adsbygoogle = window.adsbygoogle || []).push({});

Code (C):

#include <iostream>

#include <cmath>

using namespace std;

double asil(double t)

{

cout<<"asil\n";

cout<< cos(t) << endl;

double two = 2.0;

cout<< sin(sqrt(two)*t) << endl;

return sin(sqrt(two)*t);

}

int main(){

double one = 1;

double four = 4;

double pi = atan(one)*four;

double tolerance = .00001;

//cout<<"dedede";

double m=1,n=1,t=1,x=1,y=1;

cout<<"enter x: " <<endl;

cin>>x;

cout<<"enter y: "<<endl;

cin>>y;

int i = 0;

while(

(sqrt(2)-tolerance)>((asin(y)+2*pi*m)/(acos(x)+2*pi*n))||

(sqrt(2)+tolerance)<((asin(y)+2*pi*m)/(acos(x)+2*pi*n)))

{

if(i++ % 100000 == 0) asil(t);

/**

if( ((sqrt(2)+0.0001)>=((asin(y)+2*pi*m)/(acos(x)+2*pi*n)))

&&((sqrt(2)-0.0001)<=((asin(y)+2*pi*m)/(acos(x)+2*pi*n))) ){

t=acos(x)+2*pi*n;

cout<<t<<endl;

}

else **/

if(

(sqrt(2)-tolerance)>=((asin(y)+2*pi*m)/(acos(x)+2*pi*n))){

m=m+1;}

else if((sqrt(2)+tolerance)<=((asin(y)+2*pi*m)/(acos(x)+2*pi*n)))

{

n=n+1;}

}

t=acos(x)+2*pi*n;

cout<<t<<endl;

asil(t);

return 0;

}

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# C/++/# Data compression with lissajous curve

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads for Data compression lissajous |
---|

Java Android Studio: Accessing SQLite Data In RecyclerView |

How to understand dimensionless data of MacCormack's method |

Edge data center size |

Python Interesting article how to use Pandas with Excel sheets |

Python Projects involving data science |

**Physics Forums | Science Articles, Homework Help, Discussion**