This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import Image, ImageDraw | |
def bezier1(p0, p1, t): | |
x = p0[0] + t * (p1[0] - p0[0]) | |
y = p0[1] + t * (p1[1] - p0[1]) | |
return (x,y) | |
def bezierN(pts, t): | |
res = list(pts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdint.h> | |
#include <math.h> | |
struct image { | |
uint32_t size_x; | |
uint32_t size_y; | |
uint8_t* pixels; |