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
module box() { | |
cube([2,2,1], center = true); | |
} | |
module hedron(dihedral,n) { | |
intersection(){ | |
box(); | |
intersection_for(i=[1:n]) { | |
rotate([dihedral, 0, 360 / n * i]) box(); | |
} |
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
module box() { | |
cube([2,2,1], center = true); | |
} | |
module octahedron() { | |
dihedral = 109.47122; | |
n = 3; | |
intersection(){ | |
box(); | |
intersection_for(i=[1: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
dodecahedron by intersectionmodule box() { | |
cube([2,2,1], center = true); | |
} | |
module dodecahedron() { | |
dihedral = 116.565; | |
n=5; | |
intersection(){ | |
box(); | |
intersection_for(i=[1: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
<table> | |
<row> | |
<Ozone>41</Ozone> | |
<Solar.R>190</Solar.R> | |
<Wind>7.4</Wind> | |
<Temp>67</Temp> | |
<Month>5</Month> | |
<Day>1</Day> | |
</row> | |
<row> |
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 math | |
def distance(x=0,y=0,z=0) : | |
return math.sqrt(x*x + y*y + z*z) | |
def monopole_potential(Io,sigma,r) : | |
""" compute the potential in volts at a distance r from a monopole current source | |
Io current in amp | |
sigma - conductivity in ohm-1 m-1 | |
r distance in m |
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 Adafruit_I2C import Adafruit_I2C | |
# =========================================================================== | |
# CMPS10 Class | |
# The CMPS10 board is developed by devantech | |
# Chris Wallace 2012-09-19 | |
# 2012-09-24 addresses corrected, magnetic and true bearings, @property, dXYZ renamed | |
# =========================================================================== | |
class CMPS10(object) : |
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
#!/usr/bin/python | |
import time | |
from Devantech_CMPS10 import CMPS10 | |
compass = CMPS10() | |
declination = -2.2148 | |
while True : | |
magnetic_bearing= compass.bearing() | |
true_bearing = round((magnetic_bearing + declination) % 360,1) |
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
#!/usr/bin/python | |
import time | |
from Devantech_CMPS10 import CMPS10 | |
compass = CMPS10() | |
while True : | |
print compass.bearing(), compass.pitch(), compass.roll() | |
time.sleep(5) |
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 Adafruit_I2C import Adafruit_I2C | |
# =========================================================================== | |
# CMPS10 Class | |
# The CMPS10 board is developed by devantech | |
# Chris Wallace 2012-09-19 | |
# =========================================================================== | |
class CMPS10(object) : | |
__CMPS10_bearing8 = 0x01 |
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
#!/usr/bin/python | |
import serial | |
class Position(object) : | |
def __init__(self) : | |
self.latitude = 0.0 | |
self.longitude = 0.0 | |
self.altitude = 0.0 | |
self.courseOverGround = 0.0 |
NewerOlder