algorithmic modeling for Rhino
Hi Dimitry,
you can use Mesh.VertexColors.Add() to add a bunch of colours in a loop, or you can compute an array of colours first and then use AppendRange() instead.
Another possibility is to create a Monotone mesh first and then specifically assign certain indices:
Mesh mesh = GetMeshFromSomewhere();
mesh.VertexColors.CreateMonotoneMesh(Color.White);
mesh.VertexColors[0] = Color.Black;
mesh.VertexColors[3] = Color.Red;
etc.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thank you David, very helpful!
You can also set the Count of VertexColors (mesh.VertexColors.Count = 100) and then set each member.
- Giulio
________________
giulio@mcneel.com
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by