|
Visualization of Noble Prime Numbers |
|
|
|
When we draw noble prime numbers in a circle, we can see that all of them have nine corners. The proof of this is as fallows:
Theory of Finding The Right Position of Each Point in Circle 
  K : distance between every number thru p.
midx, midy: pointing the middle of the monitor in pixels. diz[] : A structure. For every number it keeps "distance", x and y coordinates. To locate correct position, it should be: x = midx + x y = midy - y The Algorithm 
C Source Code #include <graphics.h> #include <stdlib.h> #include <stdio.h> #include <conio.h> #include <math.h> #define pi 3.141592653 typedef struct coor { double k; double x; double y; }; int init_graph(void) { int gdriver = DETECT, gmode, errorcode; initgraph(&gdriver, &gmode, ""); errorcode = graphresult(); if (errorcode != grOk) { printf("\n2. Graphical Error: %s\n", grapherrormsg(errorcode)); printf("Press any key to exit:"); getch(); return 1; } return 0; } void main(void) { randomize(); if (init_graph() == 1) exit(1); int i, midx, midy; long k, t; double cevre, K, r=239.0, p=499.0; // we choose noble prime number p here coor *diz; midx = getmaxx() / 2; midy = getmaxy() / 2; cevre = 2*pi*r; // = 1501 pixel K = cevre / p; // p must be lower than 1501 diz = (coor *)calloc(p,sizeof(coor)); diz[0].k = 0.0; diz[0].x = midx*1.0; diz[0].y = 0.0; for(i=1;i<=p;i++) { diz[i].k = i*K; diz[i].x = r*sin(diz[i].k/r); diz[i].y = sqrt(r*r - diz[i].x*diz[i].x); if ((diz[i].x>0)&&(diz[i].y<diz[i+1].y)) diz[i].y=-diz[i].y; else if ((diz[i].x>0)&&(diz[i].x<diz[i-1].x)) diz[i].y=-diz[i].y; if ((diz[i].x<0)&&(diz[i].y<diz[i-1].y)) diz[i].y=-diz[i].y; else if ((diz[i].x<0)&&(diz[i].x<diz[i-1].x)) diz[i].y=-diz[i].y; } circle(midx, midy, r); t = 1; i = 1; k = 10; while (i<p) { i++; k = fmod(k,p); line(midx+diz[t].x,midy-diz[t].y,midx+diz[k].x,midy-diz[k].y); t = k; k = k * 10; } getch(); closegraph(); }
Some Examples These examples show the nine corners of noble prime numbers. P = 193 
P = 337 
P = 499 
P = 701 
|