This file contains hidden or 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
// | |
// Parameters.swift | |
// --- | |
// | |
// Created by Ryan Robinson on 2/5/25. | |
// | |
import CoreGraphics | |
import Foundation |
This file contains hidden or 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 SwiftUI | |
struct BezierGridView: View { | |
@State private var vertices: [[BezierVertex]] | |
let rows: Int | |
let cols: Int | |
init(rows: Int, cols: Int) { | |
self.rows = rows |
This file contains hidden or 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
#ifndef tpt_filters_h | |
#define tpt_filters_h | |
#include <cmath> | |
#include <numbers> | |
// MARK: - One-pole Filter | |
template<typename X> |
This file contains hidden or 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 <cmath> | |
#include <numbers> | |
// See: https://www.discodsp.net/VAFilterDesign_2.1.2.pdf (p. 170) | |
template<typename X> | |
struct Diode_ladder { | |
struct Params { | |
X fc = 1000; |
This file contains hidden or 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
PGraphics pg; | |
PImage icon; | |
color clear; | |
// 1. put the icon you want to squirclize the working directory | |
// 2. provide the name of the icon you want to squirclize | |
String inputFileName = "cool_icon.png"; | |
String outputFileName = "squircle_icon.png"; |
This file contains hidden or 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 matplotlib.pyplot as plt | |
import numpy as np | |
import cvxpy as cp | |
# broke the degree parameter for the time being. | |
def get_cvx(fn, deg, lo, hi, rel=True, m=500): | |
# create an array of x-values | |
x = np.linspace(lo, hi, m) | |
# compute the true y-values |