File:Fubini Nightmare foliation Katok example.svg

Original file (SVG file, nominally 720 × 720 pixels, file size: 1.62 MB)

Summary

Description
English: Fubini Nighmare foliation example due to Katok
Русский: Кошмар Фубини, конструкция Катка
Date
Source

Own work Actually, I've used C++-program to produce Asymptote source. See ru:Кошмар Фубини (Russian) for details on the algorithm. I hereby release the following source code into the public domain.

You have to do the following in order to produce an svg file (assuming the file above is saved as 'fubini.C'):

g++ fubini.C -o fubini
./fubini > fubini.asy # prepare a cup of coffee here. it's a long calculations with default options
asy fubini.asy
pstoedit fubini.eps fubini.svg
Author Ilya Voyager
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Asymptote.
Source code
InfoField

Asymptote code

#include <iostream>
#include <math.h>
#include <vector>
#include <time.h>
#include <stdlib.h>
#include <assert.h>

using namespace std;
double F(double p, vector<int> a, int N)
{
	assert(p>0 && p<1);
	int i;
	double x=0;
	double q=1-p;
	for(i=0;i<N;i++)
	{
		if(a[i]==1)
		{
			x+=q;
			q*=p;
		}
		else
		{
			q*=(1-p);
		}
	}
	return x;
}

main()
{
	srand(time(NULL));
	vector<int> a;
	double prec=2E-3;
	int N=int(1/(prec*prec));
	int exp=500;
	int i,j;
	double p;
	bool first=true;
	cout << "import graph;\nimport math;\nimport fontsize;\nunitsize(7inch);\ndefaultpen(0.45mm);\n" << endl;
	for(i=0;i<exp;i++)
	{
		a.clear();
		for(j=0;j<N;j++)
		{
			a.push_back(rand()%2);
		}
		first=true;
		for(p=2*prec;p<1-2*prec;p+=prec)
		{
			if(first)
			{
				cout << "draw(";
				first=false;
			}
			else
			{
				cout << "--";
			}
			cout << "(" << p << "," << F(p,a,N) << ")" ;
		}
		cout << ");" << endl;
	}
	cout << "xaxis(\"$p$\",BottomTop,fontsize(48));\nyaxis(\"$x$\",LeftRight,fontsize(48));" << endl;
}

Licensing

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

3 July 2009

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current21:43, 11 July 2009Thumbnail for version as of 21:43, 11 July 2009720 × 720 (1.62 MB)Ilya Voyagersizes fixed
07:25, 3 July 2009Thumbnail for version as of 07:25, 3 July 2009720 × 720 (1.65 MB)Ilya Voyager{{Information |Description={{en|1=Fubini Nighmare foliation example due to Katok}} |Source=Own work by uploader |Author=Ilya Voyager |Date=2009-07-03 |Permission= |other_versions= }} <!--{{ImageUpload|full}}-->

The following page uses this file:

Global file usage

The following other wikis use this file:

Metadata