colour dependent on the value at a certain point
1 view (last 30 days)
Show older comments
So I plan to represent some data in terms of a sphere. I want to draw a sphere using my x y and z coordinates which I think I know how to do but then I would like to colour code the surface of the sphere dependent on the values of my function which depend on x and y z so to have for example, red for high values blue for low etc. any ideas how I go about this?
Many thanks guys! :)
10 Comments
Walter Roberson
on 20 Jan 2013
Ah, then spherical output representation becomes reasonable -- though surface of the sphere vs sphere as a volume becomes a consideration.
I take it you wrote your own spherical FFT routine? For any particular cubiod array input indices (I,J,K), what location is mapped to in your array that you put through your FFT routine? I presume here that the FFT routine puts its results into exactly the same logical shape as what was passed to it? If so then you should then be able to reverse the process to map the outputs back to cubiod array indices. Not using sphere(), just based on the exact reverse of the mapping that was used in the input processing. Once the FFT values are mapped back to cubiod array locations, we can proceed to do a voxel viewing or spherical surface generation.
Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!