Differences between revisions 35 and 43 (spanning 8 versions)
Revision 35 as of 2019-11-15 08:17:23
Size: 18331
Editor: chapoton
Comment: py3 print
Revision 43 as of 2023-08-30 08:21:15
Size: 18248
Editor: pang
Comment: mini comment in Banchoff-Pohl
Deletions are marked like this. Additions are marked like this.
Line 89: Line 89:

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
However, in the following there is only one interact, to make sagecell works.
Line 121: Line 119:
Line 126: Line 123:
    
Line 132: Line 129:
   
Line 135: Line 132:
    
Line 138: Line 135:
    
    ufunc = function('ufunc', t)
    vfunc = function('vfunc', t)
    
    dFtt = F(u=ufunc, v=vfunc
).diff(t, t)
    
    ec1 = dFtt.dot_product(dFu(u=ufunc, v=vfunc))
    ec2 = dFtt.dot_product(dFv(u=ufunc, v=vfunc))
    

    ufunc = function('ufunc')
    vfunc = function('vfunc')

    dFtt = F(u=ufunc(t), v=vfunc(t)
).diff(t, t)

    ec1 = dFtt.dot_product(dFu(u=ufunc(t), v=vfunc(t)))
    ec2 = dFtt.dot_product(dFv(u=ufunc(t), v=vfunc(t)))
Line 148: Line 145:
         diffec1 = ec1.subs_expr(diff(ufunc, t) == du,
                            diff(ufunc, t, t) == ddu,
                            diff(vfunc, t) == dv,
                            diff(vfunc, t, t) == ddv,
                            ufunc == u, vfunc == v)
    diffec2 = ec2.subs_expr(diff(ufunc, t) == du,
                            diff(ufunc, t, t) == ddu,
                            diff(vfunc, t) == dv,
                            diff(vfunc, t, t) == ddv,
                            ufunc == u, vfunc == v)

    diffec1 = ec1.substitute(diff(ufunc(t), t) == du,
                            diff(ufunc(t), t, t) == ddu,
                            diff(vfunc(t), t) == dv,
                            diff(vfunc(t), t, t) == ddv,
                            ufunc(t) == u, vfunc(t) == v)
    diffec2 = ec2.substitute(diff(ufunc(t), t) == du,
                            diff(ufunc(t), t, t) == ddu,
                            diff(vfunc(t), t) == dv,
                            diff(vfunc(t), t, t) == ddv,
                            ufunc(t) == u, vfunc(t) == v)
Line 160: Line 157:
    
Line 163: Line 160:
        
Line 166: Line 163:
    
Line 170: Line 167:
        
Line 173: Line 170:
    Point = map(float, Point)
    velocity = map(float, velocity)
    
    Point = list(map(float, Point))
    velocity = list(map(float, velocity))
Line 179: Line 176:
    
Line 181: Line 178:
    
Line 186: Line 183:
    
Line 192: Line 189:
    
Line 352: Line 349:
    print('A curve of lenght %f'%longitud((curvax, curvay), t0, t1))     print('A curve of length %f'%longitud((curvax, curvay), t0, t1))
Line 354: Line 351:
    cortes_tot = sum(k*v for k,v in cortesd.iteritems())     cortes_tot = sum(k*v for k,v in cortesd.items())
Line 360: Line 357:
== 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 "area" ==
by Pablo Angulo. Approximates 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.
Line 413: Line 410:
        pp += parametric_plot3d(l1*v1+l2*v2+t*v,(t,-2,2),         # fix 30-08-23: coercion of (l1*v1+l2*v2) to SymbolicRing did not work
pp += parametric_plot3d((1+0*t)*(l1*v1+l2*v2)+t*v,(t,-2,2),

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. However, in the following there is only one interact, to make sagecell works.

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. Approximates 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)