rend.AddObject(TH1) #Create a new transformation set and #add Rotation tranformations to the set #(These will be the transformations changed # in the GUI to make the objects rotate) TS2 = Tf.Transform() TS2.AddTransf(Tf.Rotation(0, 1)) TS2.AddTransf(Tf.Rotation(0, 2)) TS2.AddTransf(Tf.Translation(0, 1)) TS2.AddTransf(Tf.Translation(0, 2)) #Create First Light Source L1O = Sh.Point(5, 0, 2) #Point of origin (not used for now) L1D = Sh.Vec(Sh.Point(-1, 0, 0)) #Direction L1 = Sh.Light(L1O, L1D, 0.5) #Create Light object #Create Second Light Source L2O = Sh.Point(0, -3, 0) L2D = Sh.Vec(Sh.Point(0, 1, 2)) L2 = Sh.Light(L2O, L2D, 0.3) #Add the transformation (rotaiton) rend.AddTransf(TS2) #Add the lights rend.AddLightLum(L1) rend.AddLightLum(L2) # rend.ApplyTransf() #Apply the transformations # rend.ApplyLight() #Apply the lighting # myarray=rend.Render() #Render the image