File:RationalRepresentation.pdf
Original file (1,047 × 1,047 pixels, file size: 7 KB, MIME type: application/pdf)
Captions
Summary edit
DescriptionRationalRepresentation.pdf |
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.
|
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 edit
Public domainPublic domainfalsefalse |
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. |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 21:59, 11 December 2009 | 1,047 × 1,047 (7 KB) | TomT0m (talk | contribs) | {{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 |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on el.wikipedia.org
- Usage on en.wikibooks.org
- Usage on fr.wikipedia.org
- Usage on ja.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Short title |
|
---|---|
File change date and time | 23:42, 11 December 2009 |
Date and time of digitizing | 23:42, 11 December 2009 |
Software used | Asymptote 1.88 |
Conversion program | GPL Ghostscript 8.70 |
Encrypted | no |
Page size | 503 x 503 pts |
Version of PDF format | 1.4 |