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
var('a t') | |
# number of curves we want to approximate the circle with | |
for n_curves in range(3,11): | |
# startpoint of quadratic bezier curve | |
x0=cos(0) | |
y0=sin(0) | |
# control point of quadratic bezier curve |
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
#!/usr/bin/python3 | |
import os | |
import sys | |
import numpy as np | |
def read_value(string, index): | |
#go to the beginning of the value | |
while svg_content[index] not in numerals: | |
index+=1 | |
#read in the value |
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
#- | |
Symbol x,y,u; | |
Format float; | |
*Example curve, just paste the output of the sage script in here | |
Local F=x^24 - 13*x^22*y^2 - 9*x^20*y^4 + 285*x^18*y^6 + 970*x^16*y^8 + 1246*x^14*y^10 + 462*x^12*y^12 - 454*x^10*y^14 - 475*x^8*y^16 - 65*x^6*y^18 + 75*x^4*y^20 + 25*x^2*y^22 - 42*x^22 - 637*x^20*y^2 - 2660*x^18*y^4 - 6125*x^16*y^6 - 11340*x^14*y^8 - 18746*x^12*y^10 - 23296*x^10*y^12 - 18690*x^8*y^14 - 8890*x^6*y^16 - 2345*x^4*y^18 - 364*x^2*y^20 - 49*y^22 + 511*x^20 + 4585*x^18*y^2 + 22470*x^16*y^4 + 64260*x^14*y^6 + 111930*x^12*y^8 + 126126*x^10*y^10 + 98280*x^8*y^12 + 55860*x^6*y^14 + 22575*x^4*y^16 + 5425*x^2*y^18 + 490*y^20 - 1484*x^18 - 14231*x^16*y^2 - 53424*x^14*y^4 - 119756*x^12*y^6 - 184184*x^10*y^8 - 194194*x^8*y^10 - 132496*x^6*y^12 - 54684*x^4*y^14 - 12796*x^2*y^16 - 1519*y^18 + 1519*x^16 + 11277*x^14*y^2 + 43407*x^12*y^4 + 89089*x^10*y^6 + 105105*x^8*y^8 + 79079*x^6*y^10 + 40677*x^4*y^12 + 12747*x^2*y^14 + 1484*y^16 - 490*x^14 - 3955*x^12*y^2 - 9240*x^10*y^4 - 15785*x^8*y^6 - 19250*x^6*y^8 - 11781*x^ |