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
from collections import defaultdict | |
import math | |
import sys | |
import time | |
import bezier | |
import pygame | |
import numpy as np | |
from fontTools.pens.basePen import (BasePen, ) |
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 bezier | |
import pygame | |
class BezierLoop: | |
WIDTH = 400 | |
HEIGHT = 400 | |
def prepare_window(self): | |
self.screen = pygame.display.set_mode((self.WIDTH, self.HEIGHT)) | |
self.screen.fill((0, 0, 0)) |
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
from collections import defaultdict | |
import io | |
import random | |
import pygame | |
from fontTools.pens.svgPathPen import (SVGPathPen, ) | |
from fontTools.ttLib import TTFont | |
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 math | |
import random | |
import pygame | |
class Star(pygame.sprite.Sprite): | |
def __init__(self, center, r, angle): | |
super().__init__() | |
self.center = center | |
self.angle = angle |
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 math | |
import random | |
import pygame | |
class Particle(pygame.sprite.Sprite): | |
def __init__(self, x, y): | |
super().__init__() | |
self.start = (x, y) | |
self.x = x |
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
from collections import defaultdict | |
import io | |
import sys | |
import numpy as np | |
from scipy.special import comb | |
import pygame | |
from fontTools.pens.svgPathPen import (SVGPathPen, ) | |
from fontTools.pens.basePen import (BasePen, ) |
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
from collections import defaultdict | |
import wx | |
from fontTools.pens.wxPen import WxPen | |
from fontTools.ttLib import TTFont | |
class MyFrame(wx.Frame): | |
def __init__(self, ttfont: TTFont): | |
wx.Frame.__init__(self, None, -1, "Font painter") | |
self.font = ttfont |
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 wx | |
from fontTools.pens.wxPen import WxPen | |
from fontTools.ttLib import TTFont | |
class MyFrame(wx.Frame): | |
def __init__(self, ttfont: TTFont): | |
wx.Frame.__init__(self, None, -1, "Font painter") | |
self.font = ttfont | |
self.Bind(wx.EVT_PAINT, self.on_paint) |
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 wx | |
from fontTools.pens.wxPen import WxPen | |
from fontTools.ttLib import TTFont | |
class MyFrame(wx.Frame): | |
def __init__(self, ttfont: TTFont): | |
wx.Frame.__init__(self, None, -1, "Font painter") | |
self.font = ttfont | |
self.Bind(wx.EVT_PAINT, self.on_paint) |
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 sys | |
import cv2 | |
import numpy as np | |
def main(fn): | |
SZ = 21 | |
OUTPUT_ARRAY = [[0]*SZ for i in range(SZ)] | |
img = cv2.imread(fn) |
NewerOlder