# crystal_toolkit.helpers.asymptote_renderer module

Export wrapper for asymptote (ASY) For creating publication quality plots Since ASY does not have the nested tree structure of threejs, we just have to traverse the tree and draw each material as we see them.

TODO The code should also appends a set of special points at the end in case the user wants to add more “hand drawn” features to the plot

crystal_toolkit.helpers.asymptote_renderer.asy_write_data(input_scene_comp, fstream)

  parse a primitive display object in crystaltoolkit and print it to asymptote input_scene_comp fstream

crystal_toolkit.helpers.asymptote_renderer.filter_data(scene_data, fstream)

  Recursively traverse the scene_data dictionary to find objects to draw

crystal_toolkit.helpers.asymptote_renderer.traverse_scene_object(scene_data, fstream)

  Traverse object

crystal_toolkit.helpers.asymptote_renderer.write_asy_file(renderable_object, file_name, **kwargs)

  Generate the scene object and write it to file

  Parameters

    - renderable_object – Object to be rendered

    - file_name – name of file

crystal_toolkit.helpers.asymptote_renderer.write_ctk_scene_to_file(ctk_scene, file_name)

  ctk_scene : Scene object from crystaltoolkit filename : Output asymptote file and location