Skip to content

Instantly share code, notes, and snippets.

@cjlano
cjlano / bezier.c
Created February 28, 2013 14:57 — forked from anonymous/bezier.c.c
#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;
@cjlano
cjlano / bezier.py
Last active December 14, 2015 15:39 — forked from anonymous/bezier.py.txt
plot bezier curve from SVG
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)