Differences between revisions 17 and 23 (spanning 6 versions)
 ⇤ ← Revision 17 as of 2012-04-07 04:44:22 → Size: 14162 Editor: jason Comment: ← Revision 23 as of 2020-06-02 15:12:19 → ⇥ Size: 14286 Editor: kcrisman Comment: Deletions are marked like this. Additions are marked like this. Line 9: Line 9: {{{#!sagecell#!sagecell {{{#!sagecell Line 11: Line 11: from math import cos,sin Line 13: Line 12: from math import cos, sin Line 107: Line 107: print "Bug selecting plot?" print("Bug selecting plot?") Line 111: Line 111: html('

%s

'%example) pretty_print(html('

%s

'%example)) Line 113: Line 113: html('

%s

'%(url,url))    show(P, viewer='tachyon' if tachyon else 'jmol', frame=frame) pretty_print(html('

%s

'%(url,url)))    show(P, viewer='tachyon' if tachyon else 'threejs', frame=frame) Line 145: Line 145: viewer='tachyon' if tachyon else 'jmol', viewer='tachyon' if tachyon else 'threejs', Line 163: Line 163: }}}{{{#!sagecell@interactdef _(band_number = selector(range(1,5)), current_color = Color('red')): @interactdef _(band_number = selector(range(1,5)), current_color = Color('red'), auto_update=False): Line 178: Line 177: def color_experimenter(expression=input_box('', 'Expression', str), color=Color('red')): def color_experimenter(expression=input_box('x^2', 'Expression', str), color=Color('red')): Line 183: Line 182: print "There's a problem with your expression." print("There's a problem with your expression.")    else:        print("Be sure to enter a plottable expression") Line 191: Line 192: print '

Error: %s

' % msg pretty_print(html('

Error: %s

' % msg)) Line 199: Line 200: print error_msg('This is not an expression.') print(error_msg('This is not an expression.')) Line 204: Line 205: print "var('%s')\nplot(%s).show(%s%s%s)" % (expression.variables()[0], repr(expression), 'aspect_ratio=1' if square else '', ', ' if square and not axes else '', 'axes=False' if not axes else '') print("var('%s')\nplot(%s).show(%s%s%s)" % (expression.variables()[0], repr(expression), 'aspect_ratio=1' if square else '', ', ' if square and not axes else '', 'axes=False' if not axes else '')) Line 210: Line 211: print "var('%s')\nplot(%s)" % (expression.variables()[0], repr(expression)) print("var('%s')\nplot(%s)" % (expression.variables()[0], repr(expression))) Line 213: Line 214: print error_msg('This expression has more than one variable.') print(error_msg('This expression has more than one variable.')) Line 216: Line 217: print error_msg("This expression contains an unknown function.") print(error_msg("This expression contains an unknown function.")) Line 274: Line 275: if h=='hypotrochoid' and (b>=1 or b<=0):        print "In a hypotrochoid, radius must be between 0 and 1."        draw=False    if h=='epitrochoid' and b<=0:        print "In a epitrochoid, radius must be positive" if h == 'hypotrochoid' and (b >= 1 or b <= 0):        print("In a hypotrochoid, radius must be between 0 and 1.")        draw = False    if h == 'epitrochoid' and b <= 0:        print("In a epitrochoid, radius must be positive")

# Sage Interactions - Graphics

## Curves of Pursuit

by Marshall Hampton.

## Somewhat Silly Egg Painter

by Marshall Hampton (refereed by William Stein)

## Plot Coloring

by Timothy Clemans

## Interactive 2D Plotting

by Timothy Clemans

## Spirograph

interact/graphics (last edited 2020-06-02 15:13:32 by kcrisman)