Grasshopper

algorithmic modeling for Rhino



As an exercise, I decided to try to implement the Catmull-Clark subdivision algorithm in Grasshopper alone. This means no scripts, and no 3rd-party components (such as weaverbird). This is not designed to be a utility - by all means, if you have to subdivide a mesh in this way, just use Weaverbird. I am always interested in the way traditional coding approaches translate into a non-textual language like Grasshopper, and this was a fun way to push a bit at GH's data management to achieve comparable results to scripting approaches.
The algorithm as implemented can handle closed meshes with quad faces only. I will attempt a version that can handle tri-faces eventually.
I based my approach on the pseudocode available at Rosetta Code.

DOWNLOAD HERE: GH_Catmull_Clark.gh

Views: 2883

Comment

You need to be a member of Grasshopper to add comments!

Join Grasshopper

Comment by June-Hao Hou on March 15, 2012 at 6:32pm

Great exercise! Bravo!

Comment by Ángel Linares on June 28, 2011 at 3:12am
Really nice exercise :) tri_vertex and quad faces compatible definition could be a little tricky to code... I'll love to see.
Comment by Archieboy on June 26, 2011 at 2:17am
Very nice! I want to know if there is anyway to do the reversed way: from a very high density mesh(like the red one in your picture) to a more polygon mesh (like the blue one)?

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2018   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service