last day (379 days later) » 

9:50 AM
Number Plotter ver 1.0.2
Interpreter: Processing 3
Raw code of ver 1.0.2
//Define variables
double x, y, x_, y_, x0, x1, x2, u, v, lower, upper;
PFont f;

//number of steps to take to plot rationals
int imax = 60;

//Map function for double type
static double Map(double value, double start1, double stop1, double start2, double stop2) {
    return (value - start1) / (stop1 - start1) * (stop2 - start2) + start2;
}

//Factorial function
double Factorial(double n) {
  double j = 1;
  for (int i = 1; i <= n; i++) {
    j = j*i;
  }
  return j;
}

//Riemannian zeta function
Sample illustration of capabilities:
room topic changed to Number Plotter Discussions: Discussion related to the use of algorithms and programs to visualise real numbers and other sets. Number theoretic discussion based on the graphical interpretation are encouraged, so as relevant proofs (no tags)
Set of irrationals up to denominator = 60 (controlled by imax)
Zoom anywhere (pick with the variable u), and can zoom as deep as $10^9$ times (pick with the variable v)
(The reason it is $10^9$ is because of the limited precision of the double datatype, so any number smaller than $\frac{1}{10^9}$ difference will have an underflow and cannot resolve. Solving this problem will require going to the BigDecimal datatype, which while it will work gracefully with rationals, is complicated to code using squareroots, thus will be deffer until I understand how to code Java 9 or find a better programming language)
Because of this, you cannot resolve the $4!$ decimal place of Liuoville numbers (to be discussed later) in the present version
The zooming is also not dynamic, and requires rexecuting the code to zoom and pan., Currently figuring out how to make it keyboard controlled
Stick plots which illustrates how the set is constructed in stages. It should be noted that beyond 200 it can get a bit glitchy at the bottom. I have not implement a y axis zoom yet
These stick plots are very useful to figure out which number is which, thus allow identification of a base structure of the set to be plotted (most of these sets are "pseudo self similar in some peculiar way, hence any finite level zoom is representative of the whole thing with suitable interpretation on the empty spaces)
For reference, the stick plot is basically a graph of the Thomae's function
Thomae's function, named after Carl Johannes Thomae, has many names: the popcorn function, the raindrop function, the countable cloud function, the modified Dirichlet function, the ruler function, the Riemann function, or the Stars over Babylon (John Horton Conway's name). This real-valued function f(x) of the real variable x is defined as: f ( x ) = { 1 q ...
 
10:30 AM
Up to 7 types of numbers implemented and can be visualised simutaneously
and zoomed
 
 
3 hours later…
1:40 PM
Detailed analysis
 
 
3 hours later…
4:23 PM
/* Number Plotter ver 1.0.3 */
//Define variables
PFont f;
double x, y, x_, y_, x0, x1, x2, u, v, lower, upper;
int imax, crosshair_enable, stickplot_enable, splitscreen_enable, counter, Num_rows;

void setup() {
  //Plotting window settings
  size(1500, 1000); //Window size
  background(0); //Background color
  f = createFont("Arial", 16, true); //Display text

  //Plotting parameters
  imax = 20; //Max denominator to plot rationals and other numbers
  crosshair_enable = 1; //Show the crosshair at the middle of the window
Ver 1.0.3 Changelog:
$*$ Added plotting of integers
$*$ Tidied up the code into parameter sections and function sections
$*$ Stick plots available for all plots
Bugs:
$*$ Stick plot still become distorted due to rounding errors when imax > 20
$*$ Underflow error for adding numbers of the order $10^{-24}$ result in the 4th and 3rd liuoville number to be indistinguishable
Future work:
$*$ Implement dynamic zooming upon mouse click
$*$ Generalise the cantor set construction algorithm to construct any generalised cantor sets
 

  last day (379 days later) »