Difference between revisions of "User:Johnxyz1"
Line 28: | Line 28: | ||
https://1drv.ms/t/c/c49430eefdbfaa19/EQw12iwklslElg9_nCMh0f0BVthxSSl-BOJAwsXtGbbhPg?e=1LfZJm | https://1drv.ms/t/c/c49430eefdbfaa19/EQw12iwklslElg9_nCMh0f0BVthxSSl-BOJAwsXtGbbhPg?e=1LfZJm | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Asymptote test (with autoGraph): | ||
+ | |||
+ | <asy>/* AUTO-GRAPH V-4 beta by PythonNut*/ | ||
+ | |||
+ | /* Customizations: feel free to edit */ | ||
+ | import math; | ||
+ | import graph; | ||
+ | /* x maximum and minimum */ | ||
+ | int X_max = 10; | ||
+ | int X_min =-10; | ||
+ | /* y maximum and minimum */ | ||
+ | int Y_max = 10; | ||
+ | int Y_min = -10; | ||
+ | /* linewidth */ | ||
+ | real line_width = 0.75; | ||
+ | /* graph color */ | ||
+ | pen graph_color = magenta; | ||
+ | /* special */ | ||
+ | bool mark_lattice = false; | ||
+ | bool show_grid = true; | ||
+ | real X_tick_density = 1; | ||
+ | real Y_tick_density = 1; | ||
+ | real ratio = 1; | ||
+ | real resolution = 0.0001; | ||
+ | int size = 300; | ||
+ | /* graph function */ | ||
+ | real f(real x) | ||
+ | { | ||
+ | return sin(x)*sin(x); /* type function to be graphed here */ | ||
+ | } | ||
+ | |||
+ | /* The Code. Do not disturb unless you know what you are doing */ | ||
+ | bool ib(real t){ return (Y_min <= f(t) && f(t) <= Y_max); } | ||
+ | |||
+ | size(size);unitsize(size*ratio,size);Label l;l.p=fontsize(6); | ||
+ | xaxis("$x$",X_min,X_max,Ticks(l,X_tick_density,(X_tick_density/2),NoZero),Arrows); | ||
+ | yaxis("$y$",Y_min,Y_max,Ticks(l,Y_tick_density,(Y_tick_density/2),NoZero),Arrows);// | ||
+ | if (show_grid){add(shift(X_min,Y_min)*grid(X_max-X_min,Y_max-Y_min));} | ||
+ | |||
+ | real t, T1, T2; | ||
+ | |||
+ | for (T1 = X_min ; T1 <= X_max ; T1 += resolution){ | ||
+ | while (! ib(T1) && T1 <= X_max){T1 += resolution;} | ||
+ | if(T1 > X_max){break;} | ||
+ | T2 = T1; | ||
+ | while ( ib(T1) && T1 <= X_max){T1 += resolution;} | ||
+ | T1 -= resolution; | ||
+ | draw(graph(f,T2,T1,n=2400),graph_color+linewidth(line_width),Arrows); | ||
+ | } | ||
+ | |||
+ | if (mark_lattice){ | ||
+ | for (t = X_min; t <= X_max; ++t){ | ||
+ | if (f(t)%1==0 && ib(t)){ | ||
+ | dot((t,f(t)),graph_color+linewidth(line_width*4)); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | dot((0,0));</asy> |
Revision as of 20:30, 4 July 2024
Favorite topic: for which I am reading AOPS intermediate book on
Favorite color:
Favorite software:
Favorite Typesetting Software:
Favorite Operating System: Linux (although I am rarely on one)
Below are some stuff I am doing to practice . That does not mean I know all of it (actually the only ones I do not know yet is the cubic one and the one)
Source code for equations:
https://1drv.ms/t/c/c49430eefdbfaa19/EQw12iwklslElg9_nCMh0f0BVthxSSl-BOJAwsXtGbbhPg?e=1LfZJm
Asymptote test (with autoGraph):