|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
octaviz and colorI'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? 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. Any pointers appreciated. -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> +1 215/837-2287 GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B |
|
|
Re: octaviz and colorI 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. Jonathan ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html ------------------------------------------------------------- |
|
|
Re: octaviz and colorHi,
Could you be more specific in how to assign scalar inputs and modifying a color scheme please? I have tried to plot only one triangle at each time with one color based in my curvature value at each of that triangle's peaks but I don't get a good result. Is there any way to do it as if it was a 4d plot, where the fourth dimension, represented as a color, takes values from a vector? Thanks very much Alberto
|
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |