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
""" | |
author: matt venn | |
turtle program to demonstrate a cellular automaton called Rule 90. | |
http://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle | |
It draws patterns that have the appearance of the Sierpinski triangle | |
http://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle | |
Rules: If the current pattern is: 111 110 101 100 011 010 001 000 |
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 turtle import* | |
loops = 0 | |
while loops < 100: | |
loops = loops + 1 | |
forward(100) | |
left(90) | |
penup() | |
forward (30) | |
left (90) |
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 turtle import * | |
fillcolor("blue") | |
shape("square") | |
#start the fill | |
begin_fill() | |
loops = 0 |
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 turtle import * | |
import random | |
penup() | |
a=float(raw_input("starting x")) | |
b=float(raw_input("starting y")) | |
i=0 | |
while i<=1000: | |
n=random.randint(1,3) | |
if n==1: | |
a=(a-200)/2 |
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 turtle import * | |
cat=100 | |
loops = 0 | |
while loops < 100: | |
loops +=1 | |
forward (cat) | |
backward (50) | |
right (90) | |
pencolor("red") | |
forward (50) |
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 turtle import * | |
pencolor(0.8,0.3,0.3) | |
forward(100) | |
forward(100) | |
left(100) | |
forward(100) | |
forward(100) | |
left(100) |
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 turtle import * | |
shape ("triangle") | |
speed (90) | |
for count in range(100): | |
color("red") | |
pensize(9) | |
forward(100) | |
left(90) |
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 turtle import * | |
shape ("turtle") | |
speed(25) | |
color("blue") | |
pensize(6) | |
forward(150) | |
right(90) | |
forward(25) |
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 turtle import* | |
loops = 0 | |
while loops < 10: | |
circle(100) | |
circle(40,180) | |
speed(100) | |
forward(90) | |
left(70) | |
penup() |
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
#include <ESP8267WiFi.h> | |
#include <WiFiClient.h> | |
#include "secrets.h" | |
//this will be changed to match oshcamp network | |
const char *ssid = "WutheringBytes"; | |
WiFiServer server(1337); | |
#define STROBE 15 | |
void setup() |
OlderNewer