- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
| // | |
| // CDView.swift | |
| // CD | |
| // | |
| // Created by Daniel Kuntz on 7/3/23. | |
| // | |
| import SwiftUI | |
| struct ShapeWithHole: Shape { |
| #include <stddef.h> // defines NULL | |
| template <class T> | |
| class Singleton{ | |
| public: | |
| static T* Instance() { | |
| if(!m_pInstance) m_pInstance = new T; | |
| assert(m_pInstance != NULL); | |
| return m_pInstance; | |
| } | |
| protected: |
| #include "testApp.h" | |
| // this can go in your h file; | |
| ofPoint pts[5]; | |
| uint ctr; | |
| ofPath path; | |
| ofPolyline lineOrig; | |
| // medianFilter filter; | |
| // filter.addValue(5); | |
| // filter.addValue(3); | |
| // filter.addValue(2); | |
| // filter.addValue(100); | |
| // filter.addValue(9); | |
| // Serial.println(filter.getMedian()); | |
| // | |
| // filter.addValue(100); | |
| // Serial.println(filter.getMedian()); |