In [1]:
;pwd


/home/kriukov/main/work/mexico/unam/interval-methods/ipynb

In [2]:
;cd ..


/home/kriukov/main/work/mexico/unam/interval-methods

In [3]:
include("kicked-rotor.jl")


Syntax: krawczyk2d(function, [Interval(lo, hi), Interval(lo, hi)], precision [default is 64])
Out[3]:
roots (generic function with 1 method)

In [4]:
using PyPlot


INFO: Loading help data...

In [5]:
function plot_points(N, k)
    data = zeros(N, 2)
    x0 = [2pi*rand(), 2pi*rand()]

    for i in 1:N
        output = T0(x0, k, i)
        data[i, 1:2] = output
    end
    
    data
end


Out[5]:
plot_points (generic function with 1 method)

In [11]:
p2_points = [
1.32812164615400647499 2.65624329230801270538; 
3.1415926535897929937 3.14159265358979299348; 
4.95506366102558011696 3.62694201487157351165]


Out[11]:
3x2 Array{Float64,2}:
 1.32812  2.65624
 3.14159  3.14159
 4.95506  3.62694

In [12]:
p3_points = [
0.806560442745249376478 1.61312088549050729701;
1.76748900938308797098 1.7674890093830876094;
4.51569629779649877807 2.74820728841341117127;
5.47662486443433212634 2.33503221084453809028;
0.806560442745255646961 3.94815309633504728909;
1.76748900938308795797 3.53497801876617509433;
4.515696297796499524 4.51569629779649880409;
5.47662486443433730145 4.67006442168907884207]


Out[12]:
8x2 Array{Float64,2}:
 0.80656  1.61312
 1.76749  1.76749
 4.5157   2.74821
 5.47662  2.33503
 0.80656  3.94815
 1.76749  3.53498
 4.5157   4.5157 
 5.47662  4.67006

In [13]:
p4_points = [
0.49205012902309243144 0.984100258046184617634;
1.12061271550002283293 1.12061271550002283185;
1.94858418114797580253 1.45653405212488297558;
4.33460112603161137933 2.38601694488363606458;
5.79113517815649389738 1.45653405212488297373;
5.16257259168158489336 2.02097993808812039277;
1.1206127154980039095 4.26220536909146416197;
0.492050129023091697679 4.82665125505470410557;
1.94858418114797550947 3.89716836229595025741;
4.33460112603161313617 4.82665125505470410036;
5.16257259167956314384 5.16257259167956295736;
5.79113517815649432412 5.29908504913340143742]


Out[13]:
12x2 Array{Float64,2}:
 0.49205  0.9841 
 1.12061  1.12061
 1.94858  1.45653
 4.3346   2.38602
 5.79114  1.45653
 5.16257  2.02098
 1.12061  4.26221
 0.49205  4.82665
 1.94858  3.89717
 4.3346   4.82665
 5.16257  5.16257
 5.79114  5.29909

In [10]:
k = 1
for i in 1:500
    points = plot_points(200, k);
    plot(points[:,1], points[:,2], "b.", markersize=1, alpha=0.3)   
end
plot(p2_points[:,1], p2_points[:,2], "r.", markersize=3)
plot(p3_points[:,1], p3_points[:,2], "r.", markersize=5)
plot(p4_points[:,1], p4_points[:,2], "m.", markersize=5) 

#plt.xlim(1,2)
#plt.ylim(0.9, 1.5)
#plt.xlabel(L"$\theta$")
#plt.ylabel(L"$\phi$")
xlabel("x")
ylabel("p")

plt.savefig("standard_k$k.pdf")



In [ ]: