Differences between revisions 34 and 35
Revision 34 as of 2019-11-15 08:15:40
Size: 18320
Editor: chapoton
Comment: no iteritems
Revision 35 as of 2019-11-15 08:17:23
Size: 18331
Editor: chapoton
Comment: py3 print
Deletions are marked like this. Additions are marked like this.
Line 210: Line 210:
            print 'Vertices:', len(g.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(g.edges()), ('(%s*(%s/2))' %(len(g.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(g.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(g.edges()), ('(%s*(%s/2))' %(len(g.vertices()), Dimension) if Calculations else ''))
Line 215: Line 215:
            print 'Vertices:', len(g.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(g.edges()), ('(%s*(%s/2))' %(len(g.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(g.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(g.edges()), ('(%s*(%s/2))' %(len(g.vertices()), Dimension) if Calculations else ''))
Line 222: Line 222:
            print 'Vertices:', len(s.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(s.edges()), ('(%s*(%s/2))' %(len(s.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(s.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(s.edges()), ('(%s*(%s/2))' %(len(s.vertices()), Dimension) if Calculations else ''))
Line 227: Line 227:
            print 'Vertices:', len(s.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(s.edges()), ('(%s*(%s/2))' %(len(s.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(s.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(s.edges()), ('(%s*(%s/2))' %(len(s.vertices()), Dimension) if Calculations else ''))
Line 233: Line 233:
            print 'Vertices:', len(d.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(d.edges()), ('(%s*(%s/2))' %(len(d.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(d.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(d.edges()), ('(%s*(%s/2))' %(len(d.vertices()), Dimension) if Calculations else ''))
Line 238: Line 238:
            print 'Vertices:', len(d.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(d.edges()), ('(%s*(%s/2))' %(len(d.vertices()), Dimension) if Calculations else '')             print('Vertices:', len(d.vertices()), ('(2^%s)'%Dimension if Calculations else ''), '\nEdges:', len(d.edges()), ('(%s*(%s/2))' %(len(d.vertices()), Dimension) if Calculations else ''))
Line 352: Line 352:
    print 'A curve of lenght %f'%longitud((curvax, curvay), t0, t1)     print('A curve of lenght %f'%longitud((curvax, curvay), t0, t1))
Line 355: Line 355:
    print 'Approx length using Crofton\'s formula: %f'%((cortes_tot/L)*(pi*M))     print('Approx length using Crofton\'s formula: %f'%((cortes_tot/L)*(pi*M)))
Line 434: Line 434:
    print 'Bahnchoff-Pohl area of the curve(aprox): %f'%bp_area_aprox     print('Bahnchoff-Pohl area of the curve(aprox): %f' % bp_area_aprox)

Sage Interactions - Geometry

goto interact main page

Intersecting tetrahedral reflections FIXME

by Marshall Hampton. Inspired by a question from Hans Schepker of Glass Geometry.

tetrareflect.png

Evolutes

by Pablo Angulo. Computes the evolute of a plane curve given in parametric coordinates. The curve must be parametrized from the interval [0,2pi].

evoluta3.png

Geodesics on a parametric surface

by Antonio Valdés and Pablo Angulo. This example was originally composed of two interacts:

  • - the first allowing the user to introduce a parametric surface, and draw it. - the second drawing a geodesic within the surface.

The separation was so that after the first interact, the geodesic equations were "compiled", thus making the second interact faster.

This still looks as a good idea to me, so please read the original code at https://malabares.cancamusa.net/home/pub/14/ But the following is fixed so that there is only one interact, and sagecell works. There might be another way yto

geodesics1.png geodesics2.png

Dimensional Explorer

By Eviatar Bach

Renders 2D images (perspective or spring-layout) and 3D models of 0-10 dimensional hypercubes. It also displays number of edges and vertices.

dimensions.png

Crofton's formula

by Pablo Angulo. Illustrates Crofton's formula by throwing some random lines and computing the intersection number with a given curve. May use either solve for exact computation of the intersections, or may also approximate the curve by straight segments (this is the default).

crofton4.png

Banchoff-Pohl area

by Pablo Angulo. Computes the Banchoff-Pohl "area enclosed by a spatial curve", by throwing some random lines and computing the linking number with the given curve. Lines not linked to the given curve are displayed in red, linked lines are displayed in green.

banchoff-pohl.png

interact/geometry (last edited 2023-08-30 08:21:15 by pang)