A Pen by Matthew Grimm on CodePen.
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
Here is the formula for calculating the intersection points of 2 cylinders where the centerlines of the cylinders intersect. | |
Definitions: | |
Brad = Branch Radius | |
Mrad = Main Radius | |
TX = the X coord of the intersection | |
TY = the Y coord of the intersection | |
TZ = the Z coord of the intersection |
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
wget http://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-x64.tar.gz -O heroku.tar.gz | |
tar -xvzf heroku.tar.gz | |
mv blahblahblah heroku | |
mv heroku /data/data/com.termux/files/usr/lib/heroku | |
ln -s /data/data/com.termux/files/usr/lib/heroku/bin/heroku /data/data/com.termux/files/usr/bin/heroku |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE language SYSTEM "language.dtd"> | |
<language _name="POV-Ray 3.7" version="1.0" _section="Others" mimetypes="text/x-povray"> | |
<escape-char>\</escape-char> | |
<string _name="String" style="String" end-at-line-end="FALSE"> | |
<start-regex>"</start-regex> | |
<end-regex>"</end-regex> | |
</string> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 math import cos,sin,atan,radians | |
import os | |
class Pt(): | |
def __init__(self,x=0,y=0): | |
self.x = x | |
self.y = y | |
def rotate(self,about,a,returnInts=False): | |
ax = about.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
import sys | |
fo = open(sys.argv[1] + '.pov') | |
a = fo.read() | |
fo.close() | |
b = a.find('prism') | |
c = a[b:] | |
d = c.find('}') | |
e = c[:d+1] | |
f = e.replace('prism','#declare ' + sys.argv[1] + ' = ' + 'lathe') | |
g = f.replace(' linear_sweep\n','') |
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 os | |
import time | |
from PIL import Image | |
import psutil | |
filename = './rectangle.png' | |
modifiedTime = os.stat(filename).st_mtime | |
while True: | |
time.sleep(0.1) | |
checkTime = os.stat(filename).st_mtime |
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
# vapory depends on numpy | |
from vapory import * | |
camera = Camera( 'location', [30,30,-30], 'look_at', [0,0,0] ) | |
light1 = LightSource( [100,100,-200], 'color', [1,1,1] ) | |
light2 = LightSource( [-100,-100,200], 'color', [1,1,1] ) | |
bg = Background('color',[1,1,1]) | |
ll = [] |
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
convert *.png -background black -gravity center -extent 1280x720 -set filename:f '%t' '%[filename:f].jpg' |
NewerOlder