[英]Octave: how can I colorize an isosurface?
I'm trying to make an isosurface be colorized by pretty much anything. 我正在尝试使等值面几乎由任何颜色着色。 The details don't matter, but at the moment it's a single-color green blob. 细节无关紧要,但此刻它是单色的绿色斑点。 I've tried using isocolors
, and the best I could get was that the whole thing turned a shade of teal instead. 我试过使用isocolors
,而我能得到的最好的结果是,整个东西变成了蓝绿色。
Huh. 嗯 And I found something. 我发现了一些东西。
Before I had used this command (all variables are 21x21x21 matrices) 在使用此命令之前(所有变量均为21x21x21矩阵)
isosurface(X,H,R,DX_DT, 0)
What worked was 起作用的是
isosurface(X,H,R,DX_DT, 0, ones(21,21,21).*0:20)
Basically, calling 基本上,打电话
isosurface(x,y,z,val, iso, col)
I had avoided trying that because I couldn't figure out how I was supposed to format col
. 我避免尝试该操作,因为我无法弄清楚应该如何格式化col
。 Were it supposed to be 3 dims, for RGB? 是否应该为RGB变暗3次? Turns out you just need different values there, and Octave will scale them to span the whole color space, whether they go from 0-1 or 1-100. 事实证明,您只需要在那里使用不同的值,并且无论它们是0-1还是1-100,Octave都会缩放它们以覆盖整个色彩空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.