Q.068 - Why doesn't sphere_atom work in my ODL file ?

Category: S.068 - draw

The following ODL file illustrates how you can make your own objects with spheres:

  begin_object q
    Light .3 .3 .3
    Surf_mode 4 4
    Surf_prop .2 .7 .8 90. .0
    sphere_atom a a132 c1 3. 18010
  end_object

You need some extra instructions to generate the lighting parameters, and the colour is a packed integer. Get this value by setting paint_colour to what you want and then write out the contents of .active_colour:

  O > paint_colour wino_nose_red
  O > write .active_colour ;;