Happy Xmas from Accelrys!
The zip file contains two scripts:
GenerateTree - generates a christmas tree with settings such as number of generations, number of baubles etc. This script can be run in Debug mode or on the server.
SparkleLights - a script which runs for a long time, changing the color of the baubles on the tree. This script should only be run in Debug mode and remember that you can hit the Escape key to stop the script.
Note. Once you have generated the tree, try changing your Display Option settings to enhance the view. I found that Perpective with a Black-Blue background color looked pretty cool.
From a MaterialsScript API perspective, this uses some interesting functionality:
- Distance monitors - used to increase the size of each generation.
- AtomVolumes - used to create the surfaces of each generation, the trunk, and the snow.
- FieldProbes - used to place the baubles on the edge of the isosurfaces for the generations. This includes a check to make sure that the baubles are not hidden by intersecting fields.
If anyone wants to take the challenge of extending this - how about stars in the sky or a nice snowman?
Minimum version: Materials Studio 4.2
Modules: Materials Visualizer
Cheers
Stephen