Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
00001 #include "TFT_4DGL.h" 00002 00003 TFT_4DGL lcd(p9,p10,p11); 00004 00005 int main() { 00006 00007 double x1,y1,z1,x,y,z,dt; 00008 int xp,yp,sl,sk; 00009 00010 float a = -0.1; 00011 float b = 0.01; 00012 float c = 0.2; 00013 00014 x1 = 0; 00015 y1 = 0; 00016 z1 = 0; 00017 00018 sl = 0; 00019 sk = 0; 00020 00021 dt = 0.007; 00022 00023 while(1) 00024 00025 { 00026 00027 x = x1+(y1)*dt; 00028 y = y1+(-b*y1+x1-pow(x1,3)+a*cos(z1))*dt; 00029 z = z1+(c)*dt; 00030 00031 yp = (int)floor(y*90); 00032 xp = (int)floor(x*90); 00033 00034 lcd.pixel(120+yp,160+xp,WHITE); 00035 00036 sk++; 00037 00038 x1 = x; 00039 y1 = y; 00040 z1 = z; 00041 00042 } 00043 00044 }
Generated on Thu Jul 21 2022 14:37:23 by
1.7.2