Lets quickly build up a ECC system so that we are all on the same page.
First, define a finate field F_q where q is a large prime.
Operations in F_q are all done modulo q.
import java.awt.event.KeyEvent; | |
float drag = 0.9; | |
class Point { | |
float x, y, vx, vy; | |
Point(float x, float y) { | |
this.x = x; | |
this.y = y; |
void setup() { | |
size(500, 500); | |
} | |
void tree(float x, float y, float length, float angle) { | |
if (length < 2) { | |
return; | |
} | |
float ny = y - length * sin(angle); | |
float nx = x + length * cos(angle); |
#include <stdio.h> | |
#include <time.h> | |
#include <ApplicationServices/ApplicationServices.h> /* ApplicationServices.framework needed */ | |
char *logFileName = "./keystroke.log"; | |
FILE *logFile = NULL; | |
int counter = 0; | |
struct timespec prev_time; |
float angle(vec2 uv) { | |
float a = atan(uv.y / uv.x); | |
if (uv.x < 0.) { | |
a += PI; | |
} | |
if (uv.x > 0. && uv.y < 0.) { | |
a += PI2; | |
} | |
return a; | |
} |
from random import random | |
def busy_block(stepper): | |
res = None | |
while stepper is not None: | |
stepper, res = stepper() | |
print(res) | |
return res |