- Install Ubuntu Server.
- Update Ubuntu with the commands:
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 re | |
import sys | |
import uuid | |
# generate a 24 character uid for the project file | |
def new_uid(): | |
return uuid.uuid1().hex[:24].upper() | |
def add_copyfiles_phase( project_path, file_path, file_name ): | |
with open (project_path, 'r') as projfile: |
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
// Assuming you have a 2d or 3d point datatype | |
// and a value t in 0..1, which is your point on the curve | |
point bezier_points[3] = { ... }; | |
point q0 = lerp( t, bezier_points[0], bezier_points[1] ); | |
point q1 = lerp( t, bezier_points[1], bezier_points[2] ); | |
point b = lerp( t, q0, q1 ); |
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
v2 PointOnPolygonEdge( v2 centre, float angle, float radius, int num_sides ) | |
{ | |
// the midpoint on the polygon edge | |
const float apothem = radius * cosf( PI / (float)num_sides ); | |
const float segment_angle = TWO_PI / (float)num_sides; | |
// find min segment vertex, rotated by half a segment | |
const float min_segment = segment_angle * ( 0.5f + (int)( angle / segment_angle ) ); | |
// get a lerp that goes from 0 ... 1 ... 0 at vertex ... apothem ... vertex |