alohse / MIC-Polymer-MD-Simulations

Research pages are opinions onto Github pages that specifically designed for research science
http://alohse.github.io/MIC-Polymer-MD-Simulations
1 stars 1 forks source link

plotting density data in voxels #8

Open alohse opened 9 years ago

alohse commented 9 years ago

@npaulson

How did you plot the outlines of the individual boxes (at corners, in our last post). I wrote a code to calculate density and want to try and represent density in each voxel with color intensity but I can't figure out how to plot it for just individual voxels. (We can talk in class too)

npaulson commented 9 years ago

@alohse

I just uploaded a code which includes how to plot those boxes. As a summary, I have the array 'box' which is essentially an array of x,y and z points, which when plotted with plot3, makes a box centered at zero with a sidelength of 1. Simply add coordinates to translate this box, or multiply by a scalar to scale it.

https://github.com/alohse/MIC-Polymer-MD-Simulations/blob/gh-pages/CODES/voxel_2pt_stats_v5.m