ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 05 May 2021 20:11:13 +0200Assign RGB values to points on implicit_plot3d graphhttps://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/Is there a way to assign an explicit RGB color to each point satisfying an equation of the form f(x,y,z)=c? For instance, I would like it if the command
```
implicit_plot3d(x+y+z==1,(x,0,1),(y,0,1),(z,0,1),color=(x,y,z))
```
colored the standard 2-simplex in R^3 according to the associated RGB values, but it doesn't. I'm aware that one can use colormaps and functions R^3 -> R to color the output of implicit_plot3d but I would like to use a function R^3 -> [0,1]^3 to do the coloring.Tue, 04 May 2021 21:17:37 +0200https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/Comment by FrédéricC for <p>Is there a way to assign an explicit RGB color to each point satisfying an equation of the form f(x,y,z)=c? For instance, I would like it if the command</p>
<p><code>
implicit_plot3d(x+y+z==1,(x,0,1),(y,0,1),(z,0,1),color=(x,y,z))
</code> </p>
<p>colored the standard 2-simplex in R^3 according to the associated RGB values, but it doesn't. I'm aware that one can use colormaps and functions R^3 -> R to color the output of implicit_plot3d but I would like to use a function R^3 -> [0,1]^3 to do the coloring.</p>
https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56983#post-id-56983First step would be to open a ticket asking for this feature on the trac server : https://trac.sagemath.org/Wed, 05 May 2021 20:11:13 +0200https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56983#post-id-56983Comment by FrédéricC for <p>Is there a way to assign an explicit RGB color to each point satisfying an equation of the form f(x,y,z)=c? For instance, I would like it if the command</p>
<p><code>
implicit_plot3d(x+y+z==1,(x,0,1),(y,0,1),(z,0,1),color=(x,y,z))
</code> </p>
<p>colored the standard 2-simplex in R^3 according to the associated RGB values, but it doesn't. I'm aware that one can use colormaps and functions R^3 -> R to color the output of implicit_plot3d but I would like to use a function R^3 -> [0,1]^3 to do the coloring.</p>
https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56957#post-id-56957see also https://ask.sagemath.org/question/36386/color-parametric_plot3d-by-a-rgb-color-rather-than-a-colormap/Tue, 04 May 2021 21:52:52 +0200https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56957#post-id-56957Comment by FrédéricC for <p>Is there a way to assign an explicit RGB color to each point satisfying an equation of the form f(x,y,z)=c? For instance, I would like it if the command</p>
<p><code>
implicit_plot3d(x+y+z==1,(x,0,1),(y,0,1),(z,0,1),color=(x,y,z))
</code> </p>
<p>colored the standard 2-simplex in R^3 according to the associated RGB values, but it doesn't. I'm aware that one can use colormaps and functions R^3 -> R to color the output of implicit_plot3d but I would like to use a function R^3 -> [0,1]^3 to do the coloring.</p>
https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56956#post-id-56956Well, it's just a matter of someone implementing that. The beauty of open source is that you could in fact do that yourself. You could also propose to sponsor sage if somebody else does the job. https://github.com/sponsors/sagemathTue, 04 May 2021 21:45:17 +0200https://ask.sagemath.org/question/56955/assign-rgb-values-to-points-on-implicit_plot3d-graph/?comment=56956#post-id-56956