Vector on 3 dimensional plot

Hello Everyone,

I am looking for help with plotting vectors on a 3 dimensional graph. I made a 3D scatter plot using XYZ coordinates from a crystal structure. I am now looking to draw vectors from each point on the scatter plot and was wondering if anyone has experience doing something similar.

Thank you in advance for any help!

pawel.wzietek

I sometimes used vectors in a Gizmo plot, not atoms so I can't give you a complete code for your app but this short piece of my code should provide an example :

	// (...)
	string nline="line"+num2str(i)
		
	AppendToGizmo line={x1,y1,z1,x2,y2,z2}, name=$nline
	if(mode==0)  //lines
	
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ arrowMode,2}
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ endArrowHeight,0.1}
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ endArrowBase,0.017}
	ModifyGizmo modifyObject=$nline,objectType=line, property={Clipped,0}
	
	else  //cylinders
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ arrowMode,18}
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ cylinderStartRadius,0.01}
	ModifyGizmo ModifyObject=$nline,objectType=line,property={ cylinderEndRadius,0.01}
	ModifyGizmo modifyObject=$nline,objectType=Line,property={calcNormals,1}
	endif

   //append to display list
	ModifyGizmo setDisplayList=-1, object=$nline

 

DisplayHelpTopic "ModifyGizmo for Objects"

 

Pawel

 

 

 

 

 

Igor

You may want to check out an example under File Menu->Example Experiments->Visualization->Advanced->Scatter Arrows.

In general there are a number of ways to implement this and the choice would depend on your specific application.  Feel free to reach out to me at support@wavemetrics.com so I can help you off-line.

A.G.