Message Boards Message Boards

2
|
3175 Views
|
2 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Vertex colors for lines and tubes in 13.0 vs 13.1

In version 13.0 there were some issues with vertex colors for tubes which has been fixed in 13.1.

However now specifying multiple lines within one Graphics Primitive The vertex colors are only applied the first object. The workaround is easy by just defining individual Graphics Primitives, but i don't think this is the intended behavior.

Version 13.0 enter image description here

Version 13.1 enter image description here

dat = {Table[{Cos[x], Sin[x], x/10}, {x, 0., 10}], 
   Table[{Cos[x], Sin[x], x/10 + 2}, {x, 0., 10}]};
col = Map[RGBColor, dat, {2}];
pl = {
  Graphics3D[{PointSize[Large], 
    Point[Flatten[dat, 1], VertexColors -> Flatten@col], Line[dat]}],
  Graphics3D[{Thick, Line[dat, VertexColors -> col]}],
  Graphics3D[{CapForm["Square"], JoinForm["Miter"], 
    Tube[dat, VertexColors -> col]}, Lighting -> "Neutral"]
  }


dat = RandomReal[1, {150, 7, 3}];
col = Map[RGBColor, dat, {2}];
pl = {
  Graphics3D[{PointSize[Large], 
    Point[Flatten[dat, 1], VertexColors -> Flatten@col], Line[dat]}],
  Graphics3D[{Thick, Line[dat, VertexColors -> col]}],
  Graphics3D[{CapForm["Square"], JoinForm["Miter"], 
    Tube[dat, VertexColors -> col]}, Lighting -> "Neutral"]
  }
pl2 = {
  Graphics3D[{PointSize[Large], 
    Point[Flatten[dat, 1], VertexColors -> Flatten@col], Line[dat]}],
  Graphics3D[{Thick, 
    MapThread[Line[#1, VertexColors -> #2] &, {dat, col}]}],
  Graphics3D[{CapForm["Square"], JoinForm["Miter"], 
    MapThread[Tube[#1, VertexColors -> #2] &, {dat, col}]}, 
   Lighting -> "Neutral"]
  }
POSTED BY: Martijn Froeling
2 Replies
Posted 2 years ago

This is an unexpected behavior. The bug has been filed and will be fixed in the next version.

POSTED BY: Yuzhu Lu

It has indeed been fixed in version 13.2.

thanks!

POSTED BY: Martijn Froeling
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract