/home/jaubrey/webwork//pg_TRUNK/macros/LiveGraphics3D.pl

From WeBWorK

Jump to: navigation


LiveGraphics3D.pl

 ###########################################################################
 #
 #   Macros for handling interactive 3D graphics via the LiveGraphics3D
 #   Java applet.  The applet needs to be in the course html directory.
 #   (If it is in the system html area, you will need to change the
 #   default below or supply the jar option explicitly).
 #
 #   The LiveGraphics3D applet displays a mathematica Graphics3D object
 #   that is stored in a .m file (or a compressed one).  Use Mathematica
 #   to create one.  (In the future, I plan to write a perl class that
 #   will create these for you on the fly. -- DPVC)
 #
 #   The main routines are
 #
 #      Live3Dfile          load a data file
 #      Live3Ddata          load raw Graphics3D data
 #      LiveGraphics3D      access to all parameters
 #
 
 #
 #  LiveGraphics3D(options)
 #
 #  Options are from:
 #
 #     file => name           name of .m file to load
 #
 #     archive => name        name of a .zip file to load
 #
 #     input => 3Ddata        string containing Graphics3D data to
 #                            be displayed by the applet
 #
 #     size => [w,h]          width and height of applet
 #
 #     vars => [vars]         hash of variables to pass as independent
 #                            variables to the applet, togther with
 #                            their initial values
 #                              e.g., vars => [a=>1,b=>1]
 #
 #     depend => [list]       list of dependent variables to pass to
 #                            the applet with their replacement strings
 #                            (see LiveGraphics3D documentation)
 #
 #     jar => URL             where to find the live.jar file
 #
 #     background=>"#RRGGBB"  the background color to use (default is white)
 #
 #     scale => n             scaling factor for applet (default is 1.)
 #
 #     image => file          a file containing an image to use in TeX mode
 #                            or when Java is disabled
 #
 #     tex_size => ratio      a scaling factor for the TeX image (as a portion
 #                            of the line width).  
 #                                1000 is 100%, 500 is 50%, etc.
 #
 #     tex_center => 0 or 1   center the image in TeX mode or not
 #
 #     Live3D => [params]     hash of additional parameters to pass to
 #                            the Live3D applet.
 #                              e.g. Live3D => [VISIBLE_FACES => "FRONT"]
 #