12947
Comment: py3 print
|
12910
|
Deletions are marked like this. | Additions are marked like this. |
Line 207: | Line 207: |
def minkdemo(list1,list2): | def minkdemo(list1, list2): |
Line 214: | Line 214: |
temp = [stuff1[i] + stuff2[i] for i in range(len(stuff1))] output.append(temp) |
output.append([a + b for a, b in zip(stuff1, stuff2)]) |
Line 217: | Line 216: |
@interact def minksumvis(x1tri = slider(-1,1,1/10,0, label = 'Triangle point x coord.'), yb = slider(1,4,1/10,2, label = 'Blue point y coord.')): t_list = [[1,0],[x1tri,1],[0,0]] |
@interact def minksumvis(x1tri=slider(-1,1,1/10,0, label='Triangle point x coord.'), yb=slider(1,4,1/10,2, label='Blue point y coord.')): t_list = [[1,0], [x1tri,1], [0,0]] |
Line 230: | Line 230: |
for an_edge in p12poly.vertex_adjacencies(): edge_lines += line([verts[an_edge[0]], verts[an_edge[1][0]]]) edge_lines += line([verts[an_edge[0]], verts[an_edge[1][1]]]) |
# for an_edge in p12poly.vertex_adjacencies(): # edge_lines += line([verts[an_edge[0]], verts[an_edge[1][0]]]) # edge_lines += line([verts[an_edge[0]], verts[an_edge[1][1]]]) |
Sage Interactions - Miscellaneous
goto interact main page
Contents
Hearing a trigonometric identity
by Marshall Hampton. When the two frequencies are well separated, we hear the right hand side of the identity. When they start getting close, we hear the higher-pitched factor in the left-hand side modulated by the lower-pitched envelope.
Karplus-Strong algorithm for plucked and percussive sound generation
by Marshall Hampton
An Interactive Venn Diagram
Unreadable code
by Igor Tolkov
Profile a snippet of code
Evaluate a bit of code in a given system
by William Stein (there is no way yet to make the text box big):
Minkowski Sum
by Marshall Hampton
Cellular Automata
by Pablo Angulo, Eviatar Bach
Another Interactive Venn Diagram
by Jane Long (adapted from http://wiki.sagemath.org/interact/misc)
This interact models a problem in which a certain number of people are surveyed to see if they participate in three different activities (running, biking, and swimming). Users can indicate the numbers of people in each category, from 0 to 100. Returns a graphic of a labeled Venn diagram with the number of people in each region. Returns an explanatory error message if user input is inconsistent.