Module: sage.plot.plot3d.base
Base classes for 3D Graphics objects and plotting.
Author Log:
TODO: - finish integrating tachyon - good default lights, camera
Module-level Functions
) |
This is an optimized routine to turn a list of lists (of lists ...) into a single list. We generate data in a non-flat format to avoid multiple data copying, and then concatenate it all at the end.
This is NOT recursive, otherwise there would be a lot of redundant copying (which we are trying to avoid in the first place, though at least it would be just the pointers).
) |
Return the componentwise maximum of a list of 3-tuples.
sage: from sage.plot.plot3d.base import min3, max3 sage: max3([(-1,2,5), (-3, 4, 2)]) (-1, 4, 5)
) |
Return the componentwise minimum of a list of 3-tuples.
sage: from sage.plot.plot3d.base import min3, max3 sage: min3([(-1,2,5), (-3, 4, 2)]) (-3, 2, 2)
) |
) |
Given a list v of dictionaries, this function merges them such that later dictionaries have precedence.
) |
sage: from sage.plot.plot3d.base import point_list_bounding_box sage: point_list_bounding_box([(1,2,3),(4,5,6),(-10,0,10)]) ((-10.0, 0.0, 3.0), (4.0, 5.0, 10.0))
Class: BoundingSphere
Functions: transform
Special Functions: __add__,
__init__,
__repr__
) |
) |
) |
Class: Graphics3d
Functions: aspect_ratio,
bounding_box,
default_render_params,
export_jmol,
flatten,
frame_aspect_ratio,
jmol_repr,
mtl_str,
obj,
obj_str,
rotate,
rotateX,
rotateY,
rotateZ,
scale,
show,
tachyon,
tachyon_str,
texture_set,
transform,
translate,
viewpoint,
x3d
) |
DO NOT override this method, override obj_repr instead.
) |
Input:
**kwds - other options, which make sense for particular rendering engines
CHANGING DEFAULTS: Defaults can be uniformly changed by importing a dictionary and changing it. For example, here we change the default so images display without a frame instead of with one:
sage: from sage.plot.plot3d.base import SHOW_DEFAULTS sage: SHOW_DEFAULTS['frame'] = False
This sphere will not have a frame around it:
sage: sphere((0,0,0))
We change the default back:
sage: SHOW_DEFAULTS['frame'] = True
Now this sphere is enclosed in a frame:
sage: sphere((0,0,0))
We illustrate use of the aspect_ratio option:
sage: x, y = var('x,y') sage: p = plot3d(2*sin(x*y), (x, -pi, pi), (y, -pi, pi)) sage: p.show(aspect_ratio=[1,1,1])
This looks flattened, but filled with the plot:
sage: p.show(frame_aspect_ratio=[1,1,1/16])
This looks flattened, but the plot is square and smaller:
sage: p.show(aspect_ratio=[1,1,1], frame_aspect_ratio=[1,1,1/8])
) |
DO NOT override this method, override tachyon_repr instead.
Special Functions: __add__,
__radd__,
__repr__,
__str__,
_box_for_aspect_ratio,
_determine_frame_aspect_ratio,
_prepare_for_jmol,
_prepare_for_tachyon,
_rescale_for_frame_aspect_ratio_and_zoom,
_safe_bounding_box,
_set_extra_kwds,
_transform_to_bounding_box
) |
) |
) |
) |
) |
) |
) |
) |
) |
) |
) |
Class: Graphics3dGroup
Functions: bounding_box,
flatten,
jmol_repr,
obj_repr,
tachyon_repr,
texture_set,
transform,
x3d_str
Special Functions: __init__
) |
Class: PrimitiveObject
Functions: get_texture,
jmol_repr,
obj_repr,
set_texture,
tachyon_repr,
texture_set,
x3d_str
Special Functions: __init__
Class: RenderParams
Functions: pop_transform,
push_transform,
unique_name
Special Functions: __init__
) |
Class: TransformGroup
Functions: bounding_box,
flatten,
get_transformation,
jmol_repr,
obj_repr,
tachyon_repr,
transform,
x3d_str
Special Functions: __init__
) |
Class: Viewpoint
Functions: x3d_str
Special Functions: __init__
) |
See About this document... for information on suggesting changes.