{"id":1739,"date":"2014-03-30T22:29:31","date_gmt":"2014-03-30T20:29:31","guid":{"rendered":"http:\/\/blog.modelical.com\/?p=534"},"modified":"2022-03-21T12:41:29","modified_gmt":"2022-03-21T11:41:29","slug":"grasshopper-scripting-107","status":"publish","type":"post","link":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/","title":{"rendered":"Grasshopper Scripting 107"},"content":{"rendered":"<h2>Examples (I)<\/h2>\n<p>In the previous lesson we described and used the concept of nested loop, and used it with basic types and Points. In this lesson we will cover specific problems that cannot be solved directly with Grasshopper components just because they rely on complex arrangement where a value has to be calculated upon a previous one.<\/p>\n<h3>Subdividing a Curve<\/h3>\n<p>Let&#8217;s get down to a useful example of loops and interation in GH. We are going to build a component that subdivides a curve into segments but not in an homogeneous way but adaptive.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/SubdivTypes.jpg\" alt=\"\" width=\"800\" height=\"537\" class=\"alignnone size-full wp-image-3954\" srcset=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/SubdivTypes.jpg 800w, https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/SubdivTypes-480x322.jpg 480w, https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/SubdivTypes-768x516.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>This means our polyline will have more segments and points in zones with higher curvature. We will measure the gap between the straight segment we add and the curve as the quality of our subdivision:<\/p>\n<ol>\n<li>Take the end points of the curve, insert them in order in a list.<\/li>\n<li>Take the first point in the list and it&#8217;s neighbor.<\/li>\n<li>Build a line with those two points.<\/li>\n<li>Find the mid point of the line.<\/li>\n<li>If the distance from the midpoint to the curve is larger than, say, 1\/100th of the curve&#8217;s length&#8230;<\/li>\n<li>Project the midpoint to the curve and insert it in the point list in the right place.<\/li>\n<li>Move to the next point in the list. If you reach the last one, start again with step 2.<\/li>\n<li>Keep doing this until you run through all the list once without adding any new point. Then finish.<\/li>\n<\/ol>\n<p>Let&#8217;s see the code implementation:<\/p>\n<pre class=\"lang:c# decode:true\"> private void RunScript(Curve x, double y, ref object A)\r\n  {\r\n    \/\/To find the Curve's endpoints we need to evaluate the extremes of its domain.\r\n    Point3d startPoint = x.PointAt(x.Domain.Min);\r\n    \/\/retrieve Curve's start point\r\n    Point3d endPoint = x.PointAt(x.Domain.Max);\r\n    \/\/retrieve Curve's end point\r\n\r\n    \/\/declare a point for the middle point\r\n    Point3d mPt;\r\n\r\n    \/\/set the tolerance to a fraction of the Curve's length\r\n    double tolerance = x.GetLength() \/ y;\r\n\r\n    \/\/Print some info to the user\r\n    Print(\"Tolerance will be {0}\", tolerance.ToString());\r\n\r\n    \/\/initialize a flag to keep the loop running\r\n    bool keepOn = true;\r\n\r\n    \/\/initialize a counter for the number of iterations we perform\r\n    int c = 0;\r\n\r\n    \/\/declare a list to hold our points\r\n    List&lt;Point3d&gt; ptList = new List&lt;Point3d&gt;();\r\n\r\n    \/\/add the start point\r\n    ptList.Add(startPoint);\r\n\r\n    \/\/if the curve is closed we might want to add some more points to ensure we run the subdivison\r\n    if(x.IsClosed)\r\n    {\r\n      Point3d p1 = x.PointAt((x.Domain.Max - x.Domain.Min) * 0.25 + x.Domain.Min);\r\n      Point3d p2 = x.PointAt((x.Domain.Max - x.Domain.Min) * 0.5 + x.Domain.Min);\r\n      Point3d p3 = x.PointAt((x.Domain.Max - x.Domain.Min) * 0.75 + x.Domain.Min);\r\n      ptList.Add(p1);\r\n      ptList.Add(p2);\r\n      ptList.Add(p3);\r\n    }\r\n\r\n    \/\/add the endpoint\r\n    ptList.Add(endPoint);\r\n\r\n    \/\/declare a double to hold a parameter\r\n    double t = 0;\r\n    \/\/declare a double to hold a distance\r\n    double d = 0;\r\n\r\n    \/\/this loop will keep running until keepOn is false or we reach 100 iterations\r\n    while ((keepOn) &amp;&amp; (c &lt; 100))\r\n    {\r\n      \/\/deactivate the loop by default, we will activate it later if we add a point\r\n      keepOn = false;\r\n\r\n      \/\/iterate through the list of points\r\n      for (int i = 0; i &lt; ptList.Count - 1; i++)\r\n      {\r\n        \/\/calculate the midpoint using a function\r\n        mPt = midPt(ptList[i], ptList[i + 1]);\r\n\r\n        \/\/try to find the closest point to mPt on the curve, the function modifies the t number with the parameter\r\n        \/\/on x for the closest point and returns a true if successful\r\n        bool flag = x.ClosestPoint(mPt, out t);\r\n        \/\/if the closest point is found\r\n        if (flag){\r\n\r\n          \/\/build a 3D point on x at the t parameter\r\n          Point3d cPt = x.PointAt(t);\r\n          \/\/retrieve the distance between the closest point and the mid point\r\n          d = cPt.DistanceTo(mPt);\r\n\r\n          \/\/if the distance is bigger than our tolerance\r\n          if (d &gt; tolerance){\r\n\r\n            \/\/insert the point\r\n            ptList.Insert(i + 1, cPt);\r\n            \/\/re-activate the loop, as we have added a point\r\n            keepOn = true;\r\n            \/\/increase the count to skip the recently added point\r\n            i++;\r\n\r\n          }\/\/end of d&gt;tolerance if\r\n        }\/\/end of flag if\r\n      }\/\/end of list loop\r\n\r\n      \/\/increase the counter and start again\r\n      c++;\r\n    }\r\n\r\n    \/\/at the end, output A and print some info\r\n    A = ptList;\r\n    Print(\"Solution reached in {0} steps\", c + 1);\r\n\r\n  }\r\n\r\n  \/\/&lt;Custom additional code&gt;\r\n  \/\/this function returns the midpoint of two given points\r\n  Point3d midPt(Point3d a, Point3d b){\r\n\r\n    return (a + b) \/ 2;\r\n  }<\/pre>\n<h3>Koch snowflake:<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski.jpg\" alt=\"\" width=\"800\" height=\"480\" class=\"alignnone size-full wp-image-3953\" srcset=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski.jpg 800w, https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-480x288.jpg 480w, https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-768x461.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/p>\n<p>A beautiful example, <a title=\"Koch snowflake at wolfram alpha world\" href=\"http:\/\/mathworld.wolfram.com\/KochSnowflake.html\">the Koch snowflake<\/a>, is an example of a recursive system that can be described with very simple rules:<\/p>\n<ol>\n<li>Take a polygon (a regular triangle in the most famous case)<\/li>\n<li>Take the first side of the polygon.<\/li>\n<li>Divide the side in three parts and build a regular triangle with the edge coincident with the middle segment.<\/li>\n<li>Replace the side with the newly created 4 sides.<\/li>\n<li>Move to the next side.<\/li>\n<li>Repeat.<\/li>\n<\/ol>\n<p>Let&#8217;s see a simple code implementation:<\/p>\n<pre class=\"lang:c# decode:true\">private void RunScript(double x, int y, ref object A)\r\n  {\r\n    \/\/declare a list for our points\r\n    List&lt;Point3d&gt; ptList = new List&lt;Point3d&gt; ();\r\n    \/\/create the first 4 points of the triangle, 4 because we want it to be a closed polyline\r\n    ptList.Add(new Point3d(0, x, 0));\r\n    ptList.Add(new Point3d(-x * Math.Cos(Math.PI \/ 6), -x * Math.Sin(Math.PI \/ 6), 0));\r\n    ptList.Add(new Point3d(x * Math.Cos(Math.PI \/ 6), -x * Math.Sin(Math.PI \/ 6), 0));\r\n    ptList.Add(new Point3d(0, x, 0));\r\n\r\n    \/\/declare a point for each of the 3 points we'll add to each side\r\n    Point3d Pt0, Pt1, Pt2;\r\n\r\n    \/\/initialize a counter for the number of iterations we perform\r\n    int c = 0;\r\n\r\n    \/\/this loop will keep running until the lists becomes too big or we reach the number of iterations\r\n    while ((ptList.Count &lt; 2000) &amp;&amp; (c &lt; y))\r\n    {\r\n\r\n      \/\/iterate through the list of points\r\n      for (int i = 0; i &lt; ptList.Count - 1; i++)\r\n      {\r\n        \/\/calculate each of the three points using functions\r\n        Pt0 = PtA(ptList[i], ptList[i + 1]);\r\n        Pt1 = PtB(ptList[i], ptList[i + 1]);\r\n        Pt2 = PtC(ptList[i], ptList[i + 1]);\r\n        \/\/add the points to the list in the right place\r\n        ptList.Insert(i + 1, Pt0);\r\n        ptList.Insert(i + 2, Pt1);\r\n        ptList.Insert(i + 3, Pt2);\r\n        \/\/shift the iterator to skip the newly added points\r\n        i += 3;\r\n\r\n      }\/\/end of list loop\r\n\r\n      \/\/increase the counter and start again\r\n      c++;\r\n    }\r\n\r\n    \/\/at the end, output A as a polyline and print some info\r\n    A = new Polyline(ptList);\r\n    Print(\"Solution reached in {0} steps with {1} vertices\", c + 1, ptList.Count);\r\n\r\n  }\r\n\r\n  \/\/&lt;Custom additional code&gt;\r\n  \/\/this function returns the a point at one third of two given points\r\n  Point3d PtA(Point3d a, Point3d b){\r\n\r\n    return a + ((b - a) \/ 3);\r\n\r\n  }\r\n  \/\/this function returns the tip point in the sierpinski division\r\n  Point3d PtB(Point3d a, Point3d b){\r\n    Point3d p1 = a + ((b - a) \/ 3);\r\n    Point3d p2 = a + (2 * (b - a) \/ 3);\r\n    \/\/declare a transformation where we rotate the second-third point 60\u00ba around the first-third\r\n    Transform trans = Transform.Rotation(-Math.PI \/ 3, Vector3d.ZAxis, p1);\r\n    \/\/apply the transformation\r\n    p2.Transform(trans);\r\n    return p2;\r\n\r\n  }\r\n  \/\/this function returns the a point at one third of two given points\r\n  Point3d PtC(Point3d a, Point3d b){\r\n\r\n    return a + (2 * (b - a) \/ 3);\r\n\r\n  }<\/pre>\n<p>Nice, isn&#8217;t it?<\/p>\n<p><a href=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/B11_GHS_107.zip\">Download here these definitions (GH 0.9.0014)<\/a>[:]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Examples (I) In the previous lesson we described and used the concept of nested loop, and used it with basic types and Points. In this lesson we will cover specific problems that cannot be solved directly with Grasshopper components just because they rely on complex arrangement where a value has to be calculated upon a [&hellip;]<\/p>\n","protected":false},"author":64,"featured_media":27191,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[423,418],"class_list":["post-1739","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-guidelines","tag-technology-c","tag-technology-grasshopper"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Grasshopper Scripting 107 - Modelical<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Grasshopper Scripting 107 - Modelical\" \/>\n<meta property=\"og:description\" content=\"Examples (I) In the previous lesson we described and used the concept of nested loop, and used it with basic types and Points. In this lesson we will cover specific problems that cannot be solved directly with Grasshopper components just because they rely on complex arrangement where a value has to be calculated upon a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/\" \/>\n<meta property=\"og:site_name\" content=\"Modelical\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Modelical\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-30T20:29:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-21T11:41:29+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"480\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Roberto Molinos\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@modelical\" \/>\n<meta name=\"twitter:site\" content=\"@modelical\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roberto Molinos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/\"},\"author\":{\"name\":\"Roberto Molinos\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/#\\\/schema\\\/person\\\/3ad52fd99e6b5b98a59ef24c76a7c2d5\"},\"headline\":\"Grasshopper Scripting 107\",\"datePublished\":\"2014-03-30T20:29:31+00:00\",\"dateModified\":\"2022-03-21T11:41:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/\"},\"wordCount\":339,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.modelical.com\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/Sierpinski-400x250-1.jpg\",\"keywords\":[\"Tec C#\",\"Tec Grasshopper\"],\"articleSection\":[\"Guidelines\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/\",\"url\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/\",\"name\":\"Grasshopper Scripting 107 - Modelical\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.modelical.com\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/Sierpinski-400x250-1.jpg\",\"datePublished\":\"2014-03-30T20:29:31+00:00\",\"dateModified\":\"2022-03-21T11:41:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/#\\\/schema\\\/person\\\/3ad52fd99e6b5b98a59ef24c76a7c2d5\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.modelical.com\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/Sierpinski-400x250-1.jpg\",\"contentUrl\":\"https:\\\/\\\/www.modelical.com\\\/wp-content\\\/uploads\\\/2014\\\/03\\\/Sierpinski-400x250-1.jpg\",\"width\":400,\"height\":250},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-107\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Grasshopper Scripting 101\",\"item\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/grasshopper-scripting-101\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Grasshopper Scripting 107\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/\",\"name\":\"Modelical\",\"description\":\"We build information\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/#\\\/schema\\\/person\\\/3ad52fd99e6b5b98a59ef24c76a7c2d5\",\"name\":\"Roberto Molinos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro\",\"caption\":\"Roberto Molinos\"},\"sameAs\":[\"https:\\\/\\\/www.modelical.com\"],\"url\":\"https:\\\/\\\/www.modelical.com\\\/en\\\/author\\\/roberto\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Grasshopper Scripting 107 - Modelical","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/","og_locale":"en_US","og_type":"article","og_title":"Grasshopper Scripting 107 - Modelical","og_description":"Examples (I) In the previous lesson we described and used the concept of nested loop, and used it with basic types and Points. In this lesson we will cover specific problems that cannot be solved directly with Grasshopper components just because they rely on complex arrangement where a value has to be calculated upon a [&hellip;]","og_url":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/","og_site_name":"Modelical","article_publisher":"https:\/\/www.facebook.com\/Modelical\/","article_published_time":"2014-03-30T20:29:31+00:00","article_modified_time":"2022-03-21T11:41:29+00:00","og_image":[{"width":800,"height":480,"url":"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski.jpg","type":"image\/jpeg"}],"author":"Roberto Molinos","twitter_card":"summary_large_image","twitter_creator":"@modelical","twitter_site":"@modelical","twitter_misc":{"Written by":"Roberto Molinos","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#article","isPartOf":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/"},"author":{"name":"Roberto Molinos","@id":"https:\/\/www.modelical.com\/en\/#\/schema\/person\/3ad52fd99e6b5b98a59ef24c76a7c2d5"},"headline":"Grasshopper Scripting 107","datePublished":"2014-03-30T20:29:31+00:00","dateModified":"2022-03-21T11:41:29+00:00","mainEntityOfPage":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/"},"wordCount":339,"commentCount":0,"image":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#primaryimage"},"thumbnailUrl":"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-400x250-1.jpg","keywords":["Tec C#","Tec Grasshopper"],"articleSection":["Guidelines"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/","url":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/","name":"Grasshopper Scripting 107 - Modelical","isPartOf":{"@id":"https:\/\/www.modelical.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#primaryimage"},"image":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#primaryimage"},"thumbnailUrl":"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-400x250-1.jpg","datePublished":"2014-03-30T20:29:31+00:00","dateModified":"2022-03-21T11:41:29+00:00","author":{"@id":"https:\/\/www.modelical.com\/en\/#\/schema\/person\/3ad52fd99e6b5b98a59ef24c76a7c2d5"},"breadcrumb":{"@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#primaryimage","url":"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-400x250-1.jpg","contentUrl":"https:\/\/www.modelical.com\/wp-content\/uploads\/2014\/03\/Sierpinski-400x250-1.jpg","width":400,"height":250},{"@type":"BreadcrumbList","@id":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-107\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Grasshopper Scripting 101","item":"https:\/\/www.modelical.com\/en\/grasshopper-scripting-101\/"},{"@type":"ListItem","position":2,"name":"Grasshopper Scripting 107"}]},{"@type":"WebSite","@id":"https:\/\/www.modelical.com\/en\/#website","url":"https:\/\/www.modelical.com\/en\/","name":"Modelical","description":"We build information","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.modelical.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.modelical.com\/en\/#\/schema\/person\/3ad52fd99e6b5b98a59ef24c76a7c2d5","name":"Roberto Molinos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro","url":"https:\/\/secure.gravatar.com\/avatar\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/9346c12c96cb942be9bb8b2454e296662a1baa0b4cd461ab315ae9a5185b0db6?s=96&d=initials&r=g&initials=ro","caption":"Roberto Molinos"},"sameAs":["https:\/\/www.modelical.com"],"url":"https:\/\/www.modelical.com\/en\/author\/roberto\/"}]}},"_links":{"self":[{"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/posts\/1739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/comments?post=1739"}],"version-history":[{"count":0,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/posts\/1739\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/media\/27191"}],"wp:attachment":[{"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/media?parent=1739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/categories?post=1739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.modelical.com\/en\/wp-json\/wp\/v2\/tags?post=1739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}