File:RationalRepresentation.pdf

Original file (1,047 × 1,047 pixels, file size: 7 KB, MIME type: application/pdf)

Summary

Description
English: Representation of rational numbers (Q) as pairs of integers, equivalent pairs on the same line.
Français : Représentation des nombres rationnels comme des paires de nombres entiers, les paires équivalentes sur le même ligne.
Date
Source Own work
Author TomT0m
File:Rational Representation.svg is a vector version of this file. It should be used in place of this PDF file when not inferior.

File:RationalRepresentation.pdf → File:Rational Representation.svg

For more information, see Help:SVG.

In other languages
Alemannisch  العربية  беларуская (тарашкевіца)  български  বাংলা  català  нохчийн  čeština  dansk  Deutsch  Ελληνικά  English  British English  Esperanto  español  eesti  euskara  فارسی  suomi  français  Frysk  galego  Alemannisch  עברית  हिन्दी  hrvatski  magyar  հայերեն  Bahasa Indonesia  Ido  italiano  日本語  ქართული  한국어  lietuvių  македонски  മലയാളം  Bahasa Melayu  norsk bokmål  Plattdüütsch  Nederlands  norsk nynorsk  norsk  occitan  polski  prūsiskan  português  português do Brasil  română  русский  sicilianu  Scots  slovenčina  slovenščina  српски / srpski  svenska  தமிழ்  ไทย  Türkçe  татарча / tatarça  українська  vèneto  Tiếng Việt  中文  中文(中国大陆)  中文(简体)  中文(繁體)  中文(马来西亚)  中文(新加坡)  中文(臺灣)  +/−
New SVG image

Source of the file, in the en:asymptote graphic programming language: fr:Utilisateur:TomT0m/RationalRepresentation.asy

import settings;
import graph;
import math;
 
 
pdfviewer="/usr/bin/evince";
psviewer="evince";
 

// parameters

int num=10;
 
 
int gcd(int a,int b){
	if(b==0){
		return a;
	}else{
		return gcd(b,a-quotient(a,b)*b);
	}
}
bool isPrimeWith(int a,int b){
	return gcd(a,b)==1;
}

 
pen color_rational(int x,int y){

	if(y==0){
		return white;
	}else{
		real ratio = x
/y;
		return rgb(0.5*(1+ratio),0.7*(1+ratio),0.3*(1-ratio));
	}
}
unitsize(2,2);
 
picture damier;
// unitsize(damier,1,1);
size(damier,5000,5000,(-100,-100),(100,100));
 
dot(damier,(0,0));
dot(damier,(-num,-num),invisible);
dot(damier,(num,num),invisible);
 
 
 
for(int x=-num; x<=num;++x){	
 
	for(int y=-num; y<=num;++y){
 
		
		pen p=color_rational(x,y);
 
		if(y>0){
			pair far;
			if(isPrimeWith(abs(x),abs(y)) ){
				far=(x*100,y*100);
				drawline(damier,(0,0),far,p);
			}
		}

		if(y==0){
 
			dot(damier,(x,y));
			dot(damier,(x,y),rgb(0.9,0.9,0.9));

		}else
			dot(damier,(x,y),p);
 
	}
}

dot(damier,(0,0));
dot(damier,(0,0),rgb(0.9,0.9,0.9));
add(damier.fit(),(0,0));
// drawing the equivalent classes

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.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

11 December 2009

File history

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

Date/TimeThumbnailDimensionsUserComment
current21:59, 11 December 2009Thumbnail for version as of 21:59, 11 December 20091,047 × 1,047 (7 KB)TomT0m{{Information |Description={{en|1=Representation of rational numbers (Q) as pairs of integers, equivalent pairs on the same line.}} {{fr|1=Représentation des nombres rationnels comme des paires de nombres entiers, les paires équivalentes sur le même li

The following 2 pages use this file:

Global file usage

The following other wikis use this file:

Metadata