Skip to content

Instantly share code, notes, and snippets.

@Neon22
Neon22 / libavcodec.py
Last active February 13, 2019 19:05
pyglet - libavcodec for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / libavutil.py
Last active June 11, 2018 09:55
pyglet - libavutil for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / libavformat.py
Last active June 11, 2018 09:54
pyglet - libavformat for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / libavscale.py
Created June 9, 2018 10:29
pyglet - libavscale for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / libswresample.py
Created June 9, 2018 10:30
pyglet - libswresample for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / ffmpeg.py
Last active June 11, 2018 09:53
pyglet - ffmpeg.py for ffmpeg 4
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code must retain the above copyright
@Neon22
Neon22 / yarn_fiber_gen.py
Created January 9, 2026 21:17
Generates a continuous yarn of interlocked knit stitches. Needs a bit more work. For pyelastica would require a series of rows with fixed ends.
#! python
# From Keenan
# - https://github.com/keenancrane/plain-knit-yarn
# modified from webGL version:
# - https://github.com/UH-AIM/yarn-fiber-generation/blob/main/yarn_fiber.py
# Has continuous rows
from math import sin, cos, sqrt, pow, pi