Archivo:Thomae function (0,1).svg

Ver la imagen en su resolución original((Imagen SVG, nominalmente 1280 × 660 pixels, tamaño de archivo: 1,05 MB))

 
W3C-validity not checked.

Resumen

Descripción
English: Plot of Thomae's function on the interval (0,1). Shown are all rational points with denominator at most 200. The topmost point in the middle shows f(1/2) = 1/2

Created using the following Java code:

public class Thomae {
	
	static int gcd(int a, int b) {
		while(a>0 && b>0) {
			if(a>b) a -= a/b*b;
			else b -= b/a*a;
		}
		return a>0 ? a : b;
	}
	
	public static void main(String[] args) {
		int max = 200;
		
		int width = 1280;
		int height = 660;
		
		int border = 20;
		int x0 = border;
		int x1 = width - border;
		double dx = x1-x0;
		int y0 = height - border;
		double dy = -dx;
		int r=5;
		
		System.out.println("<?xml version=\"1.0\" standalone=\"no\"?>");
		System.out.println("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">");
		System.out.println("<svg width=\""+ width +"\" height=\""+ height +"\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">");
		
		for(int q=1; q<max; q++) for(int p=0; p<q; p++) if(gcd(p, q) == 1) {
			System.out.println("  <circle cx=\""+ (x0+dx*p/q) + "\" cy=\""+ (y0+dy*1/q) +"\" r=\""+ r +"\" fill=\"black\" stroke=\"none\" />");
		}
		
		System.out.println("</svg>");
	}
	
}
Fecha
Fuente Trabajo propio
Autor Smithers888

Licencia

Public domain Yo, el titular de los derechos de autor de esta obra, lo libero al dominio público. Esto aplica en todo el mundo.
En algunos países esto puede no ser legalmente factible; si ello ocurriese:
Concedo a cualquier persona el derecho de usar este trabajo para cualquier propósito, sin ningún tipo de condición al menos que éstas sean requeridas por la ley.

Leyendas

Añade una explicación corta acerca de lo que representa este archivo

Elementos representados en este archivo

representa a

Historial del archivo

Haz clic sobre una fecha y hora para ver el archivo tal como apareció en ese momento.

Fecha y horaMiniaturaDimensionesUsuarioComentario
actual18:09 9 oct 2008Miniatura de la versión del 18:09 9 oct 20081280 × 660 (1,05 MB)Smithers888{{Information |Description={{en|1=Plot of Thomae's function on the interval (0,1). Shown are all rational points with denominator at most 200. Created using the following Java code: <source lang="java"> public class Thoma

La siguiente página usa este archivo:

Uso global del archivo

Las wikis siguientes utilizan este archivo: