#12212: Colormap for implicit_plot3d and parametric_plot3d
-------------------------------------+-------------------------------------
Reporter: niles | Owner: jason, was
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: graphics | Resolution:
Keywords: colormap, plot | Merged in:
Authors: Joris | Reviewers: Frédéric Chapoton,
Vankerschaver, Frédéric Chapoton | Niles Johnson
Report Upstream: N/A | Work issues:
Branch: u/chapoton/12212 | Commit:
Dependencies: | 41fe504cbf6dc5244e22bfd6dd4b374fd7d1eb28
| Stopgaps:
-------------------------------------+-------------------------------------
Comment (by niles):
Replying to [comment:77 niles]:
>
> It could be possible to combine these two approaches:
>
> * Partition triangles according to texture and hence take advantage of
> the more robust support for textures in the graphics classes.
>
> * Construct this partition during the triangulation process, rather
> than after the fact.
>
> Before I start working on this, please let me know if you have
suggestions or concerns about this idea.
>
Well, I've been thinking about this approach, and the fact that it would
produce a different `IndexFaceSet` for every texture value. If only one
texture parameter were to vary (e.g. color), then maybe the number of
different objects would be manageable (around 20 different colors looks ok
and is fast). But varying two or more attributes quickly puts the number
of objects into the hundreds, and that's too many (too slow). Moreover,
partitioning in this way looses the global structure of the object (this
is used, e.g. in the triangulation code for `ParametricSurface` to see
whether the surface is enclosed or not).
I also think it's worth noting the way tachyon handles textures, since
presumably its author is more experienced than we are with these kinds of
issues. Tachyon has a list of textures, and each object has a pointer to
the texture which should be applied to it. I believe other rendering
software works this way too (see `Graphics3d.texture_set` and
`Graphics3dGroup.texture_set`). This is similar to the way `IndexFaceSet`
handles faces (storing pointers to vertices, rather than the vertices
themselves).
So maybe the ideal way forward would be to have each face of an
`IndexFaceSet` have a pointer to a texture with the relevant color,
opacity, etc. But it would be wasteful to do this by adding a new texture
for every single face.
Anyway, now I've spent a nontrivial number of hours thinking about this,
and I don't see an easy way forward. I'm just generally unhappy with the
way textures are handled in the 3d plotting code, and that's not an issue
for this ticket.
--
Ticket URL: <http://trac.sagemath.org/ticket/12212#comment:79>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.