VMD-L Mailing List
From: Paul Grayson (pgrayson_at_ks.uiuc.edu)
Date: Fri Aug 30 2002 - 09:59:54 CDT
- Next message: Paul Grayson: "Re: Getting history and file completion to work in vmd console ?"
- Previous message: John Stone: "Re: Getting history and file completion to work in vmd console ?"
- In reply to: Marc Baaden: "Re: from points to a surface ?"
- Next in thread: Paul Grayson: "Re: from points to a surface ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
> OK, I have checked it, and see that right now there is a uniform color
> definition via 'graphics $graphicsmol color yellow'. So where would I
> be able to attribute a color to a given point/triangle ? I guess somewhere
> in the procedure hull_surface, but I don't really know what to change.
Okay, first, next to the line in lipid_surface
set coords [ $heads get {x y z} ]
you should also set up an array of the color values you want, like
this -
set colors [ $heads get beta ]
Then, next to
lappend triangles "\"$coords0\" \"$coords1\" \"$coords2\""
you should also build up a list of color values that corresponds to
the list of triangles - probably the average of the values at the
three vertices is fine.
The last line of code in the script draws the triangles using the
lists generated above. Add a line right before that that uses your
corresponding color list to set the color each time. Does that make
sense?
> OK, that is one kind of work-around. I guess my real problem is that for
> the surface I am looking at, I need several normals depending on where I
> am on the surface.
Oh, now I'm wondering if you really want to be using the lipid_surface
script. lipid_surface is really only applicable to lipid membranes -
did you try out the more general 3d_delaunay_surface?
Both of these scripts should use correct normals - that's why I use
the "trinorm" graphics function instead of "triangle". You should be
able to extract the normal information from the script right there.
-Paul
- Next message: Paul Grayson: "Re: Getting history and file completion to work in vmd console ?"
- Previous message: John Stone: "Re: Getting history and file completion to work in vmd console ?"
- In reply to: Marc Baaden: "Re: from points to a surface ?"
- Next in thread: Paul Grayson: "Re: from points to a surface ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]