[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: octaviz and color

From: Jonathan Stickel
Subject: Re: octaviz and color
Date: Sat, 22 Oct 2005 21:40:31 -0700
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

I would have responded sooner, but I have been away at a conference ...

Jeff Abrahamson wrote:
I've been playing with octaviz all morning.  It's very nice.  My need
is to image surfaces for which I have triangular meshes, so I find
myself using vtk_trisurf mostly.

Near as I can tell, though, vtk_trisurf.m ignores anything I say about
color.  Am I confused?

There are currently two ways to give color information to vtk_surf and vtk_trisurf: either a set of scalars corresponding to the individual points, or an [R,G,B] vector defining a single color for the entire plot. For the former, the scalars are mapped through a color scheme to produce the final color of the surface. In Octaviz CVS there is now a function to change the color mapping (vtk_colormap).

What I want to be able to do is color certain triangles special
colors, such as have a triangulated shape that is all light gray but a
few regions I'll want to highlight in blue and a few others I'll want
to highlight in red.

As a toy example, suppose I want to discover regions of high
curvature.  I'd then want to highlight triangles adjacent to high
curvature areas so I can see how well my curvature program works.

Assigning scalar inputs and a color scheme may be sufficient for you. Assign high scalar values to points of high curvature and low scalar values elsewhere. Then choose a color scheme that you like (from octave-forge functions). You could also define your own colormap.

It is possible to use low level vtk programming to assign individual points (or triangles) certain colors, but for that you will need to learn VTK. I think you will get what you want quicker by using the available scripts.


Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]