Page history Edit this page How do I edit this website?
Original MediaWiki page

3D Viewer › Surface Plot

The content of this page has not been vetted since shifting away from MediaWiki. If you’d like to help, check out the how to help guide!

How to work with surface plots

You can download example source code for this HowTo here.

Before reading this HowTo, it may be helpful to read The relation between Content and Universe.

Surface plots show a 2D image as a 3D plot, where the 3rd dimension is given by the intensity.

Because only one slice of an image stack can be displayed a time, SurfacePlot2D offers a method to set the displayed slice:

// Add the image as a volume
Content c = univ.addSurfacePlot(imp);

// Retrieve the SurfacePlotGroup
SurfacePlotGroup splot = (SurfacePlotGroup)c.getContent();

// Scroll through the slices
for(int i = 0; i < 15; i++) {
	splot.setSlice(i + 1);