Hello Folks, I am trying to make triangles using cgo objects Here is the code, this does not work ********************************* from pymol.cgo import * from pymol import cmd obj = [] obj.extend( [ TRIANGLE, 0.0, 0.0, 0.0, #vertex 1 1.0, 0.0, 0.0, #vertex 2 0.0, 0.0, 1.0, #vertex 3 0,1,0, #normal 1 0,1,0, #normal 2 0,1,0, #normal 3 1,1,1, #color vertex 1 1,1,1, #color vertex 2 1,1,1, #color vertex 3 ] ) cmd.load_cgo(obj,'my_triangle') ***********************************
But this one works ************************* obj=[BEGIN, TRIANGLES, VERTEX, 0.0, 0.0, 0.0, VERTEX, 4,4,4, VERTEX, 0.0, 0.0, 2.0, END ] cmd.load_cgo(obj,'my_tri') ******************************* I looked into cgo.h, cgo.c and manual it seemed vertices,normals and colors is all that's needed for triangles Please let me know what is missing/wrong. Thanks for your time. Regards --Amit PS: Chris your normalization code will come in handy when I get this thing to work properly. Thanks!